[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1504654510-31004-8-git-send-email-andrew@lunn.ch>
Date: Wed, 6 Sep 2017 01:35:09 +0200
From: Andrew Lunn <andrew@...n.ch>
To: netdev <netdev@...r.kernel.org>
Cc: jiri@...nulli.us, nikolay@...ulusnetworks.com,
Florian Fainelli <f.fainelli@...il.com>,
Vivien Didelot <vivien.didelot@...oirfairelinux.com>,
Andrew Lunn <andrew@...n.ch>
Subject: [PATCH v2 rfc 7/8] net: dsa: set offload_fwd_mark on received packets
The software bridge needs to know if a packet has already been bridged
by hardware offload to ports in the same hardware offload, in order
that it does not re-flood them, causing duplicates. This is
particularly true for multicast traffic which the host has required.
By setting offload_fwd_mark in the skb the bridge will only flood to
ports in other offloads and other netifs.
Signed-off-by: Andrew Lunn <andrew@...n.ch>
---
net/dsa/dsa.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/net/dsa/dsa.c b/net/dsa/dsa.c
index 03c58b0eb082..5732696ac71c 100644
--- a/net/dsa/dsa.c
+++ b/net/dsa/dsa.c
@@ -213,6 +213,7 @@ static int dsa_switch_rcv(struct sk_buff *skb, struct net_device *dev,
skb_push(skb, ETH_HLEN);
skb->pkt_type = PACKET_HOST;
skb->protocol = eth_type_trans(skb, skb->dev);
+ skb->offload_fwd_mark = 1;
s = this_cpu_ptr(p->stats64);
u64_stats_update_begin(&s->syncp);
--
2.14.1
Powered by blists - more mailing lists