Skip to content

Commit 5ac814e

Browse files
ddmatsurleon
authored andcommitted
RDMA/rxe: Handle remote errors in the midst of a Read reply sequence
Requesting nodes do not handle a reported error correctly if it is generated in the middle of multi-packet Read responses, and the node tries to resend the request endlessly. Let completer terminate the connection in that case. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Daisuke Matsuda <[email protected]> Reviewed-by: Li Zhijian <[email protected]> Signed-off-by: Jason Gunthorpe <[email protected]> Signed-off-by: Leon Romanovsky <[email protected]>
1 parent 5ebc548 commit 5ac814e

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

drivers/infiniband/sw/rxe/rxe_comp.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,10 @@ static inline enum comp_state check_psn(struct rxe_qp *qp,
200200
*/
201201
if (pkt->psn == wqe->last_psn)
202202
return COMPST_COMP_ACK;
203+
else if (pkt->opcode == IB_OPCODE_RC_ACKNOWLEDGE &&
204+
(qp->comp.opcode == IB_OPCODE_RC_RDMA_READ_RESPONSE_FIRST ||
205+
qp->comp.opcode == IB_OPCODE_RC_RDMA_READ_RESPONSE_MIDDLE))
206+
return COMPST_CHECK_ACK;
203207
else
204208
return COMPST_DONE;
205209
} else if ((diff > 0) && (wqe->mask & WR_ATOMIC_OR_READ_MASK)) {
@@ -228,6 +232,10 @@ static inline enum comp_state check_ack(struct rxe_qp *qp,
228232

229233
case IB_OPCODE_RC_RDMA_READ_RESPONSE_FIRST:
230234
case IB_OPCODE_RC_RDMA_READ_RESPONSE_MIDDLE:
235+
/* Check NAK code to handle a remote error */
236+
if (pkt->opcode == IB_OPCODE_RC_ACKNOWLEDGE)
237+
break;
238+
231239
if (pkt->opcode != IB_OPCODE_RC_RDMA_READ_RESPONSE_MIDDLE &&
232240
pkt->opcode != IB_OPCODE_RC_RDMA_READ_RESPONSE_LAST) {
233241
/* read retries of partial data may restart from

0 commit comments

Comments
 (0)