* [PATCH v2 0/2] IB/mlx4: Enable debug print of SMPs and enhance output for MADs
@ 2018-09-17 17:56 Håkon Bugge
2018-09-17 17:56 ` [PATCH 1/2] IB/mlx4: Enable debug print of SMPs Håkon Bugge
2018-09-17 17:56 ` [PATCH v2 2/2] IB/mlx4: Add port and TID to MAD debug print Håkon Bugge
0 siblings, 2 replies; 5+ messages in thread
From: Håkon Bugge @ 2018-09-17 17:56 UTC (permalink / raw)
To: Doug Ledford, yishaih, linux-rdma, linux-kernel, jgg; +Cc: jackm
SMPs were not printed at all. Added printing of port number and TID to
all MADs
Håkon Bugge (2):
IB/mlx4: Enable debug print of SMPs
IB/mlx4: Add port and TID to MAD debug print
drivers/infiniband/hw/mlx4/mad.c | 20 +++++++++++---------
1 file changed, 11 insertions(+), 9 deletions(-)
--
v1 -> v2
* Fixed incorrect format for printing the TID for the second patch
2.14.3
^ permalink raw reply [flat|nested] 5+ messages in thread* [PATCH 1/2] IB/mlx4: Enable debug print of SMPs 2018-09-17 17:56 [PATCH v2 0/2] IB/mlx4: Enable debug print of SMPs and enhance output for MADs Håkon Bugge @ 2018-09-17 17:56 ` Håkon Bugge 2018-09-17 17:56 ` [PATCH v2 2/2] IB/mlx4: Add port and TID to MAD debug print Håkon Bugge 1 sibling, 0 replies; 5+ messages in thread From: Håkon Bugge @ 2018-09-17 17:56 UTC (permalink / raw) To: Doug Ledford, yishaih, linux-rdma, linux-kernel, jgg; +Cc: jackm IB Subnet Management Packets (SMPs) were excluded from debug prints. Fixed by enabling print even on QP0 MADs. Signed-off-by: Håkon Bugge <haakon.bugge@oracle.com> --- drivers/infiniband/hw/mlx4/mad.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/infiniband/hw/mlx4/mad.c b/drivers/infiniband/hw/mlx4/mad.c index e5466d786bb1..1718715cc094 100644 --- a/drivers/infiniband/hw/mlx4/mad.c +++ b/drivers/infiniband/hw/mlx4/mad.c @@ -807,7 +807,7 @@ static int ib_process_mad(struct ib_device *ibdev, int mad_flags, u8 port_num, int err; struct ib_port_attr pattr; - if (in_wc && in_wc->qp->qp_num) { + if (in_wc && in_wc->qp) { pr_debug("received MAD: slid:%d sqpn:%d " "dlid_bits:%d dqpn:%d wc_flags:0x%x, cls %x, mtd %x, atr %x\n", in_wc->slid, in_wc->src_qp, -- 2.14.3 ^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v2 2/2] IB/mlx4: Add port and TID to MAD debug print 2018-09-17 17:56 [PATCH v2 0/2] IB/mlx4: Enable debug print of SMPs and enhance output for MADs Håkon Bugge 2018-09-17 17:56 ` [PATCH 1/2] IB/mlx4: Enable debug print of SMPs Håkon Bugge @ 2018-09-17 17:56 ` Håkon Bugge 1 sibling, 0 replies; 5+ messages in thread From: Håkon Bugge @ 2018-09-17 17:56 UTC (permalink / raw) To: Doug Ledford, yishaih, linux-rdma, linux-kernel, jgg; +Cc: jackm Add said information and make the debug print format consistent. Signed-off-by: Håkon Bugge <haakon.bugge@oracle.com> -- v1 -> v2 * Fixed incorrect format for printing the TID --- drivers/infiniband/hw/mlx4/mad.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/drivers/infiniband/hw/mlx4/mad.c b/drivers/infiniband/hw/mlx4/mad.c index 1718715cc094..8942f5f7f04d 100644 --- a/drivers/infiniband/hw/mlx4/mad.c +++ b/drivers/infiniband/hw/mlx4/mad.c @@ -808,14 +808,16 @@ static int ib_process_mad(struct ib_device *ibdev, int mad_flags, u8 port_num, struct ib_port_attr pattr; if (in_wc && in_wc->qp) { - pr_debug("received MAD: slid:%d sqpn:%d " - "dlid_bits:%d dqpn:%d wc_flags:0x%x, cls %x, mtd %x, atr %x\n", - in_wc->slid, in_wc->src_qp, - in_wc->dlid_path_bits, - in_wc->qp->qp_num, - in_wc->wc_flags, - in_mad->mad_hdr.mgmt_class, in_mad->mad_hdr.method, - be16_to_cpu(in_mad->mad_hdr.attr_id)); + pr_debug("received MAD: port:%d slid:%d sqpn:%d " + "dlid_bits:%d dqpn:%d wc_flags:0x%x tid:%016llx cls:%x mtd:%x atr:%x\n", + port_num, + in_wc->slid, in_wc->src_qp, + in_wc->dlid_path_bits, + in_wc->qp->qp_num, + in_wc->wc_flags, + be64_to_cpu(in_mad->mad_hdr.tid), + in_mad->mad_hdr.mgmt_class, in_mad->mad_hdr.method, + be16_to_cpu(in_mad->mad_hdr.attr_id)); if (in_wc->wc_flags & IB_WC_GRH) { pr_debug("sgid_hi:0x%016llx sgid_lo:0x%016llx\n", be64_to_cpu(in_grh->sgid.global.subnet_prefix), -- 2.14.3 ^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 0/2] IB/mlx4: Enable debug print of SMPs and enhance output for MADs @ 2018-09-17 14:53 Håkon Bugge 2018-09-17 14:53 ` [PATCH 1/2] IB/mlx4: Enable debug print of SMPs Håkon Bugge 0 siblings, 1 reply; 5+ messages in thread From: Håkon Bugge @ 2018-09-17 14:53 UTC (permalink / raw) To: Doug Ledford, yishaih, linux-rdma, linux-kernel, jgg; +Cc: jackm SMPs were not printed at all. Added printing of port number and TID to all MADs Håkon Bugge (2): IB/mlx4: Enable debug print of SMPs IB/mlx4: Add port and TID to MAD debug print drivers/infiniband/hw/mlx4/mad.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) -- 2.14.3 ^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/2] IB/mlx4: Enable debug print of SMPs 2018-09-17 14:53 [PATCH 0/2] IB/mlx4: Enable debug print of SMPs and enhance output for MADs Håkon Bugge @ 2018-09-17 14:53 ` Håkon Bugge 2018-09-17 17:52 ` Leon Romanovsky 0 siblings, 1 reply; 5+ messages in thread From: Håkon Bugge @ 2018-09-17 14:53 UTC (permalink / raw) To: Doug Ledford, yishaih, linux-rdma, linux-kernel, jgg; +Cc: jackm IB Subnet Management Packets (SMPs) were excluded from debug prints. Fixed by enabling print even on QP0 MADs. Signed-off-by: Håkon Bugge <haakon.bugge@oracle.com> --- drivers/infiniband/hw/mlx4/mad.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/infiniband/hw/mlx4/mad.c b/drivers/infiniband/hw/mlx4/mad.c index e5466d786bb1..1718715cc094 100644 --- a/drivers/infiniband/hw/mlx4/mad.c +++ b/drivers/infiniband/hw/mlx4/mad.c @@ -807,7 +807,7 @@ static int ib_process_mad(struct ib_device *ibdev, int mad_flags, u8 port_num, int err; struct ib_port_attr pattr; - if (in_wc && in_wc->qp->qp_num) { + if (in_wc && in_wc->qp) { pr_debug("received MAD: slid:%d sqpn:%d " "dlid_bits:%d dqpn:%d wc_flags:0x%x, cls %x, mtd %x, atr %x\n", in_wc->slid, in_wc->src_qp, -- 2.14.3 ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] IB/mlx4: Enable debug print of SMPs 2018-09-17 14:53 ` [PATCH 1/2] IB/mlx4: Enable debug print of SMPs Håkon Bugge @ 2018-09-17 17:52 ` Leon Romanovsky 0 siblings, 0 replies; 5+ messages in thread From: Leon Romanovsky @ 2018-09-17 17:52 UTC (permalink / raw) To: Håkon Bugge Cc: Doug Ledford, yishaih, linux-rdma, linux-kernel, jgg, jackm [-- Attachment #1: Type: text/plain, Size: 405 bytes --] On Mon, Sep 17, 2018 at 04:53:08PM +0200, Håkon Bugge wrote: > IB Subnet Management Packets (SMPs) were excluded from debug prints. > > Fixed by enabling print even on QP0 MADs. > > Signed-off-by: Håkon Bugge <haakon.bugge@oracle.com> > --- > drivers/infiniband/hw/mlx4/mad.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > Thanks, Acked-by: Leon Romanovsky <leonro@mellanox.com> [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 801 bytes --] ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2018-09-17 17:57 UTC | newest] Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2018-09-17 17:56 [PATCH v2 0/2] IB/mlx4: Enable debug print of SMPs and enhance output for MADs Håkon Bugge 2018-09-17 17:56 ` [PATCH 1/2] IB/mlx4: Enable debug print of SMPs Håkon Bugge 2018-09-17 17:56 ` [PATCH v2 2/2] IB/mlx4: Add port and TID to MAD debug print Håkon Bugge -- strict thread matches above, loose matches on Subject: below -- 2018-09-17 14:53 [PATCH 0/2] IB/mlx4: Enable debug print of SMPs and enhance output for MADs Håkon Bugge 2018-09-17 14:53 ` [PATCH 1/2] IB/mlx4: Enable debug print of SMPs Håkon Bugge 2018-09-17 17:52 ` Leon Romanovsky
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®