On Fri, 21 Oct 2022 09:02:36 +0300 Ilias Apalodimas wrote:
+static bool skb_pp_recycle(struct sk_buff *skb, void *data) +{
if (!IS_ENABLED(CONFIG_PAGE_POOL) || !skb->pp_recycle)
return false;
return page_pool_return_skb_page(virt_to_page(data));
+}
Any particular reason you are removing the inline hint here?
It's recommended in networking to avoid using the inline keyword unless someone actually checked the compiler output and found the compiler is being stupid. I don't know the full history of this recommendation tho.
Doing it like this will add an extra function call for every packet (assuming the compiler decided to inline the previous version)
Should be fine, tiny static function with one caller, I'd bet it's always inlined, even with -Os.