Skip to contentSkip to conversation

IB/mlx4: Enable debug print of SMPs and enhance output for MADs

PATCH Applied Håkon Bugge 2 participants 4 messages Oct 9, 2018 – Oct 16, 2018

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

v3 cover IB/mlx4: Enable debug print of SMPs and enhance output for MADs

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
v2 -> v3
* Made v3 consistently for cover-letter and the two patches, my v2 was partly original submission plus a v2. That probably fooled both the kbuild bot and patchwork

2.14.3

#1 lore raw

PATCH v3 1/2 IB/mlx4: Enable debug print of SMPs

IB Subnet Management Packets (SMPs) were excluded from debug prints.

Fixed by enabling print even on QP0 MADs.

---

v1 -> v3:
* No changes

---
 drivers/infiniband/hw/mlx4/mad.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/infiniband/hw/mlx4/mad.c +1 -1
index e5466d786bb1..1718715cc094 100644
@@ -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,
Signature · 1 line
2.14.3
#2 lore raw

PATCH v3 2/2 IB/mlx4: Add port and TID to MAD debug print

In reply to Håkon Bugge

Add said information and make the debug print format consistent.

---

v1 -> v2:
* Fixed incorrect format for printing the TID
v2 -> v3:
* Added Leon's a-b

---
 drivers/infiniband/hw/mlx4/mad.c | 18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)
drivers/infiniband/hw/mlx4/mad.c +10 -8
index 1718715cc094..8942f5f7f04d 100644
@@ -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),
Signature · 1 line
2.14.3
Applied
#3 lore raw
In reply to Håkon Bugge
Quoted 13 lines · Håkon Bugge

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(-)

--

Quoted 8 lines

v1 -> v2
* Fixed incorrect format for printing the TID for the second patch
v2 -> v3
* Made v3 consistently for cover-letter and the two patches, my v2 was partly original submission plus a v2. That probably fooled both the kbuild bot and patchwork

2.14.3

Thanks, applied.

Signature · 3 lines
Doug Ledford <[email protected]>
    GPG KeyID: B826A3330E572FDD
    Key fingerprint = AE6B 1BDA 122B 23B4 265B  1274 B826 A333 0E57 2FDD