mbox series

[for-next,0/5] iova_to_vaddr refactor

Message ID 1668141030-2-1-git-send-email-lizhijian@fujitsu.com (mailing list archive)
Headers show
Series iova_to_vaddr refactor | expand

Message

Zhijian Li (Fujitsu) Nov. 11, 2022, 4:30 a.m. UTC
Background:
iova_to_addr just lookups at the map which is constructed and manages the
relationship between iova to vaddr when MR is registering. By conventional,
we should map the userspace address(iova) every time we want to access it.
Please refer to the previous discussion[1][2] for more details.

Refactor:
In this refactoring, we will do the map every time before the user really
accesses it.

patch1,3,5 are cleanup and preparation.
patch2 is to make all subroutines accessing the iova use iova_to_vaddr() API.
patch4 is the refactor.

[1]: https://www.spinics.net/lists/linux-rdma/msg113206.html
[2]: https://lore.kernel.org/all/20220118123505.GF84788@nvidia.com/

Li Zhijian (5):
  RDMA/rxe: Remove rxe_phys_buf.size
  RDMA/rxe: use iova_to_vaddr to transform iova for rxe_mr_copy
  RDMA/rxe: iova_to_vaddr cleanup
  RDMA/rxe: refactor iova_to_vaddr
  RDMA/rxe: Rename iova_to_vaddr to rxe_map_iova

 drivers/infiniband/sw/rxe/rxe_loc.h   |   3 +-
 drivers/infiniband/sw/rxe/rxe_mr.c    | 128 +++++++++++---------------
 drivers/infiniband/sw/rxe/rxe_resp.c  |   5 +-
 drivers/infiniband/sw/rxe/rxe_verbs.c |   1 -
 drivers/infiniband/sw/rxe/rxe_verbs.h |   6 +-
 5 files changed, 62 insertions(+), 81 deletions(-)

Comments

Zhijian Li (Fujitsu) Nov. 11, 2022, 6:13 a.m. UTC | #1
CC+ Xiao



On 11/11/2022 12:30, Li Zhijian wrote:
> Background:
> iova_to_addr just lookups at the map which is constructed and manages the
> relationship between iova to vaddr when MR is registering. By conventional,
> we should map the userspace address(iova) every time we want to access it.
> Please refer to the previous discussion[1][2] for more details.
> 
> Refactor:
> In this refactoring, we will do the map every time before the user really
> accesses it.
> 
> patch1,3,5 are cleanup and preparation.
> patch2 is to make all subroutines accessing the iova use iova_to_vaddr() API.
> patch4 is the refactor.
> 
> [1]: https://www.spinics.net/lists/linux-rdma/msg113206.html
> [2]: https://lore.kernel.org/all/20220118123505.GF84788@nvidia.com/
> 
> Li Zhijian (5):
>    RDMA/rxe: Remove rxe_phys_buf.size
>    RDMA/rxe: use iova_to_vaddr to transform iova for rxe_mr_copy
>    RDMA/rxe: iova_to_vaddr cleanup
>    RDMA/rxe: refactor iova_to_vaddr
>    RDMA/rxe: Rename iova_to_vaddr to rxe_map_iova
> 
>   drivers/infiniband/sw/rxe/rxe_loc.h   |   3 +-
>   drivers/infiniband/sw/rxe/rxe_mr.c    | 128 +++++++++++---------------
>   drivers/infiniband/sw/rxe/rxe_resp.c  |   5 +-
>   drivers/infiniband/sw/rxe/rxe_verbs.c |   1 -
>   drivers/infiniband/sw/rxe/rxe_verbs.h |   6 +-
>   5 files changed, 62 insertions(+), 81 deletions(-)
>