mirror of https://github.com/torvalds/linux.git
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:
parent
153243086e
commit
cd84d8001e
|
|
@ -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);
|
||||||
|
|
|
||||||
|
|
@ -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 {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue