RE: [EXTERNAL] Re: [Patch v7 5/5] RDMA/mana_ib: Send event to qp

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> -----Original Message-----
> From: Jason Gunthorpe <jgg@xxxxxxxx>
> Sent: Monday, October 23, 2023 11:24 AM
> To: sharmaajay@xxxxxxxxxxxxxxxxx
> Cc: Long Li <longli@xxxxxxxxxxxxx>; Leon Romanovsky <leon@xxxxxxxxxx>;
> Dexuan Cui <decui@xxxxxxxxxxxxx>; Wei Liu <wei.liu@xxxxxxxxxx>; David S.
> Miller <davem@xxxxxxxxxxxxx>; Eric Dumazet <edumazet@xxxxxxxxxx>;
> Jakub Kicinski <kuba@xxxxxxxxxx>; Paolo Abeni <pabeni@xxxxxxxxxx>; linux-
> rdma@xxxxxxxxxxxxxxx; linux-hyperv@xxxxxxxxxxxxxxx;
> netdev@xxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx; Ajay Sharma
> <sharmaajay@xxxxxxxxxxxxx>
> 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@xxxxxxxxxxxxxxxxx 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





[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux