Re: [PATCH rdma-next v2 09/11] RDMA/efa: Add EFA verbs implementation

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

 



On Thu, Mar 07, 2019 at 04:44:32PM +0200, Gal Pressman wrote:
> On 06-Mar-19 20:34, Jason Gunthorpe wrote:
> > On Wed, Mar 06, 2019 at 05:55:11PM +0200, Gal Pressman wrote:
> >> Also, EFA is special in the sense that all sg functions use PAGE_SIZE while EFA
> >> needs EFA_PAGE_SIZE. I guess it could be solved by passing that as a parameter,
> >> but that'll probably require some changes in existing API functions
> >> (__sg_alloc_table_from_pages for example)?
> > 
> > No, you are supposed to build up the sgl in large chunks and then
> > fragment it into whatever the HW requires after DMA mapping.
> 
> That's fine, I'll change the stride to PAGE_SIZE.
> 
> > 
> > The code as written is wrong, as the IOMMU is free to consolidate the
> > carefully broken up SGL into a single entry after doing dma_map.
> > 
> > Fragementation for HW page size limitations must be done after
> > mapping to use the APIs correctly.
> 
> It does.
> When building the chunk list (pbl_chunk_list_create) we iterate each sg element
> in EFA_PAGE_SIZE strides.

This loop in pbl_chunk_list_create should use Shiraz's stuff, but it
is OK to update it after his stuff makes it (noting that if Shiraz is
merged first you have to fix it) this.

Mind that the sg offset in that loop is not always zero though.

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