History

RDMA/nldev: Return context information

Extend the RDMA nldev return a context information, like ctx number and process ID that created that context. This functionality is helpful to find orphan contexts that are not closed for some reason. Sample output: $ rdma res show ctx dev ibp8s0f0 ctxn 0 pid 980 comm ibv_rc_pingpong dev ibp8s0f0 ctxn 1 pid 981 comm ibv_rc_pingpong dev ibp8s0f0 ctxn 2 pid 992 comm ibv_rc_pingpong dev ibp8s0f1 ctxn 0 pid 984 comm ibv_rc_pingpong dev ibp8s0f1 ctxn 1 pid 987 comm ibv_rc_pingpong $ rdma res show ctx dev ibp8s0f1 dev ibp8s0f1 ctxn 0 pid 984 comm ibv_rc_pingpong dev ibp8s0f1 ctxn 1 pid 987 comm ibv_rc_pingpong

Neta Ostrovsky committed 5 years ago

Commit 12ce2081 parent cb5cd0e2 files · +32 −0Browse files

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

Unified · Split

include/uapi/rdma/rdma_netlink.h+5−0
@@ -293,6 +293,8 @@ enum rdma_nldev_command { · 292 unmodified lines
293293
294294 RDMA_NLDEV_CMD_RES_MR_GET_RAW,
295295
296+ RDMA_NLDEV_CMD_RES_CTX_GET, /* can dump */
297+
296298 RDMA_NLDEV_NUM_OPS
297299 };
298300
@@ -533,6 +535,9 @@ enum rdma_nldev_attr { · 234 unmodified lines
533535
534536 RDMA_NLDEV_ATTR_RES_RAW, /* binary */
535537
538+ RDMA_NLDEV_ATTR_RES_CTX, /* nested table */
539+ RDMA_NLDEV_ATTR_RES_CTX_ENTRY, /* nested table */
540+
536541 /*
537542 * Always the end
538543 */