Re: [RFC PATCH] etherdevice.h: net/core: Add ether_addrs.c and global ether_<foo>_addr
From: David Miller
Date: Thu Mar 22 2018 - 14:33:31 EST
From: Joe Perches <joe@xxxxxxxxxxx>
Date: Wed, 21 Mar 2018 02:03:37 -0700
> There are multiple instances of static const arrays for broadcast
> and zero ethernet addresses used for various purposes.
>
> Add const u8 ether_<foo>_addr[ETH_ALEN] globals to consolidate these uses.
>
> Miscellanea:
>
> o Move and rename the eth_reserved_addr_base declaration to this file
> and declare it extern to avoid possible multiple static definitions
> o Add compilation to the Makefile
>
> Signed-off-by: Joe Perches <joe@xxxxxxxxxxx>
> ---
>
> Not sure this is the best place for this. Better ideas welcomed.
Well, for one thing you will need to export the symbols.
As for location, anything referencing these symbols or calling helpers
which do should depend upon ethernet.