Commit 739f7f1b authored by Sagi Grimberg's avatar Sagi Grimberg Committed by Greg Kroah-Hartman

rxe: fix error completion wr_id and qp_num

commit e48d8ed9 upstream.

Error completions must still contain a valid wr_id and
qp_num such that the consumer can rely on. Correctly
fill these fields in receive error completions.
Reported-by: Ben Walker's avatarWalker Benjamin <>
Signed-off-by: Sagi Grimberg's avatarSagi Grimberg <>
Reviewed-by: default avatarZhu Yanjun <>
Tested-by: default avatarZhu Yanjun <>
Signed-off-by: Doug Ledford's avatarDoug Ledford <>
Signed-off-by: default avatarGreg Kroah-Hartman <>
parent 7030ab2d
......@@ -844,11 +844,16 @@ static enum resp_states do_complete(struct rxe_qp *qp,
memset(&cqe, 0, sizeof(cqe));
wc->wr_id = wqe->wr_id;
wc->status = qp->resp.status;
wc->qp = &qp->ibqp;
if (qp->rcq->is_user) {
uwc->status = qp->resp.status;
uwc->qp_num = qp->ibqp.qp_num;
uwc->wr_id = wqe->wr_id;
} else {
wc->status = qp->resp.status;
wc->qp = &qp->ibqp;
wc->wr_id = wqe->wr_id;
/* fields after status are not required for errors */
if (wc->status == IB_WC_SUCCESS) {
wc->opcode = (pkt->mask & RXE_IMMDT_MASK &&
pkt->mask & RXE_WRITE_MASK) ?
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