Subject: Re: [PATCH net] docs: net: clarify the NAPI rules around XDP Tx

From: Jakub Kicinski <[email-masked]>
Date: Tue, 25 Jul 2023 17:56:02 -0700

On Tue, 25 Jul 2023 17:02:42 -0700 Alexander Duyck wrote:
> So looking at it more I realized the way we are getting around the
> issue is that the skbuffs are ALWAYS freed in softirq context.
> Basically we hand them off to dev_consume_skb_any, which will hand
> them off to dev_kfree_skb_irq_reason, and it is queueing them up to be
> processed in the net_tx_action handler.

SG.

> As far as the page pool pages themselves I wonder if we couldn't just
> look at modifying __page_pool_put_page() so that it had something
> similar to dev_consume_skb_any_reason() so if we are in a hardirq or
> IRQs are disabled we just force the page to be freed.

Yup (same for the bulk API). I think that Olek was trying to implement
this somehow nicely, not sure how far he got.