summaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/sw/siw/siw.h
diff options
context:
space:
mode:
authorBernard Metzler <bmt@zurich.ibm.com>2022-01-30 18:08:15 +0100
committerJason Gunthorpe <jgg@nvidia.com>2022-02-01 14:54:28 +0100
commitb43a76f423aa304037603fd6165c4a534d2c09a7 (patch)
tree8d6325c883102540ef2a6a03bf224ff76eb41d05 /drivers/infiniband/sw/siw/siw.h
parentIB/rdmavt: Validate remote_addr during loopback atomic tests (diff)
downloadlinux-b43a76f423aa304037603fd6165c4a534d2c09a7.tar.xz
linux-b43a76f423aa304037603fd6165c4a534d2c09a7.zip
RDMA/siw: Fix broken RDMA Read Fence/Resume logic.
Code unconditionally resumed fenced SQ processing after next RDMA Read completion, even if other RDMA Read responses are still outstanding, or ORQ is full. Also adds comments for better readability of fence processing, and removes orq_get_tail() helper, which is not needed anymore. Fixes: 8b6a361b8c48 ("rdma/siw: receive path") Fixes: a531975279f3 ("rdma/siw: main include file") Link: https://lore.kernel.org/r/20220130170815.1940-1-bmt@zurich.ibm.com Reported-by: Jared Holzman <jared.holzman@excelero.com> Signed-off-by: Bernard Metzler <bmt@zurich.ibm.com> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Diffstat (limited to 'drivers/infiniband/sw/siw/siw.h')
-rw-r--r--drivers/infiniband/sw/siw/siw.h7
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/infiniband/sw/siw/siw.h b/drivers/infiniband/sw/siw/siw.h
index 368959ae9a8c..df03d84c6868 100644
--- a/drivers/infiniband/sw/siw/siw.h
+++ b/drivers/infiniband/sw/siw/siw.h
@@ -644,14 +644,9 @@ static inline struct siw_sqe *orq_get_current(struct siw_qp *qp)
return &qp->orq[qp->orq_get % qp->attrs.orq_size];
}
-static inline struct siw_sqe *orq_get_tail(struct siw_qp *qp)
-{
- return &qp->orq[qp->orq_put % qp->attrs.orq_size];
-}
-
static inline struct siw_sqe *orq_get_free(struct siw_qp *qp)
{
- struct siw_sqe *orq_e = orq_get_tail(qp);
+ struct siw_sqe *orq_e = &qp->orq[qp->orq_put % qp->attrs.orq_size];
if (READ_ONCE(orq_e->flags) == 0)
return orq_e;