* Re: [net-next PATCH v6 1/6] octeontx2-pf: use xdp_return_frame() to free xdp buffers
[not found] ` <20250213053141.2833254-2-sumang@marvell.com>
@ 2025-02-28 2:23 ` Yunsheng Lin
0 siblings, 0 replies; only message in thread
From: Yunsheng Lin @ 2025-02-28 2:23 UTC (permalink / raw)
To: Suman Ghosh, horms, sgoutham, gakula, sbhatta, hkelam, davem,
edumazet, kuba, pabeni, netdev, linux-kernel, lcherian, jerinj,
john.fastabend, bbhushan2, hawk, andrew+netdev, ast, daniel, bpf,
larysa.zaremba
Cc: Jesper Dangaard Brouer, linux-mm, Ilias Apalodimas
On 2025/2/13 13:31, Suman Ghosh wrote:
> - put_page(page);
> cq->pool_ptrs++;
> + if (page->pp) {
It seems the above changing caused the below error for the DMA API misuse
patchset:
https://lore.kernel.org/oe-kbuild-all/202502280250.Bp3jD6ZE-lkp@intel.com/
And it seems this patch uses 'page->pp' being NULL or not to decide if a
page is page_pool owned or not, I am not sure if the buddy page allocator
will always ensure that memory that 'page->pp' points to will always be
zero, even if it is for now, It seems the driver should not use that to
decide if a page is page_pool owned or not.
The PP_SIGNATURE magic macro seems to be correct way to decide if the page
is page_pool owned or not when driver doesn't have its own way to decide
if a page is page_pool owned or not, see:
https://elixir.bootlin.com/linux/v6.14-rc1/source/net/core/skbuff.c#L924
> + page_pool_recycle_direct(pool->page_pool, page);
> + } else {
> + otx2_dma_unmap_page(pfvf, iova, pfvf->rbsize,
> + DMA_FROM_DEVICE);
> + put_page(page);
> + }
> return true;
> }
> return false;
^ permalink raw reply [flat|nested] only message in thread