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 --- a/drivers/infiniband/ulp/ipoib/ipoib_main.c +++ 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)); INIT_IB_EVENT_HANDLER(&priv->event_handler, priv->ca, ipoib_event); -- 2.19.1