Message ID | 20181213160159.18956-4-marex@denx.de |
---|---|
State | Changes Requested, archived |
Delegated to: | David Miller |
Headers | show |
Series | net: dsa: ksz: Clean up the tag code in prep for more switches | expand |
On Thu, Dec 13, 2018 at 05:01:59PM +0100, Marek Vasut wrote: > In case the destination address is link local, add override bit into the > switch tag to let such a packet through the switch even if the port is down. Hi Marek I think you mean blocked, not down? Reviewed-by: Andrew Lunn <andrew@lunn.ch> Andrew
diff --git a/net/dsa/tag_ksz.c b/net/dsa/tag_ksz.c index 6305c4d4068dc..b2d407ee63e8e 100644 --- a/net/dsa/tag_ksz.c +++ b/net/dsa/tag_ksz.c @@ -108,6 +108,10 @@ static struct sk_buff *ksz9477_xmit(struct sk_buff *skb, addr = skb_mac_header(nskb); *tag = BIT(dp->index); + + if (is_link_local_ether_addr(addr)) + *tag |= KSZ9477_TAIL_TAG_OVERRIDE; + *tag = cpu_to_be16(*tag); return nskb;
In case the destination address is link local, add override bit into the switch tag to let such a packet through the switch even if the port is down. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Tristram Ha <Tristram.Ha@microchip.com> Cc: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Cc: Woojung Huh <woojung.huh@microchip.com> Cc: David S. Miller <davem@davemloft.net> --- V2: New patch --- net/dsa/tag_ksz.c | 4 ++++ 1 file changed, 4 insertions(+)