Thread (10 messages) 10 messages, 6 authors, 2012-07-17

Re: [PATCH] etherdevice: introduce eth_broadcast_addr

From: Joe Perches <joe@perches.com>
Date: 2012-07-11 01:09:27
Also in: netdev

Possibly related (same subject, not in this thread)

On Tue, 2012-07-10 at 17:41 -0700, David Miller wrote:
From: Paul Gortmaker <redacted>
Date: Tue, 10 Jul 2012 20:09:44 -0400
quoted
On Tue, Jul 10, 2012 at 12:18 PM, Johannes Berg
[off-list ref] wrote:
quoted
From: Johannes Berg <redacted>

A lot of code has either the memset or an inefficient copy
from a static array that contains the all-ones broadcast
Shouldn't we see all that "lot of code" here in this same
commit, now using this new shortcut?
If I grepped properly, there are 42 instances of static arrays for
for broadcast ethernet addresses in drivers/net and drivers/staging
so it'd save some smallish amount of code by using a combination of
is_broadcast_ether_addr and this new func.

I think there are 53 instances of the memset(foo, 0xff, 6|ETH_ALEN).
I disagree and I intend to apply Johannes's patch as-is to net-next.
Sounds fine to me.

For some additional style symmetry, how about a conversion of
random_ether_address to eth_random_addr too via

o Rename random_ether_addr to eth_random_addr and add a
  #define random_ether_addr eth_random_addr
o sed 's/\brandom_ether_addr\b/eth_random_addr/g' files_that_use_REA
o remove the #define after awhile

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help