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
Showing the changes to include/uapi (1 of 2 files). Show all
Unified · Split
| @@ -293,6 +293,8 @@ enum rdma_nldev_command { · 292 unmodified lines | ||
| 293 | 293 | |
| 294 | 294 | RDMA_NLDEV_CMD_RES_MR_GET_RAW, |
| 295 | 295 | |
| 296 | + RDMA_NLDEV_CMD_RES_CTX_GET, /* can dump */ | |
| 297 | + | |
| 296 | 298 | RDMA_NLDEV_NUM_OPS |
| 297 | 299 | }; |
| 298 | 300 | |
| @@ -533,6 +535,9 @@ enum rdma_nldev_attr { · 234 unmodified lines | ||
| 533 | 535 | |
| 534 | 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 | 542 | * Always the end |
| 538 | 543 | */ |