Re: [PATCH for-rc 4/6] RDMA/efa: Use API to get contiguous memory blocks aligned to device supported page size

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

 



On Tue, May 28, 2019 at 03:46:16PM +0300, Gal Pressman wrote:
> @@ -1500,13 +1443,17 @@ struct ib_mr *efa_reg_mr(struct ib_pd *ibpd, u64 start, u64 length,
>  	params.iova = virt_addr;
>  	params.mr_length_in_bytes = length;
>  	params.permissions = access_flags & 0x1;
> -	max_page_shift = fls64(dev->dev_attr.page_size_cap);
>  
> -	efa_cont_pages(mr->umem, start, max_page_shift, &npages,
> -		       &params.page_shift, &params.page_num);
> +	pg_sz = ib_umem_find_best_pgsz(mr->umem,
> +				       dev->dev_attr.page_size_cap,
> +				       virt_addr);

I think this needs to check pg_sz is not zero..

Jason



[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