RDMA/rxe: Add support for Send/Recv/Write/Read with ODP
authorDaisuke Matsuda <matsuda-daisuke@fujitsu.com>
Fri, 20 Dec 2024 10:09:35 +0000 (19:09 +0900)
committerJason Gunthorpe <jgg@nvidia.com>
Fri, 21 Feb 2025 17:07:43 +0000 (13:07 -0400)
commit2fae67ab63db7e8b35520f897935d694ad92f2fe
treecd37381f3c8acb0910f1845431f12e8bc8010665
parentd03fb5c6599e31b90c6b5f65d43d6ccc6b49eb91
RDMA/rxe: Add support for Send/Recv/Write/Read with ODP

rxe_mr_copy() is used widely to copy data to/from a user MR. requester uses
it to load payloads of requesting packets; responder uses it to process
Send, Write, and Read operaetions; completer uses it to copy data from
response packets of Read and Atomic operations to a user MR.

Allow these operations to be used with ODP by adding a subordinate function
rxe_odp_mr_copy(). It is comprised of the following steps:
 1. Check the driver page table(umem_odp->dma_list) to see if pages being
    accessed are present with appropriate permission.
 2. If necessary, trigger page fault to map the pages.
 3. Convert their user space addresses to kernel logical addresses using
    PFNs in the driver page table(umem_odp->pfn_list).
 4. Execute data copy to/from the pages.

Link: https://patch.msgid.link/r/20241220100936.2193541-5-matsuda-daisuke@fujitsu.com
Signed-off-by: Daisuke Matsuda <matsuda-daisuke@fujitsu.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
drivers/infiniband/sw/rxe/rxe.c
drivers/infiniband/sw/rxe/rxe_loc.h
drivers/infiniband/sw/rxe/rxe_mr.c
drivers/infiniband/sw/rxe/rxe_odp.c