lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Y1LM9TdodXYlYzuF@hera>
Date:   Fri, 21 Oct 2022 19:46:45 +0300
From:   Ilias Apalodimas <ilias.apalodimas@...aro.org>
To:     Jakub Kicinski <kuba@...nel.org>
Cc:     Yunsheng Lin <linyunsheng@...wei.com>, davem@...emloft.net,
        netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
        linuxarm@...neuler.org, pabeni@...hat.com, hawk@...nel.org
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@...aro.org>

Thanks
/Ilias

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ