Re: [PATCH for-next v2 06/18] RDMA/rxe: Add rxe_add_frag() to rxe_mr.c

Jason Gunthorpe
2022-12-01T15:41:17Z

On Thu, Dec 01, 2022 at 09:38:10AM -0600, Bob Pearson wrote:

> Further, looking at ipoib as an example, it builds sge lists using the lkey from get_dma_mr()
> and sets the sge->addr to a kernel virtual memory address after previously calling
> ib_dma_map_single() so the addresses are mapped for dma access and visible before use.
> They are unmapped after the read/write operation completes. What is the point of kmapping
> the address after dma mapping them?

Because not everything is ipoib, and things like block will map sgls
with struct pages, not kva.

Jason