]> git.baikalelectronics.ru Git - kernel.git/commit
[NET]: dev_mcast: add multicast list synchronization helpers
authorPatrick McHardy <kaber@trash.net>
Sun, 15 Jul 2007 01:52:02 +0000 (18:52 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sun, 15 Jul 2007 01:52:02 +0000 (18:52 -0700)
commitfb32c44c4fecb899d7db975b426af233d46891b6
tree1391190938fb43587967f44f0ab139a2522b4a65
parente22a2df0aca89a70aca5d0f4b6eb7830fff6f1f7
[NET]: dev_mcast: add multicast list synchronization helpers

The method drivers currently use to synchronize multicast lists is not
very pretty:

- walk the multicast list
- search each entry on a copy of the previous list
- if new add to lower device
- walk the copy of the previous list
- search each entry on the current list
- if removed delete from lower device
- copy entire list

This patch adds a new field to struct dev_addr_list to store the
synchronization state and adds two helper functions for synchronization
and cleanup.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/netdevice.h
net/core/dev_mcast.c