Re: [PATCH rdma-next 2/6] RDMA/umem: Add ODP type indicator within ib_umem_odp

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

 



On 07/08/2019 13:33, Leon Romanovsky wrote:
> +static inline void ib_umem_odp_set_type(struct ib_umem_odp *umem_odp,
> +					unsigned long start, size_t end)

Consider renaming 'end' to 'size'?

> +{
> +	if (!start && !end)

According to the man pages, To create an implicit ODP MR, IBV_ACCESS_ON_DEMAND
should be set, addr should be 0 and length should be SIZE_MAX.
Why check end against zero?

> +		umem_odp->type = IB_ODP_TYPE_IMPLICIT;
> +	else
> +		umem_odp->type = IB_ODP_TYPE_EXPLICIT;
> +}
> +
>  /*
>   * The lower 2 bits of the DMA address signal the R/W permissions for
>   * the entry. To upgrade the permissions, provide the appropriate



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux