[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250911163952.1e61c6cb@kernel.org>
Date: Thu, 11 Sep 2025 16:39:52 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Théo Lebrun <theo.lebrun@...tlin.com>
Cc: "Karumanchi, Vineeth" <vineeth@....com>, "Andrew Lunn"
<andrew+netdev@...n.ch>, "David S. Miller" <davem@...emloft.net>, "Eric
Dumazet" <edumazet@...gle.com>, "Paolo Abeni" <pabeni@...hat.com>, "Rob
Herring" <robh@...nel.org>, "Krzysztof Kozlowski" <krzk+dt@...nel.org>,
"Conor Dooley" <conor+dt@...nel.org>, "Nicolas Ferre"
<nicolas.ferre@...rochip.com>, "Claudiu Beznea" <claudiu.beznea@...on.dev>,
"Geert Uytterhoeven" <geert@...ux-m68k.org>, "Harini Katakam"
<harini.katakam@...inx.com>, "Richard Cochran" <richardcochran@...il.com>,
"Russell King" <linux@...linux.org.uk>, <netdev@...r.kernel.org>,
<devicetree@...r.kernel.org>, <linux-kernel@...r.kernel.org>, "Thomas
Petazzoni" <thomas.petazzoni@...tlin.com>, "Tawfik Bayouk"
<tawfik.bayouk@...ileye.com>
Subject: Re: [PATCH net v5 3/5] net: macb: move ring size computation to
functions
On Thu, 11 Sep 2025 11:14:52 +0200 Théo Lebrun wrote:
> > it would be good to have these functions as inline.
> > May be as a separate patch.
>
> I don't see why? Compilers are clever pieces, they'll know to inline it.
>
> If we added inline to macb_{tx,rx}_ring_size_per_queue(), should we also
> add it to macb_dma_desc_get_size()? I do not know, but my compiler
> decided to inline it as well. It might make other decisions on other
> platforms.
>
> Last point I see: those two functions are not called in the hotpath,
> only at alloc & free. If we talk about inline for the theoretical speed
> gain, then it doesn't matter in that case. If it is a code size aspect,
> then once again the compiler is more aware than myself.
>
> I don't like the tone, but it is part of the kernel doc and is on topic:
> https://www.kernel.org/doc/html/latest/process/coding-style.html#the-inline-disease
👍️ FWIW, please don't sprinkle inlines.
Powered by blists - more mailing lists