From: Ilias Apalodimas <ilias.apalodimas@linaro.org>
To: Jakub Kicinski <kuba@kernel.org>
Cc: Yunsheng Lin <linyunsheng@huawei.com>,
davem@davemloft.net, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, linuxarm@openeuler.org,
pabeni@redhat.com, hawk@kernel.org
Subject: Re: [PATCH net-next] net: skb: move skb_pp_recycle() to skbuff.c
Date: Fri, 21 Oct 2022 19:46:45 +0300 [thread overview]
Message-ID: <Y1LM9TdodXYlYzuF@hera> (raw)
In-Reply-To: <20221021085138.19b2c8a7@kernel.org>
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
next prev parent reply other threads:[~2022-10-21 16:47 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-21 2:58 [PATCH net-next] net: skb: move skb_pp_recycle() to skbuff.c Yunsheng Lin
2022-10-21 6:02 ` Ilias Apalodimas
2022-10-21 15:51 ` Jakub Kicinski
2022-10-21 16:46 ` Ilias Apalodimas [this message]
2022-10-24 13:26 ` patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Y1LM9TdodXYlYzuF@hera \
--to=ilias.apalodimas@linaro.org \
--cc=davem@davemloft.net \
--cc=hawk@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxarm@openeuler.org \
--cc=linyunsheng@huawei.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.