lkml.org 
[lkml]   [2018]   [Mar]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [RFC PATCH] etherdevice.h: net/core: Add ether_addrs.c and global ether_<foo>_addr
From
From: Joe Perches <joe@perches.com>
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@perches.com>
> ---
>
> 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.

\
 
 \ /
  Last update: 2018-03-22 19:33    [W:0.049 / U:0.140 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site