Skip to content

Commit 570a4bf

Browse files
rpearsonhpe-designjgunthorpe
authored andcommitted
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: 8a1a0be ("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>
1 parent 679ab61 commit 570a4bf

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

drivers/infiniband/sw/rxe/rxe_resp.c

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -745,8 +745,14 @@ static enum resp_states read_reply(struct rxe_qp *qp,
745745
}
746746

747747
if (res->state == rdatm_res_state_new) {
748-
mr = qp->resp.mr;
749-
qp->resp.mr = NULL;
748+
if (!res->replay) {
749+
mr = qp->resp.mr;
750+
qp->resp.mr = NULL;
751+
} else {
752+
mr = rxe_recheck_mr(qp, res->read.rkey);
753+
if (!mr)
754+
return RESPST_ERR_RKEY_VIOLATION;
755+
}
750756

751757
if (res->read.resid <= mtu)
752758
opcode = IB_OPCODE_RC_RDMA_READ_RESPONSE_ONLY;

0 commit comments

Comments
 (0)