Re: [PATCH net-next v1] net: page_pool: factor out page_pool recycle check

From: Jakub Kicinski
Date: Fri Mar 08 2024 - 19:09:03 EST


On Fri, 8 Mar 2024 16:04:14 -0800 Mina Almasry wrote:
> > Could this be made inline?
> >
>
> Looking at the rest of the static functions in this file, they don't
> specify inline, just static. I guess the compiler is smart enough to
> inline static functions in .c files when it makes sense (and does not
> when it doesn't)?
>
> But this doesn't seem to be a kernel wide thing. net/core/dev.c does
> have static inline functions in it, only page_pool.c doesn't do it. I
> guess if there are no objections I can make it static inline to ask
> the compiler to inline it. Likely after the merge window reopens if it
> closes today.

It's all good. We have a policy in netdev of "no inline unless you can
prove it makes a difference". It will not make a difference here and it
will mute the "unused function" warning.