summaryrefslogtreecommitdiffstats
path: root/include/uapi/rdma
diff options
context:
space:
mode:
authorParav Pandit2019-04-15 12:22:51 +0200
committerJason Gunthorpe2019-04-22 19:44:58 +0200
commit2e5b8a01165e4fe57ec396961daae38713edce35 (patch)
tree7f2d011cac2433cb3fc8692e9e05a74a39a55e95 /include/uapi/rdma
parentRDMA/core: Introduce a helper function to change net namespace of rdma device (diff)
downloadkernel-qcow2-linux-2e5b8a01165e4fe57ec396961daae38713edce35.tar.gz
kernel-qcow2-linux-2e5b8a01165e4fe57ec396961daae38713edce35.tar.xz
kernel-qcow2-linux-2e5b8a01165e4fe57ec396961daae38713edce35.zip
RDMA/core: Add a netlink command to change net namespace of rdma device
Provide an option to change the net namespace of a rdma device through a netlink command. When multiple rdma devices exists in a system, and when containers are used, this will limit rdma device visibility to a specified net namespace. An example command to change net namespace of mlx5_1 device to the previously created net namespace 'foo' is: $ ip netns add foo $ rdma dev set mlx5_1 netns foo Signed-off-by: Parav Pandit <parav@mellanox.com> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'include/uapi/rdma')
-rw-r--r--include/uapi/rdma/rdma_netlink.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/include/uapi/rdma/rdma_netlink.h b/include/uapi/rdma/rdma_netlink.h
index d49f491341f6..42a8bdc40a14 100644
--- a/include/uapi/rdma/rdma_netlink.h
+++ b/include/uapi/rdma/rdma_netlink.h
@@ -469,13 +469,17 @@ enum rdma_nldev_attr {
* either shared or exclusive among multiple net namespaces.
*/
RDMA_NLDEV_SYS_ATTR_NETNS_MODE, /* u8 */
-
/*
* Device protocol, e.g. ib, iw, usnic, roce and opa
*/
RDMA_NLDEV_ATTR_DEV_PROTOCOL, /* string */
/*
+ * File descriptor handle of the net namespace object
+ */
+ RDMA_NLDEV_NET_NS_FD, /* u32 */
+
+ /*
* Always the end
*/
RDMA_NLDEV_ATTR_MAX