Skip to content

Commit 03fa18a

Browse files
Honggang-LIrleon
authored andcommitted
RDMA/rxe: Fix data copy for IB_SEND_INLINE
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. Cc: [email protected] Fixes: 8d7c7c0 ("RDMA: Add ib_virt_dma_to_page()") Signed-off-by: Honggang LI <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Zhu Yanjun <[email protected]> Reviewed-by: Li Zhijian <[email protected]> Reviewed-by: Jason Gunthorpe <[email protected]> Signed-off-by: Leon Romanovsky <[email protected]>
1 parent 056620d commit 03fa18a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/infiniband/sw/rxe/rxe_verbs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -812,7 +812,7 @@ static void copy_inline_data_to_wqe(struct rxe_send_wqe *wqe,
812812
int i;
813813

814814
for (i = 0; i < ibwr->num_sge; i++, sge++) {
815-
memcpy(p, ib_virt_dma_to_page(sge->addr), sge->length);
815+
memcpy(p, ib_virt_dma_to_ptr(sge->addr), sge->length);
816816
p += sge->length;
817817
}
818818
}

0 commit comments

Comments
 (0)