Message ID | 828d57444a0a41042556bb0a4394ecf2fcaed639.1730368052.git.leon@kernel.org (mailing list archive) |
---|---|
State | Accepted |
Headers | show |
Series | [rdma-next] RDMA/mlx5: Support querying per-plane IB PortCounters | expand |
On Thu, 31 Oct 2024 11:48:14 +0200, Leon Romanovsky wrote: > On a SMI device, set requested plane_num when querying PPCNT register > with the PortCounters Attribute group. > > Applied, thanks! [1/1] RDMA/mlx5: Support querying per-plane IB PortCounters https://git.kernel.org/rdma/rdma/c/af58db354865a4 Best regards,
diff --git a/drivers/infiniband/hw/mlx5/mad.c b/drivers/infiniband/hw/mlx5/mad.c index 1b6c5e37d169..2453ae4384a7 100644 --- a/drivers/infiniband/hw/mlx5/mad.c +++ b/drivers/infiniband/hw/mlx5/mad.c @@ -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); }