All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3] RDMA/ipoib: print a message if only child interface is UP
@ 2021-04-08  9:32 Jack Wang
  2021-04-08  9:48 ` Leon Romanovsky
  2021-04-13 23:08 ` Jason Gunthorpe
  0 siblings, 2 replies; 4+ messages in thread
From: Jack Wang @ 2021-04-08  9:32 UTC (permalink / raw)
  To: linux-rdma; +Cc: bvanassche, leon, dledford, jgg

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@ionos.com>
---
 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);
+	}
 	netif_start_queue(dev);
 
 	return 0;
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH v3] RDMA/ipoib: print a message if only child interface is UP
  2021-04-08  9:32 [PATCH v3] RDMA/ipoib: print a message if only child interface is UP Jack Wang
@ 2021-04-08  9:48 ` Leon Romanovsky
  2021-04-08 10:11   ` Jinpu Wang
  2021-04-13 23:08 ` Jason Gunthorpe
  1 sibling, 1 reply; 4+ messages in thread
From: Leon Romanovsky @ 2021-04-08  9:48 UTC (permalink / raw)
  To: Jack Wang; +Cc: linux-rdma, bvanassche, dledford, jgg

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@ionos.com>
> ---
>  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@nvidia.com>
Thanks

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v3] RDMA/ipoib: print a message if only child interface is UP
  2021-04-08  9:48 ` Leon Romanovsky
@ 2021-04-08 10:11   ` Jinpu Wang
  0 siblings, 0 replies; 4+ messages in thread
From: Jinpu Wang @ 2021-04-08 10:11 UTC (permalink / raw)
  To: Leon Romanovsky
  Cc: linux-rdma, Bart Van Assche, Doug Ledford, Jason Gunthorpe

On Thu, Apr 8, 2021 at 11:48 AM Leon Romanovsky <leon@kernel.org> wrote:
>
> 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@ionos.com>
> > ---
> >  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.
As there is configuration like on old CX-2/CX-3 HCA, it works fine, so
I use such language.
>
> Reviewed-by: Leon Romanovsky <leonro@nvidia.com>
> Thanks
Thanks for the review!
>
> > +     }
> >       netif_start_queue(dev);
> >
> >       return 0;
> > --
> > 2.25.1
> >

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v3] RDMA/ipoib: print a message if only child interface is UP
  2021-04-08  9:32 [PATCH v3] RDMA/ipoib: print a message if only child interface is UP Jack Wang
  2021-04-08  9:48 ` Leon Romanovsky
@ 2021-04-13 23:08 ` Jason Gunthorpe
  1 sibling, 0 replies; 4+ messages in thread
From: Jason Gunthorpe @ 2021-04-13 23:08 UTC (permalink / raw)
  To: Jack Wang; +Cc: linux-rdma, bvanassche, leon, dledford

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@ionos.com>
> Reviewed-by: Leon Romanovsky <leonro@nvidia.com>
> ---
>  drivers/infiniband/ulp/ipoib/ipoib_main.c | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)

Applied to for-next, thanks

Jason

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-04-13 23:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-08  9:32 [PATCH v3] RDMA/ipoib: print a message if only child interface is UP Jack Wang
2021-04-08  9:48 ` Leon Romanovsky
2021-04-08 10:11   ` Jinpu Wang
2021-04-13 23:08 ` Jason Gunthorpe

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.