All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgg@nvidia.com>
To: Selvin Xavier <selvin.xavier@broadcom.com>
Cc: leon@kernel.org, linux-rdma@vger.kernel.org,
	andrew.gospodarek@broadcom.com,
	kalesh-anakkur.purayil@broadcom.com
Subject: Re: [PATCH v2 for-rc 5/6] RDMA/bnxt_re: synchronize the qp-handle table array
Date: Mon, 7 Oct 2024 09:28:38 -0300	[thread overview]
Message-ID: <20241007122838.GN1365916@nvidia.com> (raw)
In-Reply-To: <CA+sbYW3C_aQmTpguYahHRoy46AEo8r35Ca4RVhRKGcQ34qtDjA@mail.gmail.com>

On Mon, Oct 07, 2024 at 11:20:24AM +0530, Selvin Xavier wrote:
> On Sat, Oct 5, 2024 at 12:57 AM Jason Gunthorpe <jgg@nvidia.com> wrote:
> >
> > On Wed, Sep 18, 2024 at 08:06:00PM -0700, Selvin Xavier wrote:
> >
> > > diff --git a/drivers/infiniband/hw/bnxt_re/qplib_rcfw.c b/drivers/infiniband/hw/bnxt_re/qplib_rcfw.c
> > > index 5bef9b4..85bfedc 100644
> > > --- a/drivers/infiniband/hw/bnxt_re/qplib_rcfw.c
> > > +++ b/drivers/infiniband/hw/bnxt_re/qplib_rcfw.c
> > > @@ -634,17 +634,21 @@ static int bnxt_qplib_process_qp_event(struct bnxt_qplib_rcfw *rcfw,
> > >       case CREQ_QP_EVENT_EVENT_QP_ERROR_NOTIFICATION:
> > >               err_event = (struct creq_qp_error_notification *)qp_event;
> > >               qp_id = le32_to_cpu(err_event->xid);
> > > +             spin_lock_nested(&rcfw->tbl_lock, SINGLE_DEPTH_NESTING);
> >
> > Why would you need this lockdep annotation? tbl_lock doesn't look
> > nested into itself to me.
> bnxt_qplib_process_qp_event is always called with a spinlock
> (hwq->lock ) in the caller. i.e. bnxt_qplib_service_creq. I have used
> the nested variant because of this.

That is not what nested is for. Nested different locks are fine, you
only need nested if you are nesting the same lock

Jason

  reply	other threads:[~2024-10-07 12:28 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-19  3:05 [PATCH v2 for-rc 0/6] RDMA/bnxt_re: Bug fixes for 6.12 kernel Selvin Xavier
2024-09-19  3:05 ` [PATCH v2 for-rc 1/6] RDMA/bnxt_re: Fix a possible memory leak Selvin Xavier
2024-09-19  3:05 ` [PATCH v2 for-rc 2/6] RDMA/bnxt_re: Fix incorrect AVID type in WQE structure Selvin Xavier
2024-09-19  3:05 ` [PATCH v2 for-rc 3/6] RDMA/bnxt_re: Add a check for memory allocation Selvin Xavier
2024-09-19  3:05 ` [PATCH v2 for-rc 4/6] RDMA/bnxt_re: Fix the usage of control path spin locks Selvin Xavier
2024-09-19  3:06 ` [PATCH v2 for-rc 5/6] RDMA/bnxt_re: synchronize the qp-handle table array Selvin Xavier
2024-09-19  8:28   ` Zhu Yanjun
2024-10-04 19:27   ` Jason Gunthorpe
2024-10-07  5:50     ` Selvin Xavier
2024-10-07 12:28       ` Jason Gunthorpe [this message]
2024-10-07 18:26         ` Selvin Xavier
2024-09-19  3:06 ` [PATCH v2 for-rc 6/6] RDMA/bnxt_re: Fix the max WQEs used in Static WQE mode Selvin Xavier
2024-09-20 12:56 ` [PATCH v2 for-rc 0/6] RDMA/bnxt_re: Bug fixes for 6.12 kernel Jason Gunthorpe
2024-10-04 20:05 ` 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=20241007122838.GN1365916@nvidia.com \
    --to=jgg@nvidia.com \
    --cc=andrew.gospodarek@broadcom.com \
    --cc=kalesh-anakkur.purayil@broadcom.com \
    --cc=leon@kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=selvin.xavier@broadcom.com \
    /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 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.