]> asedeno.scripts.mit.edu Git - linux.git/commit
RDMA/core: Add a netlink command to change net namespace of rdma device
authorParav Pandit <parav@mellanox.com>
Mon, 15 Apr 2019 10:22:51 +0000 (13:22 +0300)
committerJason Gunthorpe <jgg@mellanox.com>
Mon, 22 Apr 2019 17:44:58 +0000 (14:44 -0300)
commit2e5b8a01165e4fe57ec396961daae38713edce35
tree7f2d011cac2433cb3fc8692e9e05a74a39a55e95
parentdecbc7a6b0073f55b200d80a3ecf5a5e205edd06
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>
drivers/infiniband/core/core_priv.h
drivers/infiniband/core/device.c
drivers/infiniband/core/nldev.c
include/uapi/rdma/rdma_netlink.h