Re: [PATCH net v3] net: Force inlining of checksum functions in net/checksum.h

2022-02-18 Thread Segher Boessenkool
On Fri, Feb 18, 2022 at 08:29:20AM -0800, Stephen Hemminger wrote: > On Fri, 18 Feb 2022 06:12:37 -0600 > Segher Boessenkool wrote: > > On Fri, Feb 18, 2022 at 10:35:48AM +0900, Masahiro Yamada wrote: > > > On Fri, Feb 18, 2022 at 3:10 AM Segher Boessenkool > > > wrote: > > > > On Fri, Feb 18,

Re: [PATCH net v3] net: Force inlining of checksum functions in net/checksum.h

2022-02-18 Thread Stephen Hemminger
On Fri, 18 Feb 2022 06:12:37 -0600 Segher Boessenkool wrote: > On Fri, Feb 18, 2022 at 10:35:48AM +0900, Masahiro Yamada wrote: > > On Fri, Feb 18, 2022 at 3:10 AM Segher Boessenkool > > wrote: > > > On Fri, Feb 18, 2022 at 02:27:16AM +0900, Masahiro Yamada wrote: > > > > On Fri, Feb 18, 202

Re: [PATCH net v3] net: Force inlining of checksum functions in net/checksum.h

2022-02-18 Thread Segher Boessenkool
On Fri, Feb 18, 2022 at 10:35:48AM +0900, Masahiro Yamada wrote: > On Fri, Feb 18, 2022 at 3:10 AM Segher Boessenkool > wrote: > > On Fri, Feb 18, 2022 at 02:27:16AM +0900, Masahiro Yamada wrote: > > > On Fri, Feb 18, 2022 at 1:49 AM David Laight > > > wrote: > > > > That description is largely

RE: [PATCH net v3] net: Force inlining of checksum functions in net/checksum.h

2022-02-18 Thread David Laight
From: Masahiro Yamada > Sent: 17 February 2022 17:27 > > On Fri, Feb 18, 2022 at 1:49 AM David Laight wrote: > > > > From: Masahiro Yamada > > > Sent: 17 February 2022 16:17 > > ... > > > No. Not that one. > > > > > > The commit you presumably want to revert is: > > > > > > a771f2b82aa2 ("[PATCH

Re: [PATCH net v3] net: Force inlining of checksum functions in net/checksum.h

2022-02-17 Thread Masahiro Yamada
On Fri, Feb 18, 2022 at 3:10 AM Segher Boessenkool wrote: > > On Fri, Feb 18, 2022 at 02:27:16AM +0900, Masahiro Yamada wrote: > > On Fri, Feb 18, 2022 at 1:49 AM David Laight > > wrote: > > > That description is largely fine. > > > > > > Inappropriate 'inline' ought to be removed. > > > Then 'i

Re: [PATCH net v3] net: Force inlining of checksum functions in net/checksum.h

2022-02-17 Thread Segher Boessenkool
On Fri, Feb 18, 2022 at 02:27:16AM +0900, Masahiro Yamada wrote: > On Fri, Feb 18, 2022 at 1:49 AM David Laight wrote: > > That description is largely fine. > > > > Inappropriate 'inline' ought to be removed. > > Then 'inline' means - 'really do inline this'. > > You cannot change "static inline"

Re: [PATCH net v3] net: Force inlining of checksum functions in net/checksum.h

2022-02-17 Thread Masahiro Yamada
On Fri, Feb 18, 2022 at 1:49 AM David Laight wrote: > > From: Masahiro Yamada > > Sent: 17 February 2022 16:17 > ... > > No. Not that one. > > > > The commit you presumably want to revert is: > > > > a771f2b82aa2 ("[PATCH] Add a section about inlining to > > Documentation/CodingStyle") > > > > Th

RE: [PATCH net v3] net: Force inlining of checksum functions in net/checksum.h

2022-02-17 Thread David Laight
From: Masahiro Yamada > Sent: 17 February 2022 16:17 ... > No. Not that one. > > The commit you presumably want to revert is: > > a771f2b82aa2 ("[PATCH] Add a section about inlining to > Documentation/CodingStyle") > > This is now referred to as "__always_inline disease", though. That descript

Re: [PATCH net v3] net: Force inlining of checksum functions in net/checksum.h

2022-02-17 Thread Masahiro Yamada
On Fri, Feb 18, 2022 at 12:15 AM David Laight wrote: > > From: Christophe Leroy > > Sent: 17 February 2022 14:55 > > > > Le 17/02/2022 à 15:50, Christophe Leroy a écrit : > > > Adding Ingo, Andrew and Nick as they were involved in the subjet, > > > > > > Le 17/02/2022 à 14:36, David Laight a écrit

Re: [PATCH net v3] net: Force inlining of checksum functions in net/checksum.h

2022-02-17 Thread Joe Perches
On Thu, 2022-02-17 at 13:19 +0100, Christophe Leroy wrote: > All functions defined as static inline in net/checksum.h are > meant to be inlined for performance reason. > > But since commit ac7c3e4ff401 ("compiler: enable > CONFIG_OPTIMIZE_INLINING forcibly") the compiler is allowed to > uninline f

RE: [PATCH net v3] net: Force inlining of checksum functions in net/checksum.h

2022-02-17 Thread David Laight
From: Christophe Leroy > Sent: 17 February 2022 14:55 > > Le 17/02/2022 à 15:50, Christophe Leroy a écrit : > > Adding Ingo, Andrew and Nick as they were involved in the subjet, > > > > Le 17/02/2022 à 14:36, David Laight a écrit : > >> From: Christophe Leroy > >>> Sent: 17 February 2022 12:19 > >

Re: [PATCH net v3] net: Force inlining of checksum functions in net/checksum.h

2022-02-17 Thread Christophe Leroy
Le 17/02/2022 à 15:50, Christophe Leroy a écrit : Adding Ingo, Andrew and Nick as they were involved in the subjet, Le 17/02/2022 à 14:36, David Laight a écrit : From: Christophe Leroy Sent: 17 February 2022 12:19 All functions defined as static inline in net/checksum.h are meant to be inl

Re: [PATCH net v3] net: Force inlining of checksum functions in net/checksum.h

2022-02-17 Thread Christophe Leroy
Adding Ingo, Andrew and Nick as they were involved in the subjet, Le 17/02/2022 à 14:36, David Laight a écrit : > From: Christophe Leroy >> Sent: 17 February 2022 12:19 >> >> All functions defined as static inline in net/checksum.h are >> meant to be inlined for performance reason. >> >> But since

RE: [PATCH net v3] net: Force inlining of checksum functions in net/checksum.h

2022-02-17 Thread David Laight
From: Christophe Leroy > Sent: 17 February 2022 12:19 > > All functions defined as static inline in net/checksum.h are > meant to be inlined for performance reason. > > But since commit ac7c3e4ff401 ("compiler: enable > CONFIG_OPTIMIZE_INLINING forcibly") the compiler is allowed to > uninline fun

[PATCH net v3] net: Force inlining of checksum functions in net/checksum.h

2022-02-17 Thread Christophe Leroy
All functions defined as static inline in net/checksum.h are meant to be inlined for performance reason. But since commit ac7c3e4ff401 ("compiler: enable CONFIG_OPTIMIZE_INLINING forcibly") the compiler is allowed to uninline functions when it wants. Fair enough in the general case, but for tiny