RDMA/core: Support netlink commands in non init_net net namespaces
authorParav Pandit <parav@mellanox.com>
Tue, 23 Jul 2019 07:02:05 +0000 (10:02 +0300)
committerJason Gunthorpe <jgg@mellanox.com>
Thu, 25 Jul 2019 17:12:41 +0000 (14:12 -0300)
commit1d2fedd8561dc469a7503855ee602f4bb3eccfa7
treeca8ca8b8343497506abfc3c2d5942195f9e7aa54
parent913df8c35322dcd15d993cabc8cc92814dee3d50
RDMA/core: Support netlink commands in non init_net net namespaces

Now that IB core supports RDMA device binding with specific net namespace,
enable IB core to accept netlink commands in non init_net namespaces.

This is done by having per net namespace netlink socket.

At present only netlink device handling client RDMA_NL_NLDEV supports
device handling in multiple net namespaces.  Hence do not accept netlink
messages for other clients in non init_net net namespaces.

Link: https://lore.kernel.org/r/20190723070205.6247-1-leon@kernel.org
Signed-off-by: Parav Pandit <parav@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Reviewed-by: Jason Gunthorpe <jgg@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/core/addr.c
drivers/infiniband/core/core_priv.h
drivers/infiniband/core/device.c
drivers/infiniband/core/iwpm_msg.c
drivers/infiniband/core/iwpm_util.c
drivers/infiniband/core/netlink.c
drivers/infiniband/core/nldev.c
drivers/infiniband/core/sa_query.c
include/rdma/rdma_netlink.h