From: Jakub Kicinski <kuba@kernel.org>
To: Byungchul Park <byungchul@sk.com>
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-mm@kvack.org, kernel_team@skhynix.com,
harry.yoo@oracle.com, hawk@kernel.org, andrew+netdev@lunn.ch,
david@redhat.com, lorenzo.stoakes@oracle.com,
Liam.Howlett@oracle.com, vbabka@suse.cz, ziy@nvidia.com,
willy@infradead.org, toke@redhat.com, asml.silence@gmail.com,
alexanderduyck@fb.com, kernel-team@meta.com, davem@davemloft.net,
edumazet@google.com, pabeni@redhat.com, mohsin.bashr@gmail.com,
almasrymina@google.com, jdamato@fastly.com
Subject: Re: [RFC net-next] eth: fbnic: use ring->page_pool instead of page->pp in fbnic_clean_twq1()
Date: Tue, 18 Nov 2025 17:32:16 -0800 [thread overview]
Message-ID: <20251118173216.6b584dcb@kernel.org> (raw)
In-Reply-To: <20251119011146.27493-1-byungchul@sk.com>
On Wed, 19 Nov 2025 10:11:46 +0900 Byungchul Park wrote:
> With the planned removal of @pp from struct page, we should access the
> page pool pointer through other means. Use @page_pool in struct
> fbnic_ring instead.
>
> Signed-off-by: Byungchul Park <byungchul@sk.com>
> ---
> I should admit I'm not used to the following code. So I'd like to ask
> how to alter page->pp to avoid accessing @pp through struct page
> directly. Does the following change work? Or can you suggest other
> ways to achieve it?
@ring in this context is the Tx ring, but it's the Rx ring that has the
page_pool pointer. Each Rx+Tx queue pair has 6 rings in total. You need
the sub0/sub1 ring of the Rx queue from which the page came here.
> diff --git a/drivers/net/ethernet/meta/fbnic/fbnic_txrx.c b/drivers/net/ethernet/meta/fbnic/fbnic_txrx.c
> index b1e8ce89870f..95f158ba6fa2 100644
> --- a/drivers/net/ethernet/meta/fbnic/fbnic_txrx.c
> +++ b/drivers/net/ethernet/meta/fbnic/fbnic_txrx.c
> @@ -653,7 +653,7 @@ static void fbnic_clean_twq1(struct fbnic_napi_vector *nv, bool pp_allow_direct,
> FBNIC_TWD_TYPE_AL;
> total_bytes += FIELD_GET(FBNIC_TWD_LEN_MASK, twd);
>
> - page_pool_put_page(page->pp, page, -1, pp_allow_direct);
> + page_pool_put_page(ring->page_pool, page, -1, pp_allow_direct);
> next_desc:
> head++;
> head &= ring->size_mask;
next prev parent reply other threads:[~2025-11-19 1:32 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-19 1:11 Byungchul Park
2025-11-19 1:32 ` Jakub Kicinski [this message]
2025-11-19 2:45 ` Byungchul Park
2025-11-19 2:48 ` Jakub Kicinski
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=20251118173216.6b584dcb@kernel.org \
--to=kuba@kernel.org \
--cc=Liam.Howlett@oracle.com \
--cc=alexanderduyck@fb.com \
--cc=almasrymina@google.com \
--cc=andrew+netdev@lunn.ch \
--cc=asml.silence@gmail.com \
--cc=byungchul@sk.com \
--cc=davem@davemloft.net \
--cc=david@redhat.com \
--cc=edumazet@google.com \
--cc=harry.yoo@oracle.com \
--cc=hawk@kernel.org \
--cc=jdamato@fastly.com \
--cc=kernel-team@meta.com \
--cc=kernel_team@skhynix.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=lorenzo.stoakes@oracle.com \
--cc=mohsin.bashr@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=toke@redhat.com \
--cc=vbabka@suse.cz \
--cc=willy@infradead.org \
--cc=ziy@nvidia.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