On Wed, Feb 20, 2019 at 07:20:26PM +0200, Leon Romanovsky wrote: > On Tue, Feb 19, 2019 at 08:57:40AM -0600, Shiraz Saleem wrote: > > Combine contiguous regions of PAGE_SIZE pages > > into single scatter list entries while adding > > to the scatter table. This minimizes the number > > of the entries in the scatter list and reduces > > the DMA mapping overhead, particularly with the > > IOMMU. > > > > Suggested-by: Jason Gunthorpe <jgg@xxxxxxxx> > > Reviewed-by: Michael J. Ruhl <michael.j.ruhl@xxxxxxxxx> > > Signed-off-by: Shiraz Saleem <shiraz.saleem@xxxxxxxxx> > > --- [...] > > > > +/* ib_umem_add_sg_table - Add N contiguous pages to scatter table > > + * > > + * sg: current scatterlist entry > > + * page_list: array of npage struct page pointers > > + * npages: number of pages in page_list > > + * nents: [out] number of entries in the scatterlist > > + * > > + * Return new end of scatterlist > > + */ > > +struct scatterlist *ib_umem_add_sg_table(struct scatterlist *sg, > > + struct page **page_list, > > + unsigned long npages, > > + int *nents) > > It produces compilation warnings for me, you forgot to put static in > front of function declaration. > > 500b1c079f73 (HEAD -> build) RDMA/umem: Remove hugetlb flag > drivers/infiniband/core/umem.c:75:21: warning: no previous prototype for > _ib_umem_add_sg_table_ [-Wmissing-prototypes] > struct scatterlist *ib_umem_add_sg_table(struct scatterlist *sg, > ^~~~~~~~~~~~~~~~~~~~ I ll fix it. Thanks!