]> www.infradead.org Git - users/hch/misc.git/commitdiff
RDMA/mlx5: Fix CC counters query for MPV
authorPatrisious Haddad <phaddad@nvidia.com>
Mon, 16 Jun 2025 09:14:53 +0000 (12:14 +0300)
committerLeon Romanovsky <leon@kernel.org>
Wed, 25 Jun 2025 07:41:55 +0000 (03:41 -0400)
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@nvidia.com>
Reviewed-by: Michael Guralnik <michaelgur@nvidia.com>
Link: https://patch.msgid.link/9cace74dcf106116118bebfa9146d40d4166c6b0.1750064969.git.leon@kernel.org
Signed-off-by: Leon Romanovsky <leon@kernel.org>
drivers/infiniband/hw/mlx5/counters.c

index 943e9eb2ad20d6c8ebe4243a6821dd28c996dcab..a506fafd2b15132bc55fdc6d37b2174277344068 100644 (file)
@@ -418,7 +418,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,