diff mbox

macvlan: don't broadcast PAUSE frames to macvlan devices

Message ID 492D70E2.2040105@trash.net
State Accepted, archived
Delegated to: David Miller
Headers show

Commit Message

Patrick McHardy Nov. 26, 2008, 3:53 p.m. UTC

Comments

David Miller Nov. 26, 2008, 11:31 p.m. UTC | #1
From: Patrick McHardy <kaber@trash.net>
Date: Wed, 26 Nov 2008 16:53:06 +0100

>     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 <greearb@candelatech.com>
>     Tested-by: Ben Greear <greearb@candelatech.com>
>     Signed-off-by: Patrick McHardy <kaber@trash.net>

Applied, thanks Patrick.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

commit 19e521e49972878b133cb1449a5ac38052d36f3d
Author: Patrick McHardy <kaber@trash.net>
Date:   Wed Nov 26 11:48:09 2008 +0100

    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 <greearb@candelatech.com>
    Tested-by: Ben Greear <greearb@candelatech.com>
    Signed-off-by: Patrick McHardy <kaber@trash.net>

diff --git a/drivers/net/macvlan.c b/drivers/net/macvlan.c
index e887921..7e24b50 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;