[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <de39d59b-fce2-4dee-9986-f931619599fe@huawei.com>
Date: Fri, 28 Feb 2025 10:23:28 +0800
From: Yunsheng Lin <linyunsheng@...wei.com>
To: Suman Ghosh <sumang@...vell.com>, <horms@...nel.org>,
<sgoutham@...vell.com>, <gakula@...vell.com>, <sbhatta@...vell.com>,
<hkelam@...vell.com>, <davem@...emloft.net>, <edumazet@...gle.com>,
<kuba@...nel.org>, <pabeni@...hat.com>, <netdev@...r.kernel.org>,
<linux-kernel@...r.kernel.org>, <lcherian@...vell.com>, <jerinj@...vell.com>,
<john.fastabend@...il.com>, <bbhushan2@...vell.com>, <hawk@...nel.org>,
<andrew+netdev@...n.ch>, <ast@...nel.org>, <daniel@...earbox.net>,
<bpf@...r.kernel.org>, <larysa.zaremba@...el.com>
CC: Jesper Dangaard Brouer <hawk@...nel.org>, linux-mm <linux-mm@...ck.org>,
Ilias Apalodimas <ilias.apalodimas@...aro.org>
Subject: Re: [net-next PATCH v6 1/6] octeontx2-pf: use xdp_return_frame() to
free xdp buffers
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;
Powered by blists - more mailing lists