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
293 293
294 RDMA_NLDEV_CMD_RES_MR_GET_RAW,294 RDMA_NLDEV_CMD_RES_MR_GET_RAW,
295 295
296 RDMA_NLDEV_CMD_RES_CTX_GET, /* can dump */
297
296 RDMA_NLDEV_NUM_OPS298 RDMA_NLDEV_NUM_OPS
297};299};
298 300
@@ -533,6 +535,9 @@ enum rdma_nldev_attr { · 234 unmodified lines
533 535
534 RDMA_NLDEV_ATTR_RES_RAW, /* binary */536 RDMA_NLDEV_ATTR_RES_RAW, /* binary */
535 537
538 RDMA_NLDEV_ATTR_RES_CTX, /* nested table */
539 RDMA_NLDEV_ATTR_RES_CTX_ENTRY, /* nested table */
540
536 /*541 /*
537 * Always the end542 * Always the end
538 */543 */