public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH] RDMA/rxe: Export imm_data to WC when the related WR with imm_data finished on SQ
@ 2021-01-27  8:24 Xiao Yang
  2021-01-27 12:04 ` Leon Romanovsky
  0 siblings, 1 reply; 15+ messages in thread
From: Xiao Yang @ 2021-01-27  8:24 UTC (permalink / raw)
  To: linux-rdma; +Cc: leon, jgg, Xiao Yang

Even if we enable sq_sig_all or IBV_SEND_SIGNALED, current rxe
module cannot set imm_data in WC when the related WR with imm_data
finished on SQ.

Signed-off-by: Xiao Yang <yangx.jy@cn.fujitsu.com>
---

Current rxe module and other rdma modules(e.g. mlx5) only set
imm_data in WC when the related WR with imm_data finished on RQ.
I am not sure if it is a expected behavior.

 drivers/infiniband/sw/rxe/rxe_comp.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/infiniband/sw/rxe/rxe_comp.c b/drivers/infiniband/sw/rxe/rxe_comp.c
index 0a1e6393250b..e380ff63ab2d 100644
--- a/drivers/infiniband/sw/rxe/rxe_comp.c
+++ b/drivers/infiniband/sw/rxe/rxe_comp.c
@@ -384,8 +384,10 @@ static void make_send_cqe(struct rxe_qp *qp, struct rxe_send_wqe *wqe,
 		wc->status		= wqe->status;
 		wc->opcode		= wr_to_wc_opcode(wqe->wr.opcode);
 		if (wqe->wr.opcode == IB_WR_RDMA_WRITE_WITH_IMM ||
-		    wqe->wr.opcode == IB_WR_SEND_WITH_IMM)
+		    wqe->wr.opcode == IB_WR_SEND_WITH_IMM) {
 			wc->wc_flags = IB_WC_WITH_IMM;
+			wc->ex.imm_data = wqe->wr.ex.imm_data;
+		}
 		wc->byte_len		= wqe->dma.length;
 		wc->qp			= &qp->ibqp;
 	} else {
@@ -395,8 +397,10 @@ static void make_send_cqe(struct rxe_qp *qp, struct rxe_send_wqe *wqe,
 		uwc->status		= wqe->status;
 		uwc->opcode		= wr_to_wc_opcode(wqe->wr.opcode);
 		if (wqe->wr.opcode == IB_WR_RDMA_WRITE_WITH_IMM ||
-		    wqe->wr.opcode == IB_WR_SEND_WITH_IMM)
+		    wqe->wr.opcode == IB_WR_SEND_WITH_IMM) {
 			uwc->wc_flags = IB_WC_WITH_IMM;
+			uwc->ex.imm_data = wqe->wr.ex.imm_data;
+		}
 		uwc->byte_len		= wqe->dma.length;
 		uwc->qp_num		= qp->ibqp.qp_num;
 	}
-- 
2.23.0




^ permalink raw reply related	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2021-02-03  7:37 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-01-27  8:24 [RFC PATCH] RDMA/rxe: Export imm_data to WC when the related WR with imm_data finished on SQ Xiao Yang
2021-01-27 12:04 ` Leon Romanovsky
2021-01-27 13:19   ` Zhu Yanjun
2021-01-27 19:40   ` Bob Pearson
2021-01-29  5:42     ` Xiao Yang
2021-01-29  5:49       ` Pearson, Robert B
2021-01-29 18:14       ` Pearson, Robert B
2021-01-28  2:25   ` Xiao Yang
2021-01-28  6:29   ` Xiao Yang
2021-01-28 12:54     ` Leon Romanovsky
2021-01-29  2:14       ` Xiao Yang
2021-01-29  5:41         ` Pearson, Robert B
2021-01-29  6:28         ` Zhu Yanjun
2021-02-03  5:23           ` Xiao Yang
2021-02-03  7:36             ` Zhu Yanjun

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox