Re: [PATCH v3] RDMA/ipoib: print a message if only child interface is UP

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

 



On Thu, Apr 08, 2021 at 11:32:15AM +0200, Jack Wang wrote:
> When "enhanced IPoIB" enabled for CX-5 devices, it requires
> the parent device to be UP, otherwise the child devices won't
> work.
> 
> This add a debug message to give admin a hint, if only child interface
> is UP, but parent interface is not.
> 
> Signed-off-by: Jack Wang <jinpu.wang@xxxxxxxxx>
> ---
>  drivers/infiniband/ulp/ipoib/ipoib_main.c | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c b/drivers/infiniband/ulp/ipoib/ipoib_main.c
> index e16b40c09f82..df6329abac1d 100644
> --- a/drivers/infiniband/ulp/ipoib/ipoib_main.c
> +++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c
> @@ -164,8 +164,13 @@ int ipoib_open(struct net_device *dev)
>  			dev_change_flags(cpriv->dev, flags | IFF_UP, NULL);
>  		}
>  		up_read(&priv->vlan_rwsem);
> -	}
> +	} else if (priv->parent) {
> +		struct ipoib_dev_priv *ppriv = ipoib_priv(priv->parent);
>  
> +		if (!test_bit(IPOIB_FLAG_ADMIN_UP, &ppriv->flags))
> +			ipoib_dbg(priv, "parent device %s is not up, so child device may be not functioning.\n",
> +				  ppriv->dev->name);


I personally would use stronger language than that.

Reviewed-by: Leon Romanovsky <leonro@xxxxxxxxxx>
Thanks

> +	}
>  	netif_start_queue(dev);
>  
>  	return 0;
> -- 
> 2.25.1
> 



[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