aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/qedr/qedr.h
diff options
context:
space:
mode:
authorYuval Basson <ybason@marvell.com>2020-07-08 22:55:26 +0300
committerJason Gunthorpe <jgg@nvidia.com>2020-07-16 14:57:08 -0300
commitacca72e2b031b9fbb4184511072bd246a0abcebc (patch)
tree9d3ebf9327d6461bda7230d1137a809e3257b4d4 /drivers/infiniband/hw/qedr/qedr.h
parent317000b926b07c07e7f6c4032bd3344639f5eb4c (diff)
downloadlinux-acca72e2b031b9fbb4184511072bd246a0abcebc.tar.gz
RDMA/qedr: SRQ's bug fixes
QP's with the same SRQ, working on different CQs and running in parallel on different CPUs could lead to a race when maintaining the SRQ consumer count, and leads to FW running out of SRQs. Update the consumer atomically. Make sure the wqe_prod is updated after the sge_prod due to FW requirements. Fixes: 3491c9e799fb ("qedr: Add support for kernel mode SRQ's") Link: https://lore.kernel.org/r/20200708195526.31040-1-ybason@marvell.com Signed-off-by: Michal Kalderon <mkalderon@marvell.com> Signed-off-by: Yuval Basson <ybason@marvell.com> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Diffstat (limited to 'drivers/infiniband/hw/qedr/qedr.h')
-rw-r--r--drivers/infiniband/hw/qedr/qedr.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/infiniband/hw/qedr/qedr.h b/drivers/infiniband/hw/qedr/qedr.h
index fdf90ecb2699..aa332027da86 100644
--- a/drivers/infiniband/hw/qedr/qedr.h
+++ b/drivers/infiniband/hw/qedr/qedr.h
@@ -344,10 +344,10 @@ struct qedr_srq_hwq_info {
u32 wqe_prod;
u32 sge_prod;
u32 wr_prod_cnt;
- u32 wr_cons_cnt;
+ atomic_t wr_cons_cnt;
u32 num_elems;
- u32 *virt_prod_pair_addr;
+ struct rdma_srq_producers *virt_prod_pair_addr;
dma_addr_t phy_prod_pair_addr;
};