]> git.baikalelectronics.ru Git - kernel.git/commit
packet: Add fanout support.
authorDavid S. Miller <davem@davemloft.net>
Tue, 5 Jul 2011 08:45:05 +0000 (01:45 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 6 Jul 2011 05:34:52 +0000 (22:34 -0700)
commit3a6d3b9a570106fd586bf874e42f7814a5a0a67d
tree81599e4397761610d5020c03e2571eeceaa859b6
parent55c3c93814c31b293abd784847f472cf9463ac60
packet: Add fanout support.

Fanouts allow packet capturing to be demuxed to a set of AF_PACKET
sockets.  Two fanout policies are implemented:

1) Hashing based upon skb->rxhash

2) Pure round-robin

An AF_PACKET socket must be fully bound before it tries to add itself
to a fanout.  All AF_PACKET sockets trying to join the same fanout
must all have the same bind settings.

Fanouts are identified (within a network namespace) by a 16-bit ID.
The first socket to try to add itself to a fanout with a particular
ID, creates that fanout.  When the last socket leaves the fanout
(which happens only when the socket is closed), that fanout is
destroyed.

Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/if_packet.h
net/packet/af_packet.c