Subject: Re: [RFC net-next 07/22] eth: bnxt: set page pool page order based on rx_page_size

From: Jakub Kicinski <[email-masked]>
Date: Tue, 22 Apr 2025 08:52:37 -0700

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?