Skip to content

Commit 30ed9ee

Browse files
mustafakismailrleon
authored andcommitted
RDMA/irdma: Do not generate SW completions for NOPs
Currently, artificial SW completions are generated for NOP wqes which can generate unexpected completions with wr_id = 0. Skip the generation of artificial completions for NOPs. Fixes: 81091d7 ("RDMA/irdma: Add SW mechanism to generate completions on error") Signed-off-by: Mustafa Ismail <mustafa.ismail@intel.com> Signed-off-by: Shiraz Saleem <shiraz.saleem@intel.com> Link: https://lore.kernel.org/r/20230315145231.931-2-shiraz.saleem@intel.com Signed-off-by: Leon Romanovsky <leon@kernel.org>
1 parent eeac8ed commit 30ed9ee

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

drivers/infiniband/hw/irdma/utils.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2595,7 +2595,10 @@ void irdma_generate_flush_completions(struct irdma_qp *iwqp)
25952595
/* remove the SQ WR by moving SQ tail*/
25962596
IRDMA_RING_SET_TAIL(*sq_ring,
25972597
sq_ring->tail + qp->sq_wrtrk_array[sq_ring->tail].quanta);
2598-
2598+
if (cmpl->cpi.op_type == IRDMAQP_OP_NOP) {
2599+
kfree(cmpl);
2600+
continue;
2601+
}
25992602
ibdev_dbg(iwqp->iwscq->ibcq.device,
26002603
"DEV: %s: adding wr_id = 0x%llx SQ Completion to list qp_id=%d\n",
26012604
__func__, cmpl->cpi.wr_id, qp->qp_id);

0 commit comments

Comments
 (0)