From: "ira.weiny" <ira.weiny@intel.com>
To: Haggai Eran <haggaie@mellanox.com>
Cc: Doug Ledford <dledford@redhat.com>,
Roland Dreier <roland@kernel.org>,
Sean Hefty <sean.hefty@intel.com>,
linux-rdma@vger.kernel.org, netdev@vger.kernel.org,
Liran Liss <liranl@mellanox.com>,
Guy Shapiro <guysh@mellanox.com>,
Shachar Raindel <raindel@mellanox.com>,
Yotam Kenneth <yotamke@mellanox.com>
Subject: Re: [PATCH v2 11/11] IB/ucm: Add partial support for network namespaces
Date: Mon, 20 Apr 2015 19:46:29 -0400 [thread overview]
Message-ID: <20150420234629.GD1409@phlsvsds.ph.intel.com> (raw)
In-Reply-To: <1429520622-10303-12-git-send-email-haggaie@mellanox.com>
On Mon, Apr 20, 2015 at 12:03:42PM +0300, Haggai Eran wrote:
> From: Shachar Raindel <raindel@mellanox.com>
>
> It is impossible to completely support network namespaces for UCM, as
> we cannot identify the target IPoIB device.
>
As Jasons said it seems like the use of namespaces should be limited to the
RDMA CM layer. If so I _think_ this patch would not be needed?
Ira
>
> 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 9604ab068984..424421091dae 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
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2015-04-20 23:46 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-20 9:03 [PATCH v2 00/11] Add network namespace support in the RDMA-CM Haggai Eran
[not found] ` <1429520622-10303-1-git-send-email-haggaie-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2015-04-20 9:03 ` [PATCH v2 01/11] RDMA/CMA: Mark IPv4 addresses correctly when the listener is IPv6 Haggai Eran
[not found] ` <1429520622-10303-2-git-send-email-haggaie-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2015-04-20 16:41 ` Jason Gunthorpe
[not found] ` <20150420164140.GC7676-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2015-04-20 18:38 ` Or Gerlitz
2015-04-20 20:01 ` Jason Gunthorpe
[not found] ` <20150420200111.GA32449-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2015-04-21 10:15 ` Haggai Eran
[not found] ` <5536232F.3050707-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2015-04-22 11:26 ` Haggai Eran
2015-04-22 17:29 ` Jason Gunthorpe
[not found] ` <CAJ3xEMgKFdr68Qt0vNCaf1p4YjPK2KUSn2FdtQVP0SZQ+Y7atg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-04-21 5:18 ` Shachar Raindel
2015-04-20 9:03 ` [PATCH v2 02/11] IB/addr: Pass network namespace as a parameter Haggai Eran
[not found] ` <1429520622-10303-3-git-send-email-haggaie-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2015-04-20 17:09 ` Jason Gunthorpe
[not found] ` <20150420170925.GE7676-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2015-04-21 10:29 ` Haggai Eran
2015-04-20 22:05 ` Doug Ledford
[not found] ` <1429567530.45956.31.camel-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2015-04-21 10:34 ` Haggai Eran
2015-04-20 9:03 ` [PATCH v2 04/11] IB/core: Find the network namespace matching connection parameters Haggai Eran
2015-04-20 9:03 ` [PATCH v2 06/11] IB/cm, cma: Move RDMA IP CM private-data parsing code from ib_cma to ib_cm Haggai Eran
[not found] ` <1429520622-10303-7-git-send-email-haggaie-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2015-04-20 23:29 ` ira.weiny
2015-04-20 9:03 ` [PATCH v2 08/11] IB/cma: Separate port allocation to network namespaces Haggai Eran
2015-04-20 9:03 ` [PATCH v2 09/11] IB/cma: Add support for " Haggai Eran
2015-04-20 9:03 ` [PATCH v2 11/11] IB/ucm: Add partial " Haggai Eran
2015-04-20 23:46 ` ira.weiny [this message]
2015-04-20 14:53 ` [PATCH v2 00/11] Add network namespace support in the RDMA-CM Steve Wise
2015-04-21 6:36 ` Haggai Eran
[not found] ` <5535EFE9.3000106-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2015-04-21 14:11 ` Steve Wise
[not found] ` <55365AAD.6020100-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org>
2015-04-21 14:21 ` Haggai Eran
2015-04-20 9:03 ` [PATCH v2 03/11] IB/core: Pass network namespace as a parameter to relevant functions Haggai Eran
2015-04-20 9:03 ` [PATCH v2 05/11] IB/ipoib: Return IPoIB devices as possible matches to get_net_device_by_port_pkey_ip Haggai Eran
2015-04-20 23:09 ` ira.weiny
2015-04-20 9:03 ` [PATCH v2 07/11] IB/cm: Add network namespace support Haggai Eran
[not found] ` <1429520622-10303-8-git-send-email-haggaie-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2015-04-20 17:06 ` Jason Gunthorpe
[not found] ` <20150420170659.GD7676-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2015-04-20 23:35 ` ira.weiny
[not found] ` <55363D93.10706@mellanox.com>
[not found] ` <55363D93.10706-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2015-04-21 15:54 ` Jason Gunthorpe
2015-04-21 11:59 ` Haggai Eran
2015-04-20 9:03 ` [PATCH v2 10/11] IB/ucma: Take the network namespace from the process Haggai Eran
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=20150420234629.GD1409@phlsvsds.ph.intel.com \
--to=ira.weiny@intel.com \
--cc=dledford@redhat.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=raindel@mellanox.com \
--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;
as well as URLs for NNTP newsgroup(s).