All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ajay Sharma <sharmaajay@microsoft.com>
To: Jason Gunthorpe <jgg@ziepe.ca>,
	"sharmaajay@linuxonhyperv.com" <sharmaajay@linuxonhyperv.com>
Cc: Long Li <longli@microsoft.com>, Leon Romanovsky <leon@kernel.org>,
	Dexuan Cui <decui@microsoft.com>, Wei Liu <wei.liu@kernel.org>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	"linux-rdma@vger.kernel.org" <linux-rdma@vger.kernel.org>,
	"linux-hyperv@vger.kernel.org" <linux-hyperv@vger.kernel.org>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Ajay Sharma <sharmaajay@microsoft.com>
Subject: RE: [EXTERNAL] Re: [Patch v7 5/5] RDMA/mana_ib: Send event to qp
Date: Wed, 25 Oct 2023 19:59:18 +0000	[thread overview]
Message-ID: <MN0PR21MB36067E337A53C3BAF8B648E5D6DEA@MN0PR21MB3606.namprd21.prod.outlook.com> (raw)
In-Reply-To: <20231023182332.GL691768@ziepe.ca>


> -----Original Message-----
> From: Jason Gunthorpe <jgg@ziepe.ca>
> Sent: Monday, October 23, 2023 11:24 AM
> To: sharmaajay@linuxonhyperv.com
> Cc: Long Li <longli@microsoft.com>; Leon Romanovsky <leon@kernel.org>;
> Dexuan Cui <decui@microsoft.com>; Wei Liu <wei.liu@kernel.org>; David S.
> Miller <davem@davemloft.net>; Eric Dumazet <edumazet@google.com>;
> Jakub Kicinski <kuba@kernel.org>; Paolo Abeni <pabeni@redhat.com>; linux-
> rdma@vger.kernel.org; linux-hyperv@vger.kernel.org;
> netdev@vger.kernel.org; linux-kernel@vger.kernel.org; Ajay Sharma
> <sharmaajay@microsoft.com>
> Subject: [EXTERNAL] Re: [Patch v7 5/5] RDMA/mana_ib: Send event to qp
> 
> On Mon, Oct 16, 2023 at 03:12:02PM -0700,
> sharmaajay@linuxonhyperv.com wrote:
> 
> > diff --git a/drivers/infiniband/hw/mana/qp.c
> > b/drivers/infiniband/hw/mana/qp.c index ef3275ac92a0..19fae28985c3
> > 100644
> > --- a/drivers/infiniband/hw/mana/qp.c
> > +++ b/drivers/infiniband/hw/mana/qp.c
> > @@ -210,6 +210,8 @@ static int mana_ib_create_qp_rss(struct ib_qp
> *ibqp, struct ib_pd *pd,
> >  		wq->id = wq_spec.queue_index;
> >  		cq->id = cq_spec.queue_index;
> >
> > +		xa_store(&mib_dev->rq_to_qp_lookup_table, wq->id, qp,
> GFP_KERNEL);
> > +
> 
> A store with no erase?
> 
> A load with no locking?
> 
> This can't be right
> 
> Jason

This wq->id is assigned from the HW and is guaranteed to be unique. May be I am not following why do we need a lock here. Can you please explain ?
Ajay

  reply	other threads:[~2023-10-25 19:59 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-16 22:11 [Patch v7 0/5] RDMA/mana_ib sharmaajay
2023-10-16 22:11 ` [Patch v7 1/5] RDMA/mana_ib: Rename all mana_ib_dev type variables to mib_dev sharmaajay
2023-10-23 18:14   ` Jason Gunthorpe
2023-10-27 22:00     ` Long Li
2023-10-16 22:11 ` [Patch v7 2/5] RDMA/mana_ib: Register Mana IB device with Management SW sharmaajay
2023-10-23 18:19   ` Jason Gunthorpe
2023-10-27 21:59     ` Long Li
2023-10-16 22:12 ` [Patch v7 3/5] RDMA/mana_ib: Create adapter and Add error eq sharmaajay
2023-10-23 18:21   ` Jason Gunthorpe
2023-10-16 22:12 ` [Patch v7 4/5] RDMA/mana_ib: Query adapter capabilities sharmaajay
2023-10-17  4:31   ` Kalesh Anakkur Purayil
     [not found]     ` <87330A78-CDF0-4B49-8192-DBDF006DB8A7@microsoft.com>
2023-10-18  4:10       ` [EXTERNAL] " Kalesh Anakkur Purayil
     [not found]         ` <MN0PR21MB360603822A844951D3400C1AD6D5A@MN0PR21MB3606.namprd21.prod.outlook.com>
2023-10-18 17:25           ` Kalesh Anakkur Purayil
2023-10-16 22:12 ` [Patch v7 5/5] RDMA/mana_ib: Send event to qp sharmaajay
2023-10-23 18:23   ` Jason Gunthorpe
2023-10-25 19:59     ` Ajay Sharma [this message]
2023-10-27 21:35       ` [EXTERNAL] " Long Li
2023-10-30 12:42         ` 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=MN0PR21MB36067E337A53C3BAF8B648E5D6DEA@MN0PR21MB3606.namprd21.prod.outlook.com \
    --to=sharmaajay@microsoft.com \
    --cc=davem@davemloft.net \
    --cc=decui@microsoft.com \
    --cc=edumazet@google.com \
    --cc=jgg@ziepe.ca \
    --cc=kuba@kernel.org \
    --cc=leon@kernel.org \
    --cc=linux-hyperv@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=longli@microsoft.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=sharmaajay@linuxonhyperv.com \
    --cc=wei.liu@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
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.