Re: [PATCH rdma-next 6/7] IB/ipoib: Read net namespace of parent rdma device and set for netdev

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

 



On Tue, Dec 18, 2018 at 02:28:35PM +0200, Leon Romanovsky wrote:
> From: Parav Pandit <parav@xxxxxxxxxxxx>
> 
> When IPoIB netdevice is created for a rdma device, use the net
> namespace of rdma device for which a given IPoIB netdevice is created.
> 
> Signed-off-by: Parav Pandit <parav@xxxxxxxxxxxx>
> Signed-off-by: Leon Romanovsky <leonro@xxxxxxxxxxxx>
>  drivers/infiniband/ulp/ipoib/ipoib_main.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c b/drivers/infiniband/ulp/ipoib/ipoib_main.c
> index 5224c42f9d08..2ff0f6651f04 100644
> +++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c
> @@ -2433,6 +2433,7 @@ static struct net_device *ipoib_add_port(const char *format,
>  		return ndev;
>  	}
>  	priv = ipoib_priv(ndev);
> +	dev_net_set(ndev, rdma_dev_net(hca));

I don't think it is appropriate for ULPs to auto-setup, that should be
historical behavior for the init_net only.

Orchestration will get very confused if it moves a RDMA device and
eventually IPoIB devices it has no idea about, and can't control (ie
to set the right pkey), appear in the namespace.

Jason



[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