Skip to content

Commit

Permalink
bridge: Add core IGMP snooping support
Browse files Browse the repository at this point in the history
This patch adds the core functionality of IGMP snooping support
without actually hooking it up.  So this patch should be a no-op
as far as the bridge's external behaviour is concerned.

All the new code and data is controlled by the Kconfig option
BRIDGE_IGMP_SNOOPING.  A run-time toggle is also available.

The multicast switching is done using an hash table that is
lockless on the read-side through RCU.  On the write-side the
new multicast_lock is used for all operations.  The hash table
supports dynamic growth/rehashing.

The hash table will be rehashed if any chain length exceeds a
preset limit.  If rehashing does not reduce the maximum chain
length then snooping will be disabled.

These features may be added in future (in no particular order):

* IGMPv3 source support
* Non-querier router detection
* IPv6

Signed-off-by: Herbert Xu <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
herbertx authored and davem330 committed Feb 28, 2010
1 parent 025d89c commit eb1d164
Show file tree
Hide file tree
Showing 4 changed files with 1,288 additions and 0 deletions.
12 changes: 12 additions & 0 deletions net/bridge/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,15 @@ config BRIDGE
will be called bridge.

If unsure, say N.

config BRIDGE_IGMP_SNOOPING
bool "IGMP snooping"
default y
---help---
If you say Y here, then the Ethernet bridge will be able selectively
forward multicast traffic based on IGMP traffic received from each
port.

Say N to exclude this support and reduce the binary size.

If unsure, say Y.
2 changes: 2 additions & 0 deletions net/bridge/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,6 @@ bridge-$(CONFIG_SYSFS) += br_sysfs_if.o br_sysfs_br.o

bridge-$(CONFIG_BRIDGE_NETFILTER) += br_netfilter.o

bridge-$(CONFIG_BRIDGE_IGMP_SNOOPING) += br_multicast.o

obj-$(CONFIG_BRIDGE_NF_EBTABLES) += netfilter/
Loading

0 comments on commit eb1d164

Please sign in to comment.