All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] RDMA/rxe: Fix data copy for IB_SEND_INLINE
@ 2024-05-16  9:50 Honggang LI
  2024-05-16 13:24 ` Zhu Yanjun
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Honggang LI @ 2024-05-16  9:50 UTC (permalink / raw)
  To: zyjzyj2000, jgg, leon; +Cc: honggangli, linux-rdma

For RDMA Send and Write with IB_SEND_INLINE, the memory buffers
specified in sge list will be placed inline in the Send Request.

The data should be copied by CPU from the virtual addresses of
corresponding sge list DMA addresses.

Fixes: 8d7c7c0eeb74 ("RDMA: Add ib_virt_dma_to_page()")
Signed-off-by: Honggang LI <honggangli@163.com>
---
 drivers/infiniband/sw/rxe/rxe_verbs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/infiniband/sw/rxe/rxe_verbs.c b/drivers/infiniband/sw/rxe/rxe_verbs.c
index 614581989b38..b94d05e9167a 100644
--- a/drivers/infiniband/sw/rxe/rxe_verbs.c
+++ b/drivers/infiniband/sw/rxe/rxe_verbs.c
@@ -812,7 +812,7 @@ static void copy_inline_data_to_wqe(struct rxe_send_wqe *wqe,
 	int i;
 
 	for (i = 0; i < ibwr->num_sge; i++, sge++) {
-		memcpy(p, ib_virt_dma_to_page(sge->addr), sge->length);
+		memcpy(p, ib_virt_dma_to_ptr(sge->addr), sge->length);
 		p += sge->length;
 	}
 }
-- 
2.45.0


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

end of thread, other threads:[~2024-05-30 14:26 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-16  9:50 [PATCH] RDMA/rxe: Fix data copy for IB_SEND_INLINE Honggang LI
2024-05-16 13:24 ` Zhu Yanjun
2024-05-17  1:43 ` Zhijian Li (Fujitsu)
2024-05-17 10:47   ` Zhijian Li (Fujitsu)
2024-05-24 15:05 ` Jason Gunthorpe
2024-05-30 13:20 ` Leon Romanovsky

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.