linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Yunsheng Lin <linyunsheng@huawei.com>
To: Suman Ghosh <sumang@marvell.com>, <horms@kernel.org>,
	<sgoutham@marvell.com>, <gakula@marvell.com>,
	<sbhatta@marvell.com>, <hkelam@marvell.com>,
	<davem@davemloft.net>, <edumazet@google.com>, <kuba@kernel.org>,
	<pabeni@redhat.com>, <netdev@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>, <lcherian@marvell.com>,
	<jerinj@marvell.com>, <john.fastabend@gmail.com>,
	<bbhushan2@marvell.com>, <hawk@kernel.org>,
	<andrew+netdev@lunn.ch>, <ast@kernel.org>, <daniel@iogearbox.net>,
	<bpf@vger.kernel.org>, <larysa.zaremba@intel.com>
Cc: Jesper Dangaard Brouer <hawk@kernel.org>,
	linux-mm <linux-mm@kvack.org>,
	Ilias Apalodimas <ilias.apalodimas@linaro.org>
Subject: Re: [net-next PATCH v6 1/6] octeontx2-pf: use xdp_return_frame() to free xdp buffers
Date: Fri, 28 Feb 2025 10:23:28 +0800	[thread overview]
Message-ID: <de39d59b-fce2-4dee-9986-f931619599fe@huawei.com> (raw)
In-Reply-To: <20250213053141.2833254-2-sumang@marvell.com>

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;


           reply	other threads:[~2025-02-28  2:23 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <20250213053141.2833254-2-sumang@marvell.com>]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=de39d59b-fce2-4dee-9986-f931619599fe@huawei.com \
    --to=linyunsheng@huawei.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=ast@kernel.org \
    --cc=bbhushan2@marvell.com \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=gakula@marvell.com \
    --cc=hawk@kernel.org \
    --cc=hkelam@marvell.com \
    --cc=horms@kernel.org \
    --cc=ilias.apalodimas@linaro.org \
    --cc=jerinj@marvell.com \
    --cc=john.fastabend@gmail.com \
    --cc=kuba@kernel.org \
    --cc=larysa.zaremba@intel.com \
    --cc=lcherian@marvell.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=sbhatta@marvell.com \
    --cc=sgoutham@marvell.com \
    --cc=sumang@marvell.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox