Subject: Re: [RFC] net: esp: fix bad handling of pages from page_pool

From: Jakub Kicinski <[email-masked]>
Date: Wed, 6 Mar 2024 08:09:31 -0800

On Wed, 6 Mar 2024 16:00:46 +0000 Dragos Tatulea wrote:
> > Hm, that's a judgment call.
> > Part of me wants to put it next to napi_frag_unref(), since we
> > basically need to factor out the insides of this function.
> > When you post the patch the page pool crowd will give us
> > their opinions.
>
> Why not have napi_pp_put_page simply return false if CONFIG_PAGE_POOL is not
> set?

Without LTO it may still be a function call.
Plus, subjectively, I think that it's a bit too much logic to encode in
the caller (you must also check skb->pp_recycle, AFAIU)
Maybe we should make skb_pp_recycle() take struct page and move it to
skbuff.h ? Rename it to skb_page_unref() ?

> Regarding stable would I need to send a separate fix that does the raw pp page
> check without the API?

You can put them in one patch, I reckon.