kernel - Major bridging functionality completed
authorMatthew Dillon <dillon@apollo.backplane.com>
Thu, 24 Feb 2011 08:28:23 +0000 (00:28 -0800)
committerMatthew Dillon <dillon@apollo.backplane.com>
Thu, 24 Feb 2011 09:03:13 +0000 (01:03 -0800)
commit70d9a675bf5441cc854a843ead702d08928c37f3
treeb2bbffd41141b7462097c89df65d55ef5760e7f8
parent9e6f3bfc84985f675f33b8a95b66aef7b2c7bd7e
kernel - Major bridging functionality completed

* Rewrite the spanning tree algorithm.  Not well tested but both sides
  properly calculate the blocking pairs for the ports whereas before
  they did not.

  Document the code as needed.  The poor documentation created a lot of
  unnecessary headaches.

  Separate out the peer state from the aggregated state.

* Greatly enhance the 'ifconfig [-v] bridgeN' status output so one
  can see exactly what the state of the sub-interfaces is.

* The bridge interface's ether address can now be modified.  It is also
  possible to add IP addresses to the bridge interface but this has
  not been tested well and might not work.

* Nearly all traffic sourced from interfaces attached to the bridge
  now use the bridge's MAC address.  This includes ARP.  Theoretically
  this means that ganged links between bridges (bonding is NOT yet
  supported! Strictly master/backup)... should be able to failover
  without destroying the ARP tables on various systems.

* Add an experimental LINK2 option to the bridge.  This will eventually
  be channel bonding but doesn't work so hot right now.  At the moment
  it just round-robins output on sub-interfaces with the same MAC (usually
  TAP interfaces).  Ill gets aggregated using the bridge's MAC but the
  comparison is used to create bonding groups.

  This one needs considerably more work on properly adjusting its state
  to DESIGNATED instead of hacking packets over members in the BLOCKING
  state.

* Clean up some of the state transitions used by the LINK1 failover
  feature.

* Change the bridge interface to IFT_ETHER to allow IP and MAC assignments
  and for it to be properly handled in the rest of the stack.

* Aggregate input from all member interfaces into the bridge proper and
  re-output/forward/route as appropriate using the stateful information
  available in the bif lists to handle failover and other features.

* ARP handles MAC snafus due to bridging a little better.

* Changeover to TAILQs from LISTs for bifs.

* Move bif_flags to the bif_info structure so we can use it to hold
  active state.

* Implement SIOCGIFMEDIA in IF_TAP (still needs some work).  This
  is required by the bridge code to properly be able to use TAP
  interfaces as members.
sbin/ifconfig/ifbridge.c
sys/net/bridge/bridgestp.c
sys/net/bridge/if_bridge.c
sys/net/bridge/if_bridgevar.h
sys/net/if_ethersubr.c
sys/net/if_var.h
sys/net/tap/if_tap.c
sys/netinet/if_ether.c