Add an interface via netlink command to query whether rdma devices are shared among multiple net namespaces or not. When using RDMAtool, it can be queried as, $rdma system show netns netns shared
Showing the changes to include/uapi (1 of 4 files). Show all
Unified · Split
| @@ -261,7 +261,8 @@ enum rdma_nldev_command { · 260 unmodified lines | |||
| 261 | 261 | ||
| 262 | RDMA_NLDEV_CMD_PORT_GET, /* can dump */ | 262 | RDMA_NLDEV_CMD_PORT_GET, /* can dump */ |
| 263 | 263 | ||
| 264 | /* 6 - 8 are free to use */ | 264 | RDMA_NLDEV_CMD_SYS_GET, /* can dump */ |
| 265 | /* 7 - 8 are free to use */ | ||
| 265 | 266 | ||
| 266 | RDMA_NLDEV_CMD_RES_GET = 9, /* can dump */ | 267 | RDMA_NLDEV_CMD_RES_GET = 9, /* can dump */ |
| 267 | 268 | ||
| @@ -472,6 +473,12 @@ enum rdma_nldev_attr { · 204 unmodified lines | |||
| 472 | */ | 473 | */ |
| 473 | RDMA_NLDEV_ATTR_LINK_TYPE, /* string */ | 474 | RDMA_NLDEV_ATTR_LINK_TYPE, /* string */ |
| 474 | 475 | ||
| 476 | /* | ||
| 477 | * net namespace mode for rdma subsystem: | ||
| 478 | * either shared or exclusive among multiple net namespaces. | ||
| 479 | */ | ||
| 480 | RDMA_NLDEV_SYS_ATTR_NETNS_MODE, /* u8 */ | ||
| 481 | |||
| 475 | /* | 482 | /* |
| 476 | * Always the end | 483 | * Always the end |
| 477 | */ | 484 | */ |