From: Leon Romanovsky <leonro@xxxxxxxxxxxx> >From Parav, Changelog: v0->v1: - Addressed comments from Jason. - Added accidentally removed xa_erase - Moved free_netdevs() out of disable_device for wider use - Replace refcount get/put from add_compat_devs with lock assert - Added ibdev->dev get/put to hold on to device while net ns delete - Corrected comments in __rdma_dev_change_netns for rename op This series introduces a netlink command to change net namespace of a rdma device. It performs small device disable enable sequence to ensure that there is no active traffic when device moves to new namespace. This operation needs to synchronize with device rename and device unregistration. This is protected using recently introduced unregistration mutex. When net namespace is deleted, all rdma devices residing in such net namespace are moved back to default init_net namespace. Thanks Parav Pandit (3): RDMA/core: Avoid freeing netdevs in disable_device() RDMA/core: Introduce a helper function to change net namespace of rdma device RDMA/core: Add netlink command to change net namespace of rdma device drivers/infiniband/core/core_priv.h | 3 + drivers/infiniband/core/device.c | 158 +++++++++++++++++++++++++++- drivers/infiniband/core/nldev.c | 12 +++ include/uapi/rdma/rdma_netlink.h | 4 + 4 files changed, 174 insertions(+), 3 deletions(-) -- 2.20.1