Skip to contentSkip to conversation

IB/mlx5: Fix port counter ID association to QP offset

PATCH Applied Leon Romanovsky 3 participants 3 messages Jul 13, 2016 – Aug 2, 2016 2 messages not in the archive

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

PATCH 1/1 IB/mlx5: Fix port counter ID association to QP offset

From: Alex Vesker <valex-VPRAkNaXOzVWk0Htik3J/[email protected]>

The q-counter-id is given in modify-QP command associates the QP with the counter. The offset to which the counter ID was set is incorrect, causing IB port counters not to count on QP.

Fixes 0837e86a7a34 ('IB/mlx5: Add per port counters')
---
 drivers/infiniband/hw/mlx5/qp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/infiniband/hw/mlx5/qp.c +1 -1
index 5ca14a2..40b2045 100644
@@ -2657,7 +2657,7 @@ static int __mlx5_ib_modify_qp(struct ib_qp *ibqp,
 		struct mlx5_ib_port *mibport = &dev->port[port_num];
 
 		context->qp_counter_set_usr_page |=
-			cpu_to_be32(mibport->q_cnt_id << 16);
+			cpu_to_be32((u32)(mibport->q_cnt_id) << 24);
 	}
 
 	if (!ibqp->uobject && cur_state == IB_QPS_RESET && new_state == IB_QPS_INIT)
Signature · 6 lines
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Tested-by
#2 lore raw
In reply to a message not in the archive
Quoted 41 lines

-----Original Message-----
From: [email protected] [mailto:linux-rdma- [email protected]] On Behalf Of Leon Romanovsky
Sent: Wednesday, July 13, 2016 4:25 PM
To: [email protected]
Cc: [email protected]; Alex Vesker <valex-VPRAkNaXOzVWk0Htik3J/[email protected]>
Subject: [PATCH for-next] IB/mlx5: Fix port counter ID association to QP
offset

From: Alex Vesker <valex-VPRAkNaXOzVWk0Htik3J/[email protected]>

The q-counter-id is given in modify-QP command associates the QP with the counter. The offset to which the counter ID was set is incorrect, causing IB port counters not to count on QP.

Fixes 0837e86a7a34 ('IB/mlx5: Add per port counters')
---
 drivers/infiniband/hw/mlx5/qp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/infiniband/hw/mlx5/qp.c +1 -1
index 5ca14a2..40b2045 100644
@@ -2657,7 +2657,7 @@ static int __mlx5_ib_modify_qp(struct ib_qp *ibqp,
 		struct mlx5_ib_port *mibport = &dev->port[port_num];
 
 		context->qp_counter_set_usr_page |=
-			cpu_to_be32(mibport->q_cnt_id << 16);
+			cpu_to_be32((u32)(mibport->q_cnt_id) << 24);
 	}
 
 	if (!ibqp->uobject && cur_state == IB_QPS_RESET && new_state ==

IB_QPS_INIT)
--
2.1.4

Quoted 1 line

--

Alex thank for noticing and fixing this.

Mark
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

Applied
#4 lore raw
In reply to a message not in the archive
Quoted 18 lines · Mark Bloch
Quoted 18 lines

-----Original Message-----
From: [email protected] [mailto:linux-rdma- [email protected]] On Behalf Of Leon Romanovsky
Sent: Wednesday, July 13, 2016 4:25 PM
To: [email protected]
Cc: [email protected]; Alex Vesker <valex-VPRAkNaXOzVWk0Htik3J/[email protected]>
Subject: [PATCH for-next] IB/mlx5: Fix port counter ID association
to QP
offset

From: Alex Vesker <valex-VPRAkNaXOzVWk0Htik3J/[email protected]>

The q-counter-id is given in modify-QP command associates the QP with the counter. The offset to which the counter ID was set is incorrect, causing IB port counters not to count on QP.

Quoted 7 lines
Quoted 4 lines
Fixes 0837e86a7a34 ('IB/mlx5: Add per port counters')

Alex thank for noticing and fixing this.

Thanks, applied.

Signature · 2 lines
Doug Ledford <[email protected]>
              GPG KeyID: 0E572FDD