netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Ilias Apalodimas <ilias.apalodimas@linaro.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 08:51:38 -0700	[thread overview]
Message-ID: <20221021085138.19b2c8a7@kernel.org> (raw)
In-Reply-To: <CAC_iWj+oKwHkQRKZhELB=5FOj8n-0ZRC7B0uc9F4vF2h7bncHg@mail.gmail.com>

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.

  reply	other threads:[~2022-10-21 15:52 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 [this message]
2022-10-21 16:46     ` Ilias Apalodimas
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=20221021085138.19b2c8a7@kernel.org \
    --to=kuba@kernel.org \
    --cc=davem@davemloft.net \
    --cc=hawk@kernel.org \
    --cc=ilias.apalodimas@linaro.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).