[RFC PATCH] RDMA/rxe: Export imm_data to WC when the related WR with imm_data finished on SQ

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxx>
---

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






[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux