diff options
author | Parav Pandit <parav@mellanox.com> | 2019-04-15 13:22:51 +0300 |
---|---|---|
committer | Jason Gunthorpe <jgg@mellanox.com> | 2019-04-22 14:44:58 -0300 |
commit | 2e5b8a01165e4fe57ec396961daae38713edce35 (patch) | |
tree | 7f2d011cac2433cb3fc8692e9e05a74a39a55e95 /drivers/infiniband/core/core_priv.h | |
parent | RDMA/core: Introduce a helper function to change net namespace of rdma device (diff) | |
download | linux-dev-2e5b8a01165e4fe57ec396961daae38713edce35.tar.xz linux-dev-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 'drivers/infiniband/core/core_priv.h')
-rw-r--r-- | drivers/infiniband/core/core_priv.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/infiniband/core/core_priv.h b/drivers/infiniband/core/core_priv.h index 5b0ffbb6b3c9..d4dd360769cb 100644 --- a/drivers/infiniband/core/core_priv.h +++ b/drivers/infiniband/core/core_priv.h @@ -350,4 +350,6 @@ int ib_port_register_module_stat(struct ib_device *device, u8 port_num, const char *name); void ib_port_unregister_module_stat(struct kobject *kobj); +int ib_device_set_netns_put(struct sk_buff *skb, + struct ib_device *dev, u32 ns_fd); #endif /* _CORE_PRIV_H */ |