mbox series

[PATCHv2,for-next,0/4] RDMA/irdma: Refactor irdma_reg_user_mr function

Message ID 20230112000617.1659337-1-yanjun.zhu@intel.com (mailing list archive)
Headers show
Series RDMA/irdma: Refactor irdma_reg_user_mr function | expand

Message

Zhu Yanjun Jan. 12, 2023, 12:06 a.m. UTC
From: Zhu Yanjun <yanjun.zhu@linux.dev>

V1->V2: Thanks Saleem, Shiraz. 
        1) Remove the unnecessary variable initializations;
        2) Get iwdev by to_iwdev;
	3) Use the label free_pble to handle errors;
	4) Validate the page size before rdma_umem_for_each_dma_block

Split the shared source codes into several new functions for future use.
No bug fix and new feature in this commit series.

The new functions are as below:

irdma_reg_user_mr_type_mem
irdma_alloc_iwmr
irdma_free_iwmr
irdma_reg_user_mr_type_qp
irdma_reg_user_mr_type_cq

These functions will be used in the dmabuf feature.

Zhu Yanjun (4):
  RDMA/irdma: Split MEM handler into irdma_reg_user_mr_type_mem
  RDMA/irdma: Split mr alloc and free into new functions
  RDMA/irdma: Split QP handler into irdma_reg_user_mr_type_qp
  RDMA/irdma: Split CQ handler into irdma_reg_user_mr_type_cq

 drivers/infiniband/hw/irdma/verbs.c | 264 +++++++++++++++++-----------
 1 file changed, 165 insertions(+), 99 deletions(-)

Comments

Shiraz Saleem Jan. 12, 2023, 4:42 p.m. UTC | #1
> Subject: [PATCHv2 for-next 0/4] RDMA/irdma: Refactor irdma_reg_user_mr
> function
> 
> From: Zhu Yanjun <yanjun.zhu@linux.dev>
> 
> V1->V2: Thanks Saleem, Shiraz.
>         1) Remove the unnecessary variable initializations;
>         2) Get iwdev by to_iwdev;
> 	3) Use the label free_pble to handle errors;
> 	4) Validate the page size before rdma_umem_for_each_dma_block
> 
> Split the shared source codes into several new functions for future use.
> No bug fix and new feature in this commit series.
> 
> The new functions are as below:
> 
> irdma_reg_user_mr_type_mem
> irdma_alloc_iwmr
> irdma_free_iwmr
> irdma_reg_user_mr_type_qp
> irdma_reg_user_mr_type_cq
> 
> These functions will be used in the dmabuf feature.
> 
> Zhu Yanjun (4):
>   RDMA/irdma: Split MEM handler into irdma_reg_user_mr_type_mem
>   RDMA/irdma: Split mr alloc and free into new functions
>   RDMA/irdma: Split QP handler into irdma_reg_user_mr_type_qp
>   RDMA/irdma: Split CQ handler into irdma_reg_user_mr_type_cq
> 
>  drivers/infiniband/hw/irdma/verbs.c | 264 +++++++++++++++++-----------
>  1 file changed, 165 insertions(+), 99 deletions(-)
> 
> --

Thanks!

Reviewed-by: Shiraz Saleem <shiraz.saleem@intel.com>