diff options
author | Eric Dumazet <edumazet@google.com> | 2013-02-05 20:22:50 (GMT) |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-02-06 20:59:47 (GMT) |
commit | cd431e738509e74726055390c9e5e81e8e7e03ec (patch) | |
tree | f5efeea14ae9aa00bb18cf96dc357c73a34d6b0a /include | |
parent | 6d1ccff627806829c46091bd9d9835302a3fbf5f (diff) | |
download | linux-cd431e738509e74726055390c9e5e81e8e7e03ec.tar.xz |
macvlan: add multicast filter
Setting up IPv6 addresses on configurations with many macvlans
is not really working, as many multicast messages are dropped.
Add a multicast filter to macvlan to reduce the amount of cloned
skbs and overhead.
Successfully tested with 1024 macvlans on one ethernet device.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Ben Greear <greearb@candelatech.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/if_macvlan.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/if_macvlan.h b/include/linux/if_macvlan.h index f65e8d2..84dde1d 100644 --- a/include/linux/if_macvlan.h +++ b/include/linux/if_macvlan.h @@ -52,6 +52,9 @@ struct macvlan_pcpu_stats { */ #define MAX_MACVTAP_QUEUES (NR_CPUS < 16 ? NR_CPUS : 16) +#define MACVLAN_MC_FILTER_BITS 8 +#define MACVLAN_MC_FILTER_SZ (1 << MACVLAN_MC_FILTER_BITS) + struct macvlan_dev { struct net_device *dev; struct list_head list; @@ -59,6 +62,9 @@ struct macvlan_dev { struct macvlan_port *port; struct net_device *lowerdev; struct macvlan_pcpu_stats __percpu *pcpu_stats; + + DECLARE_BITMAP(mc_filter, MACVLAN_MC_FILTER_SZ); + enum macvlan_mode mode; u16 flags; int (*receive)(struct sk_buff *skb); |