diff options
author | Bob Pearson <rpearsonhpe@gmail.com> | 2022-04-18 19:41:04 +0200 |
---|---|---|
committer | Jason Gunthorpe <jgg@nvidia.com> | 2022-04-20 16:21:24 +0200 |
commit | 570a4bf7440e9fb2a4164244a6bf60a46362b627 (patch) | |
tree | dd53a572936f8f2cc8e16b796b1166f2a34e3366 /drivers | |
parent | RDMA/irdma: Fix deadlock in irdma_cleanup_cm_core() (diff) | |
download | linux-570a4bf7440e9fb2a4164244a6bf60a46362b627.tar.xz linux-570a4bf7440e9fb2a4164244a6bf60a46362b627.zip |
RDMA/rxe: Recheck the MR in when generating a READ reply
The rping benchmark fails on long runs. The root cause of this failure has
been traced to a failure to compute a nonzero value of mr in rare
situations.
Fix this failure by correctly handling the computation of mr in
read_reply() in rxe_resp.c in the replay flow.
Fixes: 8a1a0be894da ("RDMA/rxe: Replace mr by rkey in responder resources")
Link: https://lore.kernel.org/r/20220418174103.3040-1-rpearsonhpe@gmail.com
Signed-off-by: Bob Pearson <rpearsonhpe@gmail.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/infiniband/sw/rxe/rxe_resp.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/infiniband/sw/rxe/rxe_resp.c b/drivers/infiniband/sw/rxe/rxe_resp.c index 1d95fab606da..9cd0eaff98de 100644 --- a/drivers/infiniband/sw/rxe/rxe_resp.c +++ b/drivers/infiniband/sw/rxe/rxe_resp.c @@ -745,8 +745,14 @@ static enum resp_states read_reply(struct rxe_qp *qp, } if (res->state == rdatm_res_state_new) { - mr = qp->resp.mr; - qp->resp.mr = NULL; + if (!res->replay) { + mr = qp->resp.mr; + qp->resp.mr = NULL; + } else { + mr = rxe_recheck_mr(qp, res->read.rkey); + if (!mr) + return RESPST_ERR_RKEY_VIOLATION; + } if (res->read.resid <= mtu) opcode = IB_OPCODE_RC_RDMA_READ_RESPONSE_ONLY; |