]> git.baikalelectronics.ru Git - kernel.git/commit
macvlan: add FDB bridge ops and macvlan flags
authorJohn Fastabend <john.r.fastabend@intel.com>
Sun, 15 Apr 2012 06:44:37 +0000 (06:44 +0000)
committerDavid S. Miller <davem@davemloft.net>
Sun, 15 Apr 2012 17:06:05 +0000 (13:06 -0400)
commita3e17141dde26b498f4a33e8139dfe0fc2e874d2
treee214674aeafc01e140cc9d2eb24e5d6fb37b422a
parent7954cc10174fb5f28e3eee227cb39f2827b8bbfd
macvlan: add FDB bridge ops and macvlan flags

This adds FDB bridge ops to the macvlan device passthru mode.
Additionally a flags field was added and a NOPROMISC bit to
allow users to use passthru mode without the driver calling
dev_set_promiscuity(). The flags field is a u16 placed in a
4 byte hole (consuming 2 bytes) of the macvlan_dev struct.

We want to do this so that the macvlan driver or stack
above the macvlan driver does not have to process every
packet. For the use case where we know all the MAC addresses
of the endstations above us this works well.

This patch is a result of Roopa Prabhu's work. Follow up
patches are needed for VEPA and VEB macvlan modes.

v2: Change from distinct nopromisc mode to a flags field to
    configure this. This avoids the tendency to add a new
    mode every time we need some slightly different behavior.
v3: fix error in dev_set_promiscuity and add change and get
    link attributes for flags.

CC: Roopa Prabhu <roprabhu@cisco.com>
CC: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/macvlan.c
include/linux/if_link.h
include/linux/if_macvlan.h