* [PATCH net-next] net: Define eth_stp_addr in linux/etherdevice.h
@ 2017-11-02 9:36 Egil Hjelmeland
2017-11-02 12:53 ` [Bridge] " Andrew Lunn
2017-11-03 5:18 ` [Bridge] " David Miller
0 siblings, 2 replies; 5+ messages in thread
From: Egil Hjelmeland @ 2017-11-02 9:36 UTC (permalink / raw)
To: andrew, vivien.didelot, f.fainelli, rafal, stephen, bridge,
netdev, linux-kernel
Cc: Egil Hjelmeland
Why:
The lan9303 driver defines eth_stp_addr as a synonym to
eth_reserved_addr_base to get the STP ethernet address 01:80:c2:00:00:00.
eth_reserved_addr_base is also used to define the start of Bridge Reserved
ethernet address range, which happen to be the STP address.
br_dev_setup refer to eth_reserved_addr_base as a definition of STP
address.
Clean up by:
- Move the eth_stp_addr definition to linux/etherdevice.h
- Use eth_stp_addr instead of eth_reserved_addr_base in br_dev_setup.
Signed-off-by: Egil Hjelmeland <privat@egil-hjelmeland.no>
---
include/linux/dsa/lan9303.h | 2 --
include/linux/etherdevice.h | 1 +
net/bridge/br_device.c | 2 +-
3 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/include/linux/dsa/lan9303.h b/include/linux/dsa/lan9303.h
index b2110e69630f..05d8d136baab 100644
--- a/include/linux/dsa/lan9303.h
+++ b/include/linux/dsa/lan9303.h
@@ -34,5 +34,3 @@ struct lan9303 {
**/
struct lan9303_alr_cache_entry alr_cache[LAN9303_NUM_ALR_RECORDS];
};
-
-#define eth_stp_addr eth_reserved_addr_base
diff --git a/include/linux/etherdevice.h b/include/linux/etherdevice.h
index 2d9f80848d4b..263dbcad22fc 100644
--- a/include/linux/etherdevice.h
+++ b/include/linux/etherdevice.h
@@ -66,6 +66,7 @@ int eth_gro_complete(struct sk_buff *skb, int nhoff);
/* Reserved Ethernet Addresses per IEEE 802.1Q */
static const u8 eth_reserved_addr_base[ETH_ALEN] __aligned(2) =
{ 0x01, 0x80, 0xc2, 0x00, 0x00, 0x00 };
+#define eth_stp_addr eth_reserved_addr_base
/**
* is_link_local_ether_addr - Determine if given Ethernet address is link-local
diff --git a/net/bridge/br_device.c b/net/bridge/br_device.c
index 28bb22186fa0..af5b8c87f590 100644
--- a/net/bridge/br_device.c
+++ b/net/bridge/br_device.c
@@ -421,7 +421,7 @@ void br_dev_setup(struct net_device *dev)
br->bridge_id.prio[0] = 0x80;
br->bridge_id.prio[1] = 0x00;
- ether_addr_copy(br->group_addr, eth_reserved_addr_base);
+ ether_addr_copy(br->group_addr, eth_stp_addr);
br->stp_enabled = BR_NO_STP;
br->group_fwd_mask = BR_GROUPFWD_DEFAULT;
--
2.11.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH net-next] net: Define eth_stp_addr in linux/etherdevice.h
2017-11-02 9:36 [PATCH net-next] net: Define eth_stp_addr in linux/etherdevice.h Egil Hjelmeland
@ 2017-11-02 12:53 ` Andrew Lunn
2017-11-03 5:18 ` [Bridge] " David Miller
1 sibling, 0 replies; 5+ messages in thread
From: Andrew Lunn @ 2017-11-02 12:53 UTC (permalink / raw)
To: Egil Hjelmeland
Cc: vivien.didelot, f.fainelli, rafal, stephen, bridge, netdev, linux-kernel
On Thu, Nov 02, 2017 at 10:36:48AM +0100, Egil Hjelmeland wrote:
> Why:
Please drop the Why.
> The lan9303 driver defines eth_stp_addr as a synonym to
> eth_reserved_addr_base to get the STP ethernet address 01:80:c2:00:00:00.
>
> eth_reserved_addr_base is also used to define the start of Bridge Reserved
> ethernet address range, which happen to be the STP address.
>
> br_dev_setup refer to eth_reserved_addr_base as a definition of STP
> address.
>
> Clean up by:
> - Move the eth_stp_addr definition to linux/etherdevice.h
> - Use eth_stp_addr instead of eth_reserved_addr_base in br_dev_setup.
>
> Signed-off-by: Egil Hjelmeland <privat@egil-hjelmeland.no>
I was thinking along the same lines when reviewing your lan9303 patch.
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Andrew
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Bridge] [PATCH net-next] net: Define eth_stp_addr in linux/etherdevice.h
@ 2017-11-02 12:53 ` Andrew Lunn
0 siblings, 0 replies; 5+ messages in thread
From: Andrew Lunn @ 2017-11-02 12:53 UTC (permalink / raw)
To: Egil Hjelmeland
Cc: f.fainelli, vivien.didelot, netdev, bridge, linux-kernel, rafal
On Thu, Nov 02, 2017 at 10:36:48AM +0100, Egil Hjelmeland wrote:
> Why:
Please drop the Why.
> The lan9303 driver defines eth_stp_addr as a synonym to
> eth_reserved_addr_base to get the STP ethernet address 01:80:c2:00:00:00.
>
> eth_reserved_addr_base is also used to define the start of Bridge Reserved
> ethernet address range, which happen to be the STP address.
>
> br_dev_setup refer to eth_reserved_addr_base as a definition of STP
> address.
>
> Clean up by:
> - Move the eth_stp_addr definition to linux/etherdevice.h
> - Use eth_stp_addr instead of eth_reserved_addr_base in br_dev_setup.
>
> Signed-off-by: Egil Hjelmeland <privat@egil-hjelmeland.no>
I was thinking along the same lines when reviewing your lan9303 patch.
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Andrew
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH net-next] net: Define eth_stp_addr in linux/etherdevice.h
2017-11-02 9:36 [PATCH net-next] net: Define eth_stp_addr in linux/etherdevice.h Egil Hjelmeland
@ 2017-11-03 5:18 ` David Miller
2017-11-03 5:18 ` [Bridge] " David Miller
1 sibling, 0 replies; 5+ messages in thread
From: David Miller @ 2017-11-03 5:18 UTC (permalink / raw)
To: privat
Cc: andrew, vivien.didelot, f.fainelli, rafal, stephen, bridge,
netdev, linux-kernel
From: Egil Hjelmeland <privat@egil-hjelmeland.no>
Date: Thu, 2 Nov 2017 10:36:48 +0100
> The lan9303 driver defines eth_stp_addr as a synonym to
> eth_reserved_addr_base to get the STP ethernet address 01:80:c2:00:00:00.
>
> eth_reserved_addr_base is also used to define the start of Bridge Reserved
> ethernet address range, which happen to be the STP address.
>
> br_dev_setup refer to eth_reserved_addr_base as a definition of STP
> address.
>
> Clean up by:
> - Move the eth_stp_addr definition to linux/etherdevice.h
> - Use eth_stp_addr instead of eth_reserved_addr_base in br_dev_setup.
>
> Signed-off-by: Egil Hjelmeland <privat@egil-hjelmeland.no>
Applied, thank you.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Bridge] [PATCH net-next] net: Define eth_stp_addr in linux/etherdevice.h
@ 2017-11-03 5:18 ` David Miller
0 siblings, 0 replies; 5+ messages in thread
From: David Miller @ 2017-11-03 5:18 UTC (permalink / raw)
To: privat
Cc: andrew, f.fainelli, vivien.didelot, netdev, bridge, linux-kernel, rafal
From: Egil Hjelmeland <privat@egil-hjelmeland.no>
Date: Thu, 2 Nov 2017 10:36:48 +0100
> The lan9303 driver defines eth_stp_addr as a synonym to
> eth_reserved_addr_base to get the STP ethernet address 01:80:c2:00:00:00.
>
> eth_reserved_addr_base is also used to define the start of Bridge Reserved
> ethernet address range, which happen to be the STP address.
>
> br_dev_setup refer to eth_reserved_addr_base as a definition of STP
> address.
>
> Clean up by:
> - Move the eth_stp_addr definition to linux/etherdevice.h
> - Use eth_stp_addr instead of eth_reserved_addr_base in br_dev_setup.
>
> Signed-off-by: Egil Hjelmeland <privat@egil-hjelmeland.no>
Applied, thank you.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2017-11-03 5:18 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-02 9:36 [PATCH net-next] net: Define eth_stp_addr in linux/etherdevice.h Egil Hjelmeland
2017-11-02 12:53 ` Andrew Lunn
2017-11-02 12:53 ` [Bridge] " Andrew Lunn
2017-11-03 5:18 ` David Miller
2017-11-03 5:18 ` [Bridge] " David Miller
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.