RDMA/irdma: Silently consume unsignaled completions

In case we get an unsignaled error completion, we silently consume the CQE by
pretending the QP does not exist. Without this, bookkeeping for signaled
completions does not work correctly.

Signed-off-by: Jay Bhat <jay.bhat@intel.com>
Signed-off-by: Tatyana Nikolova <tatyana.e.nikolova@intel.com>
Link: https://patch.msgid.link/20251031021726.1003-5-tatyana.e.nikolova@intel.com
Signed-off-by: Leon Romanovsky <leon@kernel.org>
This commit is contained in:
Jay Bhat 2025-10-30 21:17:24 -05:00 committed by Leon Romanovsky
parent 153243086e
commit cd84d8001e
2 changed files with 7 additions and 1 deletions

View File

@ -194,6 +194,7 @@ __le64 *irdma_qp_get_next_send_wqe(struct irdma_qp_uk *qp, u32 *wqe_idx,
qp->sq_wrtrk_array[*wqe_idx].wrid = info->wr_id; qp->sq_wrtrk_array[*wqe_idx].wrid = info->wr_id;
qp->sq_wrtrk_array[*wqe_idx].wr_len = total_size; qp->sq_wrtrk_array[*wqe_idx].wr_len = total_size;
qp->sq_wrtrk_array[*wqe_idx].quanta = quanta; qp->sq_wrtrk_array[*wqe_idx].quanta = quanta;
qp->sq_wrtrk_array[*wqe_idx].signaled = info->signaled;
return wqe; return wqe;
} }
@ -1355,6 +1356,10 @@ int irdma_uk_cq_poll_cmpl(struct irdma_cq_uk *cq,
info->wr_id = qp->sq_wrtrk_array[wqe_idx].wrid; info->wr_id = qp->sq_wrtrk_array[wqe_idx].wrid;
if (!info->comp_status) if (!info->comp_status)
info->bytes_xfered = qp->sq_wrtrk_array[wqe_idx].wr_len; info->bytes_xfered = qp->sq_wrtrk_array[wqe_idx].wr_len;
if (!qp->sq_wrtrk_array[wqe_idx].signaled) {
ret_code = -EFAULT;
goto exit;
}
info->op_type = (u8)FIELD_GET(IRDMACQ_OP, qword3); info->op_type = (u8)FIELD_GET(IRDMACQ_OP, qword3);
IRDMA_RING_SET_TAIL(qp->sq_ring, IRDMA_RING_SET_TAIL(qp->sq_ring,
wqe_idx + qp->sq_wrtrk_array[wqe_idx].quanta); wqe_idx + qp->sq_wrtrk_array[wqe_idx].quanta);

View File

@ -482,7 +482,8 @@ struct irdma_sq_uk_wr_trk_info {
u64 wrid; u64 wrid;
u32 wr_len; u32 wr_len;
u16 quanta; u16 quanta;
u8 reserved[2]; u8 signaled;
u8 reserved[1];
}; };
struct irdma_qp_quanta { struct irdma_qp_quanta {