Skip to content

Commit eb3d354

Browse files
MarkZhang81rleon
authored andcommitted
RDMA/mlx5: Support querying per-plane IB PortCounters
On a SMI device, set requested plane_num when querying PPCNT register with the PortCounters Attribute group. Signed-off-by: Mark Zhang <[email protected]> Reviewed-by: Maher Sanalla <[email protected]> Link: https://patch.msgid.link/828d57444a0a41042556bb0a4394ecf2fcaed639.1730368052.git.leon@kernel.org Signed-off-by: Leon Romanovsky <[email protected]>
1 parent 8b36f7c commit eb3d354

File tree

1 file changed

+7
-1
lines changed
  • drivers/infiniband/hw/mlx5

1 file changed

+7
-1
lines changed

drivers/infiniband/hw/mlx5/mad.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,13 @@ static int process_pma_cmd(struct mlx5_ib_dev *dev, u32 port_num,
278278
goto done;
279279
}
280280

281-
err = query_ib_ppcnt(mdev, mdev_port_num, 0, out_cnt, sz, 0);
281+
if (dev->ib_dev.type == RDMA_DEVICE_TYPE_SMI)
282+
err = query_ib_ppcnt(mdev, mdev_port_num, port_num,
283+
out_cnt, sz, 0);
284+
else
285+
err = query_ib_ppcnt(mdev, mdev_port_num, 0,
286+
out_cnt, sz, 0);
287+
282288
if (!err)
283289
pma_cnt_assign(pma_cnt, out_cnt);
284290
}

0 commit comments

Comments
 (0)