mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-12-29 09:16:33 +00:00
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 <markzhang@nvidia.com> Reviewed-by: Maher Sanalla <msanalla@nvidia.com> Link: https://patch.msgid.link/828d57444a0a41042556bb0a4394ecf2fcaed639.1730368052.git.leon@kernel.org Signed-off-by: Leon Romanovsky <leon@kernel.org>
This commit is contained in:
parent
8b36f7c3c6
commit
eb3d354efb
@ -278,7 +278,13 @@ static int process_pma_cmd(struct mlx5_ib_dev *dev, u32 port_num,
|
||||
goto done;
|
||||
}
|
||||
|
||||
err = query_ib_ppcnt(mdev, mdev_port_num, 0, out_cnt, sz, 0);
|
||||
if (dev->ib_dev.type == RDMA_DEVICE_TYPE_SMI)
|
||||
err = query_ib_ppcnt(mdev, mdev_port_num, port_num,
|
||||
out_cnt, sz, 0);
|
||||
else
|
||||
err = query_ib_ppcnt(mdev, mdev_port_num, 0,
|
||||
out_cnt, sz, 0);
|
||||
|
||||
if (!err)
|
||||
pma_cnt_assign(pma_cnt, out_cnt);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user