Linux-RDMA Archive on lore.kernel.org
 help / color / Atom feed
From: Jinpu Wang <jinpu.wang@ionos.com>
To: Leon Romanovsky <leon@kernel.org>
Cc: linux-rdma@vger.kernel.org, Bart Van Assche <bvanassche@acm.org>,
	Doug Ledford <dledford@redhat.com>,
	Jason Gunthorpe <jgg@ziepe.ca>
Subject: Re: [PATCH v3] RDMA/ipoib: print a message if only child interface is UP
Date: Thu, 8 Apr 2021 12:11:48 +0200
Message-ID: <CAMGffEmF+khz=Jgn8PtNMdBQ__rLocVf2oY_8WwmvEGnQ=rUGQ@mail.gmail.com> (raw)
In-Reply-To: <YG7RbOo/N1TeoqJB@unreal>

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
> >

  reply index

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-08  9:32 Jack Wang
2021-04-08  9:48 ` Leon Romanovsky
2021-04-08 10:11   ` Jinpu Wang [this message]
2021-04-13 23:08 ` Jason Gunthorpe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAMGffEmF+khz=Jgn8PtNMdBQ__rLocVf2oY_8WwmvEGnQ=rUGQ@mail.gmail.com' \
    --to=jinpu.wang@ionos.com \
    --cc=bvanassche@acm.org \
    --cc=dledford@redhat.com \
    --cc=jgg@ziepe.ca \
    --cc=leon@kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Linux-RDMA Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-rdma/0 linux-rdma/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-rdma linux-rdma/ https://lore.kernel.org/linux-rdma \
		linux-rdma@vger.kernel.org
	public-inbox-index linux-rdma

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-rdma


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git