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: <aAfRd__DgRYfgubF@mini-arch>
Date: Tue, 22 Apr 2025 10:27:19 -0700
From: Stanislav Fomichev <stfomichev@...il.com>
To: Jakub Kicinski <kuba@...nel.org>
Cc: davem@...emloft.net, netdev@...r.kernel.org, edumazet@...gle.com,
	pabeni@...hat.com, andrew+netdev@...n.ch, horms@...nel.org,
	donald.hunter@...il.com, sdf@...ichev.me, almasrymina@...gle.com,
	dw@...idwei.uk, asml.silence@...il.com, ap420073@...il.com,
	jdamato@...tly.com, dtatulea@...dia.com, michael.chan@...adcom.com
Subject: Re: [RFC net-next 07/22] eth: bnxt: set page pool page order based
 on rx_page_size

On 04/22, Jakub Kicinski wrote:
> On Tue, 22 Apr 2025 08:32:29 -0700 Stanislav Fomichev wrote:
> > > diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
> > > index b611a5ff6d3c..a86bb2ba5adb 100644
> > > --- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c
> > > +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
> > > @@ -3802,6 +3802,7 @@ static int bnxt_alloc_rx_page_pool(struct bnxt *bp,
> > >  	pp.pool_size = bp->rx_agg_ring_size;
> > >  	if (BNXT_RX_PAGE_MODE(bp))
> > >  		pp.pool_size += bp->rx_ring_size;
> > > +	pp.order = get_order(bp->rx_page_size);  
> > 
> > Since it's gonna be configured by the users going forward, for the
> > pps that don't have mp, we might want to check pp.order against
> > MAX_PAGE_ORDER (and/or PAGE_ALLOC_COSTLY_ORDER?) during
> > page_pool_create? 
> 
> Hm, interesting question. Major concern being that users will shoot
> themselves in the foot? Or that syzbot will trigger a warning?

Yeah, both, some WARN_ON in the page allocator. I did trigger one for
MAX_PAGE_ORDER at some point, but not sure about PAGE_ALLOC_COSTLY_ORDER.

Just thinking from the overall setup point of view. I'm assuming that if we
are gonna support >PAGE_SIZE devmem chunks we'll have to tune rx-buf-len
_after_ we've bound dmabuf to the queue? (otherwise we are hitting those
PAGE_ALLOC_COSTLY_ORDER if we do it before) And there is no revert back
to reasonable rx-buf-len on unbind. Or for devmem we'll have some TBD way
to communicate "preferred" rx-buf-len per queue (derived from the dmabuf
binding itself) during the bind?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ