netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* macvlan: don't broadcast PAUSE frames to macvlan devices
@ 2008-11-26 15:53 Patrick McHardy
  2008-11-26 23:31 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Patrick McHardy @ 2008-11-26 15:53 UTC (permalink / raw)
  To: David S. Miller; +Cc: Linux Netdev List

[-- Attachment #1: Type: text/plain, Size: 0 bytes --]



[-- Attachment #2: 01.diff --]
[-- Type: text/x-patch, Size: 947 bytes --]

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;

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-11-26 23:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-26 15:53 macvlan: don't broadcast PAUSE frames to macvlan devices Patrick McHardy
2008-11-26 23:31 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).