>Subject: Re: [PATCH rdma-next v1 3/6] RDMA/umem: Add API to return aligned >memory blocks from SGL > >On 19-Feb-19 16:57, Shiraz Saleem wrote: >> This helper iterates over the SG list and returns contiguous memory >> blocks aligned to a HW supported page size. >> The implementation is intended to work for HW that support single page >> sizes or mixed page sizes in an MR. Drivers can use this helper to >> retreive the DMA addresses aligned to their best supported page size. >> >> Suggested-by: Jason Gunthorpe <jgg@xxxxxxxx> >> Reviewed-by: Michael J. Ruhl <michael.j.ruhl@xxxxxxxxx> >> Signed-off-by: Shiraz Saleem <shiraz.saleem@xxxxxxxxx> > >Hi Shiraz, >General question about this patch. >I'm going to need a very similar iterator API, except it shouldn't go through an >ib_umem object. Instead, a scatterlist would be given explicitly as a parameter. > >Do you think there's a way to make this code more generic and then use it for >umem as a specific use case? I'll be glad to help with any changes needed. > I think so. And this is part of my exploration for the next rev. Presuming you want the iterator on a DMA mapped SGL too? What do you intend to use it for? Are you looking to the helper to break the SGEs to provide EFA_PAGE_SIZE aligned dma addr when PAGE_SIZE > EFA_PAGE_SIZE? Shiraz