From: Patrick McHardy Date: Wed, 26 Nov 2008 23:30:48 +0000 (-0800) Subject: macvlan: don't broadcast PAUSE frames to macvlan devices X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=efbbced361f3ff4ff9e85310ccff894185c4d904;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git macvlan: don't broadcast PAUSE frames to macvlan devices PAUSE frames are only relevant for the real device, broadcasting them to all macvlan devices can cause a significant load increase. Reported-by: Ben Greear Tested-by: Ben Greear Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller --- diff --git a/drivers/net/macvlan.c b/drivers/net/macvlan.c index 42394505bb50..590039cbb146 100644 --- a/drivers/net/macvlan.c +++ b/drivers/net/macvlan.c @@ -70,6 +70,9 @@ static void macvlan_broadcast(struct sk_buff *skb, struct sk_buff *nskb; unsigned int i; + if (skb->protocol == htons(ETH_P_PAUSE)) + return; + for (i = 0; i < MACVLAN_HASH_SIZE; i++) { hlist_for_each_entry_rcu(vlan, n, &port->vlan_hash[i], hlist) { dev = vlan->dev;