[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190608120443.21889-13-olteanv@gmail.com>
Date: Sat, 8 Jun 2019 15:04:38 +0300
From: Vladimir Oltean <olteanv@...il.com>
To: f.fainelli@...il.com, vivien.didelot@...il.com, andrew@...n.ch,
davem@...emloft.net, richardcochran@...il.com,
john.stultz@...aro.org, tglx@...utronix.de, sboyd@...nel.org
Cc: linux-kernel@...r.kernel.org, netdev@...r.kernel.org,
Vladimir Oltean <olteanv@...il.com>
Subject: [PATCH v4 net-next 12/17] net: dsa: sja1105: Make sja1105_is_link_local not match meta frames
Although meta frames are configured to be sent at SJA1105_META_DMAC
(01-80-C2-00-00-0E) which is a multicast MAC address that would also be
trapped by the switch to the CPU, were it to receive it on a front-panel
port, meta frames are conceptually not link-local frames, they only
carry their RX timestamps.
The choice of sending meta frames at a multicast DMAC is a pragmatic
one, to avoid installing an extra entry to the DSA master port's
multicast MAC filter.
Signed-off-by: Vladimir Oltean <olteanv@...il.com>
---
Changes in v4:
Since dropping the patch that moves sja1105_is_link_local to
include/linux from the previous series, this now applies over
net/dsa/tag_sja1105.c.
Changes in v3:
Split from previous 09/10 patch (no functional changes).
Changes in v2:
None.
net/dsa/tag_sja1105.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/net/dsa/tag_sja1105.c b/net/dsa/tag_sja1105.c
index 0beb52518d56..094711ced5c0 100644
--- a/net/dsa/tag_sja1105.c
+++ b/net/dsa/tag_sja1105.c
@@ -13,6 +13,8 @@ static inline bool sja1105_is_link_local(const struct sk_buff *skb)
const struct ethhdr *hdr = eth_hdr(skb);
u64 dmac = ether_addr_to_u64(hdr->h_dest);
+ if (ntohs(hdr->h_proto) == ETH_P_SJA1105_META)
+ return false;
if ((dmac & SJA1105_LINKLOCAL_FILTER_A_MASK) ==
SJA1105_LINKLOCAL_FILTER_A)
return true;
--
2.17.1
Powered by blists - more mailing lists