Re: [PATCH v2 4/4] IB/srp: Add RDMA/CM support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
    GPG KeyID: B826A3330E572FDD
    Key fingerprint = AE6B 1BDA 122B 23B4 265B  1274 B826 A333 0E57 2FDD

Attachment: signature.asc
Description: This is a digitally signed message part


[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux