On 1/23/21 12:59 PM, Kevin Hao wrote:
> In the current implementation of page_frag_alloc(), it doesn't have
> any align guarantee for the returned buffer address. But for some
> hardwares they do require the DMA buffer to be aligned correctly,
> so we would have to use some workarounds like below i
On Sat, Jan 23, 2021 at 12:52:21PM -0800, Jakub Kicinski wrote:
> On Sat, 23 Jan 2021 19:59:00 +0800 Kevin Hao wrote:
> > +void *page_frag_alloc(struct page_frag_cache *nc,
> > + unsigned int fragsz, gfp_t gfp_mask)
> > +{
> > + return page_frag_alloc_align(nc, fragsz, gfp_mask, 0
On Sat, 23 Jan 2021 19:59:00 +0800 Kevin Hao wrote:
> +void *page_frag_alloc(struct page_frag_cache *nc,
> + unsigned int fragsz, gfp_t gfp_mask)
> +{
> + return page_frag_alloc_align(nc, fragsz, gfp_mask, 0);
> +}
> EXPORT_SYMBOL(page_frag_alloc);
Isn't it better to make th
In the current implementation of page_frag_alloc(), it doesn't have
any align guarantee for the returned buffer address. But for some
hardwares they do require the DMA buffer to be aligned correctly,
so we would have to use some workarounds like below if the buffers
allocated by the page_frag_alloc