* [PATCH] RDMA/irdma: Fix typo in SQ completions generation
@ 2026-05-28 22:30 Cyrill Gorcunov
2026-05-29 3:23 ` Jacob Moroni
0 siblings, 1 reply; 2+ messages in thread
From: Cyrill Gorcunov @ 2026-05-28 22:30 UTC (permalink / raw)
To: linux-rdma, linux-kernel
Cc: Krzysztof Czurylo, Tatyana Nikolova, Jason Gunthorpe,
Leon Romanovsky
When we generate completion for SQ the opcode while being properly read
from ring buffer is ignored when written back to completion. Seems
to be a simple typo.
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
---
Hopefully I didn't miss something obvious here, found it while been
fighting with unrelated issue.
drivers/infiniband/hw/irdma/utils.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: linux-tip.git/drivers/infiniband/hw/irdma/utils.c
===================================================================
--- linux-tip.git.orig/drivers/infiniband/hw/irdma/utils.c
+++ linux-tip.git/drivers/infiniband/hw/irdma/utils.c
@@ -2442,7 +2442,7 @@ void irdma_generate_flush_completions(st
cmpl->cpi.wr_id = qp->sq_wrtrk_array[wqe_idx].wrid;
sw_wqe = qp->sq_base[wqe_idx].elem;
get_64bit_val(sw_wqe, 24, &wqe_qword);
- cmpl->cpi.op_type = (u8)FIELD_GET(IRDMAQPSQ_OPCODE, IRDMAQPSQ_OPCODE);
+ cmpl->cpi.op_type = (u8)FIELD_GET(IRDMAQPSQ_OPCODE, wqe_qword);
cmpl->cpi.q_type = IRDMA_CQE_QTYPE_SQ;
/* remove the SQ WR by moving SQ tail*/
IRDMA_RING_SET_TAIL(*sq_ring,
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] RDMA/irdma: Fix typo in SQ completions generation
2026-05-28 22:30 [PATCH] RDMA/irdma: Fix typo in SQ completions generation Cyrill Gorcunov
@ 2026-05-29 3:23 ` Jacob Moroni
0 siblings, 0 replies; 2+ messages in thread
From: Jacob Moroni @ 2026-05-29 3:23 UTC (permalink / raw)
To: Cyrill Gorcunov
Cc: linux-rdma, linux-kernel, Krzysztof Czurylo, Tatyana Nikolova,
Jason Gunthorpe, Leon Romanovsky
> Hopefully I didn't miss something obvious here, found it while been
> fighting with unrelated issue.
Nice find. I took a look and your fix seems valid to me.
I guess prior to this fix, it could potentially generate flush
completions for the NOP/pad WQEs which I can see being
a problem since the WR ID would be totally bogus.
Reviewed-by: Jacob Moroni <jmoroni@google.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-05-29 3:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-28 22:30 [PATCH] RDMA/irdma: Fix typo in SQ completions generation Cyrill Gorcunov
2026-05-29 3:23 ` Jacob Moroni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox