Messages in this thread | | | Date | Fri, 21 Oct 2022 19:46:45 +0300 | From | Ilias Apalodimas <> | Subject | Re: [PATCH net-next] net: skb: move skb_pp_recycle() to skbuff.c |
| |
Hi Jakub On Fri, Oct 21, 2022 at 08:51:38AM -0700, Jakub Kicinski wrote: > 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. >
Ah thanks, didn't know that. IIRC there was no particular reason. Probably because the majority of the functions in that header are static inlines.
> > 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.
Well it's compilers -- I wouldn't bet, but fair enough
Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Thanks /Ilias
| |