linux-rdma.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Somnath Kotur <somnath.kotur-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>
To: Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH 5/8] bnxt_re: Fix race between the netdev register and unregister events
Date: Mon, 25 Sep 2017 08:31:47 +0530	[thread overview]
Message-ID: <CAOBf=mvwnA2M36j89v934bBgsrHaharikonA-bdzGyVn7O3djQ@mail.gmail.com> (raw)
In-Reply-To: <1506102922.5172.19.camel-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>

On Fri, Sep 22, 2017 at 11:25 PM, Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> wrote:
>
> On Thu, 2017-08-31 at 09:27 +0530, Somnath Kotur wrote:
> > diff --git a/drivers/infiniband/hw/bnxt_re/bnxt_re.h
> > b/drivers/infiniband/hw/bnxt_re/bnxt_re.h
> > index b3ad37f..a25f9d2 100644
> > --- a/drivers/infiniband/hw/bnxt_re/bnxt_re.h
> > +++ b/drivers/infiniband/hw/bnxt_re/bnxt_re.h
> > @@ -93,11 +93,13 @@ struct bnxt_re_dev {
> >         struct ib_device                ibdev;
> >         struct list_head                list;
> >         unsigned long                   flags;
> > -#define BNXT_RE_FLAG_NETDEV_REGISTERED 0
> > -#define BNXT_RE_FLAG_IBDEV_REGISTERED  1
> > -#define BNXT_RE_FLAG_GOT_MSIX          2
> > -#define BNXT_RE_FLAG_RCFW_CHANNEL_EN   8
> > -#define BNXT_RE_FLAG_QOS_WORK_REG      16
> > +#define BNXT_RE_FLAG_NETDEV_REGISTERED         0
> > +#define BNXT_RE_FLAG_IBDEV_REGISTERED          1
> > +#define BNXT_RE_FLAG_GOT_MSIX                  2
> > +#define BNXT_RE_FLAG_HAVE_L2_REF               3
> > +#define BNXT_RE_FLAG_RCFW_CHANNEL_EN           4
> > +#define BNXT_RE_FLAG_QOS_WORK_REG              5
> > +#define BNXT_RE_FLAG_TASK_IN_PROG              6
> >         struct net_device               *netdev;
>
> So, this is making two changes in once and one of the changes is not
> documented.  In particular, it looks like the usage of your flags
> elements was originally the actual value of 1 << bit, which is the
> wrong thing to pass to the *_bit() operations that want a bit number.
> So you're both adding a new used bit in your flags, but also changing
> your flags to be better numbered for use with the *_bit operations.  I
> did a quick check and the BNXT_RE_FLAGS* items are never used without
> using the bit operations, so this change is safe.  I'm going to update
> the commit log when I take this to make that clear.  Generally though,
> this should have been two patches.
Yes, the intention was to fix the incorrect usage and yes it should
have found a mention in the commit log, missed it somehow.
Thanks for taking care of that Doug

-Som


>
>
> --
> Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
>     GPG KeyID: B826A3330E572FDD
>     Key fingerprint = AE6B 1BDA 122B 23B4 265B  1274 B826 A333 0E57 2FDD
>
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2017-09-25  3:01 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-31  3:57 [PATCH 0/8] RDMA/bnxt_re: Misc fixes for bnxt_re Somnath Kotur
     [not found] ` <20170831035735.19595-1-somnath.kotur-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>
2017-08-31  3:57   ` [PATCH 1/8] bnxt_re: Fix update of qplib_qp.mtu when modified Somnath Kotur
2017-08-31  3:57   ` [PATCH 2/8] bnxt_re: Stop issuing further cmds to FW once a cmd times out Somnath Kotur
2017-08-31  3:57   ` [PATCH 3/8] bnxt_re: Fix compare and swap atomic operands Somnath Kotur
2017-08-31  3:57   ` [PATCH 4/8] bnxt_re: Free up devices in module_exit path Somnath Kotur
     [not found]     ` <20170831035735.19595-5-somnath.kotur-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>
2017-09-13 17:42       ` Leon Romanovsky
     [not found]         ` <20170913174255.GV3405-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
2017-09-14  3:53           ` Somnath Kotur
     [not found]             ` <CAOBf=mupXRmhNoZOfwhr-Ho7_y-Kts4XmgtHgpMQVosmj=Hpcw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-09-14 13:04               ` Leon Romanovsky
2017-08-31  3:57   ` [PATCH 5/8] bnxt_re: Fix race between the netdev register and unregister events Somnath Kotur
     [not found]     ` <20170831035735.19595-6-somnath.kotur-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>
2017-09-22 17:55       ` Doug Ledford
     [not found]         ` <1506102922.5172.19.camel-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2017-09-25  3:01           ` Somnath Kotur [this message]
2017-08-31  3:57   ` [PATCH 6/8] bnxt_re: Remove RTNL lock dependency in bnxt_re_query_port Somnath Kotur
2017-08-31  3:57   ` [PATCH 7/8] bnxt_re: Fix memory leak in FRMR path Somnath Kotur
2017-08-31  3:57   ` [PATCH 8/8] bnxt_re: Don't issue cmd to delete GID for QP1 GID entry before the QP is destroyed Somnath Kotur
2017-09-22 18:00   ` [PATCH 0/8] RDMA/bnxt_re: Misc fixes for bnxt_re Doug Ledford

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='CAOBf=mvwnA2M36j89v934bBgsrHaharikonA-bdzGyVn7O3djQ@mail.gmail.com' \
    --to=somnath.kotur-dy08kvg/lbpwk0htik3j/w@public.gmane.org \
    --cc=dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).