lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251118173216.6b584dcb@kernel.org>
Date: Tue, 18 Nov 2025 17:32:16 -0800
From: Jakub Kicinski <kuba@...nel.org>
To: Byungchul Park <byungchul@...com>
Cc: netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
 linux-mm@...ck.org, kernel_team@...ynix.com, harry.yoo@...cle.com,
 hawk@...nel.org, andrew+netdev@...n.ch, david@...hat.com,
 lorenzo.stoakes@...cle.com, Liam.Howlett@...cle.com, vbabka@...e.cz,
 ziy@...dia.com, willy@...radead.org, toke@...hat.com,
 asml.silence@...il.com, alexanderduyck@...com, kernel-team@...a.com,
 davem@...emloft.net, edumazet@...gle.com, pabeni@...hat.com,
 mohsin.bashr@...il.com, almasrymina@...gle.com, jdamato@...tly.com
Subject: Re: [RFC net-next] eth: fbnic: use ring->page_pool instead of
 page->pp in fbnic_clean_twq1()

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@...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;


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ