Commit ea492251 authored by Bob Pearson's avatar Bob Pearson Committed by Jason Gunthorpe

RDMA/rxe: Fix missing acks from responder

All responder errors from request packets that do not consume a receive
WQE fail to generate acks for RC QPs.  This patch corrects this behavior
by making the flow follow the same path as request packets that do consume
a WQE after the completion.

Link: https://lore.kernel.org/r/20210402001016.3210-1-rpearson@hpe.com
Link: https://lore.kernel.org/linux-rdma/1a7286ac-bcea-40fb-2267-480134dd301b@gmail.com/Signed-off-by: default avatarBob Pearson <rpearson@hpe.com>
Signed-off-by: default avatarJason Gunthorpe <jgg@nvidia.com>
parent 7d8f3465
...@@ -676,7 +676,6 @@ int rxe_completer(void *arg) ...@@ -676,7 +676,6 @@ int rxe_completer(void *arg)
/* there is nothing to retry in this case */ /* there is nothing to retry in this case */
if (!wqe || (wqe->state == wqe_state_posted)) { if (!wqe || (wqe->state == wqe_state_posted)) {
pr_warn("Retry attempted without a valid wqe\n");
ret = -EAGAIN; ret = -EAGAIN;
goto done; goto done;
} }
......
...@@ -816,8 +816,8 @@ static enum resp_states do_complete(struct rxe_qp *qp, ...@@ -816,8 +816,8 @@ static enum resp_states do_complete(struct rxe_qp *qp,
struct rxe_recv_wqe *wqe = qp->resp.wqe; struct rxe_recv_wqe *wqe = qp->resp.wqe;
struct rxe_dev *rxe = to_rdev(qp->ibqp.device); struct rxe_dev *rxe = to_rdev(qp->ibqp.device);
if (unlikely(!wqe)) if (!wqe)
return RESPST_CLEANUP; goto finish;
memset(&cqe, 0, sizeof(cqe)); memset(&cqe, 0, sizeof(cqe));
...@@ -917,12 +917,12 @@ static enum resp_states do_complete(struct rxe_qp *qp, ...@@ -917,12 +917,12 @@ static enum resp_states do_complete(struct rxe_qp *qp,
if (rxe_cq_post(qp->rcq, &cqe, pkt ? bth_se(pkt) : 1)) if (rxe_cq_post(qp->rcq, &cqe, pkt ? bth_se(pkt) : 1))
return RESPST_ERR_CQ_OVERFLOW; return RESPST_ERR_CQ_OVERFLOW;
if (qp->resp.state == QP_STATE_ERROR) finish:
if (unlikely(qp->resp.state == QP_STATE_ERROR))
return RESPST_CHK_RESOURCE; return RESPST_CHK_RESOURCE;
if (unlikely(!pkt))
if (!pkt)
return RESPST_DONE; return RESPST_DONE;
else if (qp_type(qp) == IB_QPT_RC) if (qp_type(qp) == IB_QPT_RC)
return RESPST_ACKNOWLEDGE; return RESPST_ACKNOWLEDGE;
else else
return RESPST_CLEANUP; return RESPST_CLEANUP;
...@@ -1056,10 +1056,8 @@ static enum resp_states duplicate_request(struct rxe_qp *qp, ...@@ -1056,10 +1056,8 @@ static enum resp_states duplicate_request(struct rxe_qp *qp,
if (pkt->mask & RXE_SEND_MASK || if (pkt->mask & RXE_SEND_MASK ||
pkt->mask & RXE_WRITE_MASK) { pkt->mask & RXE_WRITE_MASK) {
/* SEND. Ack again and cleanup. C9-105. */ /* SEND. Ack again and cleanup. C9-105. */
if (bth_ack(pkt)) send_ack(qp, pkt, AETH_ACK_UNLIMITED, prev_psn);
send_ack(qp, pkt, AETH_ACK_UNLIMITED, prev_psn); return RESPST_CLEANUP;
rc = RESPST_CLEANUP;
goto out;
} else if (pkt->mask & RXE_READ_MASK) { } else if (pkt->mask & RXE_READ_MASK) {
struct resp_res *res; struct resp_res *res;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment