[SRU][N:linux-bluefield][PATCH v1 2/3] RDMA/mlx5: Fix CC counters query for MPV

Stav Aviram saviram at nvidia.com
Mon Oct 6 09:22:42 UTC 2025


From: Patrisious Haddad <phaddad at nvidia.com>

BugLink: https://bugs.launchpad.net/bugs/2126876

In case, CC counters are querying for the second port use the correct
core device for the query instead of always using the master core device.

Fixes: aac4492ef23a ("IB/mlx5: Update counter implementation for dual port RoCE")
Signed-off-by: Patrisious Haddad <phaddad at nvidia.com>
Reviewed-by: Michael Guralnik <michaelgur at nvidia.com>
Link: https://patch.msgid.link/9cace74dcf106116118bebfa9146d40d4166c6b0.1750064969.git.leon@kernel.org
Signed-off-by: Leon Romanovsky <leon at kernel.org>
(cherry picked from commit acd245b1e33fc4b9d0f2e3372021d632f7ee0652)
Signed-off-by: Stav Aviram <saviram at nvidia.com>
---
 drivers/infiniband/hw/mlx5/counters.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/infiniband/hw/mlx5/counters.c b/drivers/infiniband/hw/mlx5/counters.c
index f4aa72166cf3..d06128501ce4 100644
--- a/drivers/infiniband/hw/mlx5/counters.c
+++ b/drivers/infiniband/hw/mlx5/counters.c
@@ -407,7 +407,7 @@ static int do_get_hw_stats(struct ib_device *ibdev,
 			 */
 			goto done;
 		}
-		ret = mlx5_lag_query_cong_counters(dev->mdev,
+		ret = mlx5_lag_query_cong_counters(mdev,
 						   stats->value +
 						   cnts->num_q_counters,
 						   cnts->num_cong_counters,
-- 
2.38.1




More information about the kernel-team mailing list