aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/sw/rxe/rxe_comp.c
diff options
context:
space:
mode:
authorBob Pearson <rpearsonhpe@gmail.com>2022-07-20 04:56:07 -0400
committerJason Gunthorpe <jgg@nvidia.com>2022-08-02 13:53:36 -0300
commit62494ec7fbca4d58900eb62e075f2fedc85b5fb9 (patch)
treeb788f5759d837710cd2a8b25c5fca4de5ac0131c /drivers/infiniband/sw/rxe/rxe_comp.c
parentRDMA/rxe: Generate error completion for error requester QP state (diff)
downloadlinux-dev-62494ec7fbca4d58900eb62e075f2fedc85b5fb9.tar.xz
linux-dev-62494ec7fbca4d58900eb62e075f2fedc85b5fb9.zip
RDMA/rxe: Split qp state for requester and completer
Currently the requester can continue to process send wqes after an local qp operation error is detected because the setting of the qp state to the error state is deferred until later. This patch splits the qp state for the completer and requester into two separate states and sets qp->req.state = QP_STATE_ERROR as soon as the error is detected before another wqe can be executed. Link: https://lore.kernel.org/r/1658307368-1851-4-git-send-email-lizhijian@fujitsu.com Signed-off-by: Bob Pearson <rpearsonhpe@gmail.com> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Diffstat (limited to 'drivers/infiniband/sw/rxe/rxe_comp.c')
-rw-r--r--drivers/infiniband/sw/rxe/rxe_comp.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/infiniband/sw/rxe/rxe_comp.c b/drivers/infiniband/sw/rxe/rxe_comp.c
index bc53cad077aa..fb0c008af78c 100644
--- a/drivers/infiniband/sw/rxe/rxe_comp.c
+++ b/drivers/infiniband/sw/rxe/rxe_comp.c
@@ -567,10 +567,10 @@ int rxe_completer(void *arg)
if (!rxe_get(qp))
return -EAGAIN;
- if (!qp->valid || qp->req.state == QP_STATE_ERROR ||
- qp->req.state == QP_STATE_RESET) {
+ if (!qp->valid || qp->comp.state == QP_STATE_ERROR ||
+ qp->comp.state == QP_STATE_RESET) {
rxe_drain_resp_pkts(qp, qp->valid &&
- qp->req.state == QP_STATE_ERROR);
+ qp->comp.state == QP_STATE_ERROR);
goto exit;
}