summaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/ulp/isert/ib_isert.c
diff options
context:
space:
mode:
authorGuy Shapiro <guysh@mellanox.com>2015-10-22 15:20:10 +0300
committerDoug Ledford <dledford@redhat.com>2015-10-28 12:32:48 -0400
commitfa20105e09e97e81aadf02f722c31195e4a75c84 (patch)
treebb25c580d408a2c4a96abda8c49c2751e72bfe52 /drivers/infiniband/ulp/isert/ib_isert.c
parent4be74b42a6d05a74a21362010cd3920fa17f63c7 (diff)
downloadlinux-fa20105e09e97e81aadf02f722c31195e4a75c84.tar.gz
linux-fa20105e09e97e81aadf02f722c31195e4a75c84.tar.bz2
linux-fa20105e09e97e81aadf02f722c31195e4a75c84.zip
IB/cma: Add support for network namespaces
Add support for network namespaces in the ib_cma module. This is accomplished by: 1. Adding network namespace parameter for rdma_create_id. This parameter is used to populate the network namespace field in rdma_id_private. rdma_create_id keeps a reference on the network namespace. 2. Using the network namespace from the rdma_id instead of init_net inside of ib_cma, when listening on an ID and when looking for an ID for an incoming request. 3. Decrementing the reference count for the appropriate network namespace when calling rdma_destroy_id. In order to preserve the current behavior init_net is passed when calling from other modules. Signed-off-by: Guy Shapiro <guysh@mellanox.com> Signed-off-by: Haggai Eran <haggaie@mellanox.com> Signed-off-by: Yotam Kenneth <yotamke@mellanox.com> Signed-off-by: Shachar Raindel <raindel@mellanox.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/ulp/isert/ib_isert.c')
-rw-r--r--drivers/infiniband/ulp/isert/ib_isert.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/ulp/isert/ib_isert.c b/drivers/infiniband/ulp/isert/ib_isert.c
index b58ac25ce19d..7d41c9d6d6bf 100644
--- a/drivers/infiniband/ulp/isert/ib_isert.c
+++ b/drivers/infiniband/ulp/isert/ib_isert.c
@@ -3096,7 +3096,7 @@ isert_setup_id(struct isert_np *isert_np)
sa = (struct sockaddr *)&np->np_sockaddr;
isert_dbg("ksockaddr: %p, sa: %p\n", &np->np_sockaddr, sa);
- id = rdma_create_id(isert_cma_handler, isert_np,
+ id = rdma_create_id(&init_net, isert_cma_handler, isert_np,
RDMA_PS_TCP, IB_QPT_RC);
if (IS_ERR(id)) {
isert_err("rdma_create_id() failed: %ld\n", PTR_ERR(id));