History

RDMA/core: Add an option to display driver-specific QPs in the rdmatool

Utilize the -dd flag (driver-specific details) in the rdmatool to view driver-specific QPs which are not exposed yet. Add the netlink attribute to mark request to convey driver details and use it to return QP subtype as a string. $ rdma resource show qp link ibp8s0f1 link ibp8s0f1/1 lqpn 360 type UD state RTS sq-psn 0 comm [mlx5_ib] link ibp8s0f1/1 lqpn 0 type SMI state RTS sq-psn 0 comm [ib_core] link ibp8s0f1/1 lqpn 1 type GSI state RTS sq-psn 0 comm [ib_core] $ rdma resource show qp link ibp8s0f1 -dd link ibp8s0f1/1 lqpn 360 type UD state RTS sq-psn 0 comm [mlx5_ib] link ibp8s0f1/1 lqpn 465 type DRIVER subtype REG_UMR state RTS sq-psn 0 comm [mlx5_ib] link ibp8s0f1/1 lqpn 0 type SMI state RTS sq-psn 0 comm [ib_core] link ibp8s0f1/1 lqpn 1 type GSI state RTS sq-psn 0 comm [ib_core] $ rdma resource show 0: ibp8s0f0: pd 3 cq 4 qp 3 cm_id 0 mr 0 ctx 0 srq 2 1: ibp8s0f1: pd 3 cq 4 qp 3 cm_id 0 mr 0 ctx 0 srq 2 $ rdma resource show -dd 0: ibp8s0f0: pd 3 cq 4 qp 4 cm_id 0 mr 0 ctx 0 srq 2 1: ibp8s0f1: pd 3 cq 4 qp 4 cm_id 0 mr 0 ctx 0 srq 2

Chiara Meiohas committed 2 years ago

Commit e18fa0b1 parent f847e844 files · +40 −8Browse files

Showing the changes to include/uapi (1 of 4 files). Show all

Unified · Split

include/uapi/rdma/rdma_netlink.h+6−0
@@ -558,6 +558,12 @@ enum rdma_nldev_attr { · 557 unmodified lines
558558
559559 RDMA_NLDEV_SYS_ATTR_PRIVILEGED_QKEY_MODE, /* u8 */
560560
561+ RDMA_NLDEV_ATTR_DRIVER_DETAILS, /* u8 */
562+ /*
563+ * QP subtype string, used for driver QPs
564+ */
565+ RDMA_NLDEV_ATTR_RES_SUBTYPE, /* string */
566+
561567 /*
562568 * Always the end
563569 */