linux-kernel-test/net/bridge
John Fastabend 2469ffd723 net: set and query VEB/VEPA bridge mode via PF_BRIDGE
Hardware switches may support enabling and disabling the
loopback switch which puts the device in a VEPA mode defined
in the IEEE 802.1Qbg specification. In this mode frames are
not switched in the hardware but sent directly to the switch.
SR-IOV capable NICs will likely support this mode I am
aware of at least two such devices. Also I am told (but don't
have any of this hardware available) that there are devices
that only support VEPA modes. In these cases it is important
at a minimum to be able to query these attributes.

This patch adds an additional IFLA_BRIDGE_MODE attribute that can be
set and dumped via the PF_BRIDGE:{SET|GET}LINK operations. Also
anticipating bridge attributes that may be common for both embedded
bridges and software bridges this adds a flags attribute
IFLA_BRIDGE_FLAGS currently used to determine if the command or event
is being generated to/from an embedded bridge or software bridge.
Finally, the event generation is pulled out of the bridge module and
into rtnetlink proper.

For example using the macvlan driver in VEPA mode on top of
an embedded switch requires putting the embedded switch into
a VEPA mode to get the expected results.

	--------  --------
        | VEPA |  | VEPA |       <-- macvlan vepa edge relays
        --------  --------
           |        |
           |        |
        ------------------
        |      VEPA      |       <-- embedded switch in NIC
        ------------------
                |
                |
        -------------------
        | external switch |      <-- shiny new physical
	-------------------          switch with VEPA support

A packet sent from the macvlan VEPA at the top could be
loopbacked on the embedded switch and never seen by the
external switch. So in order for this to work the embedded
switch needs to be set in the VEPA state via the above
described commands.

By making these attributes nested in IFLA_AF_SPEC we allow
future extensions to be made as needed.

CC: Lennert Buytenhek <buytenh@wantstofly.org>
CC: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-10-31 13:18:29 -04:00
..
netfilter Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2012-09-15 11:43:53 -04:00
br_device.c net: create generic bridge ops 2012-10-31 13:18:28 -04:00
br_fdb.c netlink: add attributes to fdb interface 2012-10-01 18:39:44 -04:00
br_forward.c netpoll: check netpoll tx status on the right device 2012-08-14 14:33:32 -07:00
br_if.c bridge: add some comments for NETDEV_RELEASE 2012-08-14 14:33:31 -07:00
br_input.c bridge: Convert compare_ether_addr to ether_addr_equal 2012-05-09 20:49:17 -04:00
br_ioctl.c Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2011-04-11 13:44:25 -07:00
br_multicast.c bridge: Fix enforcement of multicast hash_max limit 2012-07-16 22:59:30 -07:00
br_netfilter.c bridge: Pull ip header into skb->data before looking into ip header. 2012-10-10 22:50:45 -04:00
br_netlink.c net: set and query VEB/VEPA bridge mode via PF_BRIDGE 2012-10-31 13:18:29 -04:00
br_notify.c Bridge: Always send NETDEV_CHANGEADDR up on br MAC change. 2011-08-09 21:44:44 -07:00
br_private_stp.h net: cleanup unsigned to unsigned int 2012-04-15 12:44:40 -04:00
br_private.h net: set and query VEB/VEPA bridge mode via PF_BRIDGE 2012-10-31 13:18:29 -04:00
br_stp_bpdu.c bridge: Convert compare_ether_addr to ether_addr_equal 2012-05-09 20:49:17 -04:00
br_stp_if.c bridge: Convert compare_ether_addr to ether_addr_equal 2012-05-09 20:49:17 -04:00
br_stp_timer.c time: jiffies_delta_to_clock_t() helper to the rescue 2012-08-09 16:17:03 -07:00
br_stp.c net: cleanup unsigned to unsigned int 2012-04-15 12:44:40 -04:00
br_sysfs_br.c bridge: Add multicast_querier toggle and disable queries by default 2012-04-15 12:51:35 -04:00
br_sysfs_if.c bridge: make port attributes const 2012-07-30 14:53:22 -07:00
br.c net:bridge: use IS_ENABLED 2011-12-16 15:49:52 -05:00
Kconfig net: bridge builtin vs. ipv6 modular 2011-03-10 13:45:57 -08:00
Makefile bridge: Add core IGMP snooping support 2010-02-28 00:48:45 -08:00