RE: [PATCH rdma-next 01/13] RDMA/mana_ib: Allow registration of DMA-mapped memory in PDs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> Subject: [PATCH rdma-next 01/13] RDMA/mana_ib: Allow registration of DMA-
> mapped memory in PDs
> 
> From: Konstantin Taranov <kotaranov@xxxxxxxxxxxxx>
> 
> Allow the HW to register DMA-mapped memory for kernel-level PDs.
> 
> Signed-off-by: Konstantin Taranov <kotaranov@xxxxxxxxxxxxx>
> Reviewed-by: Shiraz Saleem <shirazsaleem@xxxxxxxxxxxxx>

Reviewed-by: Long Li <longli@xxxxxxxxxxxxx>

> ---
>  drivers/infiniband/hw/mana/main.c | 3 +++
>  include/net/mana/gdma.h           | 1 +
>  2 files changed, 4 insertions(+)
> 
> diff --git a/drivers/infiniband/hw/mana/main.c
> b/drivers/infiniband/hw/mana/main.c
> index 67c2d43..45b251b 100644
> --- a/drivers/infiniband/hw/mana/main.c
> +++ b/drivers/infiniband/hw/mana/main.c
> @@ -82,6 +82,9 @@ int mana_ib_alloc_pd(struct ib_pd *ibpd, struct ib_udata
> *udata)
>  	mana_gd_init_req_hdr(&req.hdr, GDMA_CREATE_PD, sizeof(req),
>  			     sizeof(resp));
> 
> +	if (!udata)
> +		flags |= GDMA_PD_FLAG_ALLOW_GPA_MR;
> +
>  	req.flags = flags;
>  	err = mana_gd_send_request(gc, sizeof(req), &req,
>  				   sizeof(resp), &resp);
> diff --git a/include/net/mana/gdma.h b/include/net/mana/gdma.h index
> 90f5665..03e1b25 100644
> --- a/include/net/mana/gdma.h
> +++ b/include/net/mana/gdma.h
> @@ -775,6 +775,7 @@ struct gdma_destroy_dma_region_req {
> 
>  enum gdma_pd_flags {
>  	GDMA_PD_FLAG_INVALID = 0,
> +	GDMA_PD_FLAG_ALLOW_GPA_MR = 1,
>  };
> 
>  struct gdma_create_pd_req {
> --
> 2.43.0






[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux