public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
From: Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: Bart Van Assche <bart.vanassche-Sjgp3cTcYWE@public.gmane.org>,
	Jason Gunthorpe <jgg-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH v2 4/4] IB/srp: Add RDMA/CM support
Date: Mon, 08 Jan 2018 15:53:41 -0500	[thread overview]
Message-ID: <1515444821.3403.92.camel@redhat.com> (raw)
In-Reply-To: <20180108185549.30377-5-bart.vanassche-Sjgp3cTcYWE@public.gmane.org>

[-- Attachment #1: Type: text/plain, Size: 1419 bytes --]

On Mon, 2018-01-08 at 10:55 -0800, Bart Van Assche wrote:
> Since the SRP_LOGIN_REQ defined in the SRP standard is larger than
> what fits in the RDMA/CM login request private data, introduce a new
> login request format for the RDMA/CM.
> 
> Note: since srp_daemon and ibsrpdm rely on the subnet manager and
> since there is no equivalent of the IB subnet manager in non-IB
> networks, login has to be performed manually for non-IB networks.
> 

[ snip ]

> @@ -3390,18 +3757,29 @@ static ssize_t srp_create_target(struct device *dev,
>  	if (ret < 0)
>  		goto put;
>  
> -	ret = srp_parse_options(buf, target);
> +	ret = srp_parse_options(current->nsproxy->net_ns, buf, target);

OK, so you make the parse options stuff pass around the current
process' namespace, but earlier you have this:

> +static int srp_new_rdma_cm_id(struct srp_rdma_ch *ch)
> +{
> +	struct srp_target_port *target = ch->target;
> +	struct rdma_cm_id *new_cm_id;
> +	char src_addr[64], dst_addr[64];
> +	int ret;
> +
> +	new_cm_id = rdma_create_id(&init_net, srp_rdma_cm_handler,
ch,
> +				   RDMA_PS_TCP, IB_QPT_RC);

which clearly drops whatever namespace we are supposed to be in and
creates new cm_ids in the init namespace.

-- 
Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
    GPG KeyID: B826A3330E572FDD
    Key fingerprint = AE6B 1BDA 122B 23B4 265B  1274 B826 A333 0E57 2FDD

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  parent reply	other threads:[~2018-01-08 20:53 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-08 18:55 [PATCH v2 0/4] IB/srp: Add RDMA/CM support Bart Van Assche
     [not found] ` <20180108185549.30377-1-bart.vanassche-Sjgp3cTcYWE@public.gmane.org>
2018-01-08 18:55   ` [PATCH v2 1/4] IB/srp: Use kstrtoull() instead of simple_strtoull() Bart Van Assche
2018-01-08 18:55   ` [PATCH v2 2/4] IB/srp: Make the path record query error message more informative Bart Van Assche
2018-01-08 18:55   ` [PATCH v2 3/4] IB/srp: Refactor srp_send_req() Bart Van Assche
2018-01-08 18:55   ` [PATCH v2 4/4] IB/srp: Add RDMA/CM support Bart Van Assche
     [not found]     ` <20180108185549.30377-5-bart.vanassche-Sjgp3cTcYWE@public.gmane.org>
2018-01-08 20:53       ` Doug Ledford [this message]
     [not found]         ` <1515444821.3403.92.camel-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2018-01-08 21:20           ` Bart Van Assche

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=1515444821.3403.92.camel@redhat.com \
    --to=dledford-h+wxahxf7alqt0dzr+alfa@public.gmane.org \
    --cc=bart.vanassche-Sjgp3cTcYWE@public.gmane.org \
    --cc=jgg-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    /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