For performance considerations, how to get the number of queue pairs that have been established on the RoCE NIC?

As mentioned in the title, is there an API interface or a tool to get this information?

In order to prevent the establishment of too many QPs, are there any plans for the future?

Hi Vivienne,

Thank you for posting your inquiry to the Mellanox community.

If you are utilizing RDMA_CM, you can use the /opt/mellanox/iproute2/sbin/rdma binary to see this information:

[root@node ~]# /opt/mellanox/iproute2/sbin/rdma resource show qp

link mlx5_0/- lqpn 0 type SMI state RTS sq-psn 180935 comm [ib_core]

link mlx5_0/- lqpn 1 type GSI state RTS sq-psn 0 comm [ib_core]

link mlx5_0/1 lqpn 77 type UD state RTS sq-psn 561450 comm [ib_core]

link mlx5_0/1 lqpn 207 rqpn 457 type RC state RTS rq-psn 8319677 sq-psn 16058286 path-mig-state MIGRATED pdn 43 pid 14177 comm ib_send_bw

link mlx5_0/1 lqpn 208 rqpn 458 type RC state RTS rq-psn 12268335 sq-psn 12898667 path-mig-state MIGRATED pdn 44 pid 14177 comm ib_send_bw

link mlx5_1/- lqpn 0 type SMI state RTS sq-psn 7374 comm [ib_core]

link mlx5_1/- lqpn 1 type GSI state RTS sq-psn 0 comm [ib_core]

link mlx5_1/1 lqpn 327 type UD state RTS sq-psn 1224 comm [ib_core]

Best regards,

Mellanox Technical Support