[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <e6166f35-87d4-4873-a412-fcf62d22e482@intel.com>
Date: Wed, 10 Apr 2024 13:48:54 +0200
From: Alexander Lobakin <aleksander.lobakin@...el.com>
To: Jakub Kicinski <kuba@...nel.org>, Diogo Ivo <diogo.ivo@...mens.com>
CC: <davem@...emloft.net>, <edumazet@...gle.com>, <pabeni@...hat.com>,
<netdev@...r.kernel.org>, <jan.kiszka@...mens.com>
Subject: Re: [PATCH net-next] net: ethernet: Move eth_*_addr_base to global
symbols
From: Jakub Kicinski <kuba@...nel.org>
Date: Tue, 9 Apr 2024 14:58:35 -0700
> On Tue, 9 Apr 2024 17:07:18 +0100 Diogo Ivo wrote:
>> Promote IPv4/6 and Ethernet reserved base addresses to global symbols
>> to avoid local copies being created when these addresses are referenced.
>
> Did someone bloat-o-meter this?
bloat-o-meter would be good, right.
> I agree it's odd but the values are tiny and I'd expect compiler
> to eliminate the dead instances.
The compiler won't copy the arrays to each file which includes
ethernet.h obviously.
> I mean, the instances are literally smaller than a pointer we'll
> need to refer to them, if they can be inlined..
The compilers are sometimes even able to inline extern consts. So,
without bloat-o-meter, I wouldn't assume anything at all :)
Thanks,
Olek
Powered by blists - more mailing lists