From: Shachar Raindel <raindel@mellanox.com>
To: roland@kernel.org, sean.hefty@intel.com
Cc: linux-rdma@vger.kernel.org, netdev@vger.kernel.org,
liranl@mellanox.com, guysh@mellanox.com, haggaie@mellanox.com,
yotamke@mellanox.com, raindel@mellanox.com
Subject: [PATCH v1 10/10] IB/ucm: Add partial support for network namespaces
Date: Wed, 11 Feb 2015 17:06:44 +0200 [thread overview]
Message-ID: <1423667204-8807-11-git-send-email-raindel@mellanox.com> (raw)
In-Reply-To: <1423667204-8807-1-git-send-email-raindel@mellanox.com>
It is impossible to completely support network namespaces for UCM, as
we cannot identify the target IPoIB device. However, we add support
which will work if the user is following the IB-Spec Annex 11 (RDMA IP
CM Services) with the service ID and private data formatting.
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: Guy Shapiro <guysh@mellanox.com>
---
drivers/infiniband/core/ucm.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/infiniband/core/ucm.c b/drivers/infiniband/core/ucm.c
index 9604ab0..4244210 100644
--- a/drivers/infiniband/core/ucm.c
+++ b/drivers/infiniband/core/ucm.c
@@ -45,6 +45,7 @@
#include <linux/idr.h>
#include <linux/mutex.h>
#include <linux/slab.h>
+#include <linux/nsproxy.h>
#include <asm/uaccess.h>
@@ -490,7 +491,7 @@ static ssize_t ib_ucm_create_id(struct ib_ucm_file *file,
ctx->uid = cmd.uid;
ctx->cm_id = ib_create_cm_id(file->device->ib_dev,
ib_ucm_event_handler, ctx,
- &init_net);
+ current->nsproxy->net_ns);
if (IS_ERR(ctx->cm_id)) {
result = PTR_ERR(ctx->cm_id);
goto err1;
--
1.7.11.2
next prev parent reply other threads:[~2015-02-11 15:11 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-11 15:06 [PATCH v1 00/10] Add network namespace support in the RDMA-CM Shachar Raindel
2015-02-11 15:06 ` [PATCH v1 01/10] IB/addr: Pass network namespace as a parameter Shachar Raindel
2015-02-11 15:06 ` [PATCH v1 02/10] IB/core: Pass network namespace as a parameter to relevant functions Shachar Raindel
2015-02-11 15:06 ` [PATCH v1 04/10] IB/ipoib: Return IPoIB devices as possible matches to get_net_device_by_port_pkey_ip Shachar Raindel
2015-02-11 15:06 ` [PATCH v1 05/10] IB/cm,cma: Move RDMA IP CM private-data parsing code from ib_cma to ib_cm Shachar Raindel
2015-02-11 15:06 ` [PATCH v1 06/10] IB/cm: Add network namespace support Shachar Raindel
2015-02-11 15:06 ` [PATCH v1 07/10] IB/cma: Separate port allocation to network namespaces Shachar Raindel
2015-02-11 15:06 ` [PATCH v1 08/10] IB/cma: Add support for " Shachar Raindel
2015-02-11 15:06 ` Shachar Raindel [this message]
[not found] ` <1423667204-8807-1-git-send-email-raindel-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2015-02-11 15:06 ` [PATCH v1 03/10] IB/core: Find the network namespace matching connection parameters Shachar Raindel
2015-02-11 15:06 ` [PATCH v1 09/10] IB/ucma: Take the network namespace from the process Shachar Raindel
2015-02-16 8:10 ` [PATCH v1 00/10] Add network namespace support in the RDMA-CM Shachar Raindel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1423667204-8807-11-git-send-email-raindel@mellanox.com \
--to=raindel@mellanox.com \
--cc=guysh@mellanox.com \
--cc=haggaie@mellanox.com \
--cc=linux-rdma@vger.kernel.org \
--cc=liranl@mellanox.com \
--cc=netdev@vger.kernel.org \
--cc=roland@kernel.org \
--cc=sean.hefty@intel.com \
--cc=yotamke@mellanox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox