From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: [RFC PATCH] etherdevice.h: net/core: Add ether_addrs.c and global ether__addr Date: Thu, 22 Mar 2018 14:33:24 -0400 (EDT) Message-ID: <20180322.143324.294736014572721617.davem@davemloft.net> References: <1358caea6069381c231ae9bf6ffb7126cca04321.1521622752.git.joe@perches.com> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: f.fainelli@gmail.com, linux-kernel@vger.kernel.org, netdev@vger.kernel.org To: joe@perches.com Return-path: In-Reply-To: <1358caea6069381c231ae9bf6ffb7126cca04321.1521622752.git.joe@perches.com> Sender: linux-kernel-owner@vger.kernel.org List-Id: netdev.vger.kernel.org From: Joe Perches 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__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 > --- > > 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.