Re: [RFC PATCH net-next v1 4/4] net: page_pool: use netmem_t instead of struct page in API

From: Yunsheng Lin
Date: Wed Jan 03 2024 - 04:47:43 EST


On 2024/1/3 0:14, Mina Almasry wrote:
>
> The idea being that skb_frag_page() can return NULL if the frag is not
> paged, and the relevant callers are modified to handle that.

There are many existing drivers which are not expecting NULL returning for
skb_frag_page() as those drivers are not supporting devmem, adding additionl
checking overhead in skb_frag_page() for those drivers does not make much
sense, IMHO, it may make more sense to introduce a new helper for the driver
supporting devmem or networking core that needing dealing with both normal
page and devmem.

And we are also able to keep the old non-NULL returning semantic for
skb_frag_page().