From: Ben Pfaff Date: Fri, 5 Aug 2011 23:58:02 +0000 (-0700) Subject: Document and warn that mirroring to a VLAN is incompatible with SLB bonding. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6c2d2a9f8318fea11250a7624144cb06436f91a4;p=openvswitch Document and warn that mirroring to a VLAN is incompatible with SLB bonding. vswitchd/INTERNALS explains the incompatibility: 2. When Open vSwitch forwards a multicast or broadcast packet to a link in the SLB bond other than the active slave, the remote switch will forward it to all of the other links in the SLB bond, including the active slave. Without special handling, this would mean that Open vSwitch would forward a second copy of the packet to each switch port (other than the bond), including the port that originated the packet. Open vSwitch deals with this case by dropping packets received on any SLB bonded link that have a source MAC+VLAN that has been learned on any other port. (This means that SLB as implemented in Open vSwitch relies critically on MAC learning. Notably, SLB is incompatible with the "flood_vlans" feature.) We could go farther than this and automatically change the bonding mode to a safer one (e.g. active-backup) when flood_vlans are enabled. However, that would still leave the SLB fallback for LACP modes in place; perhaps active-backup would have to be the fallback for LACP modes when flood_vlans are enabled. --- diff --git a/vswitchd/bridge.c b/vswitchd/bridge.c index 6a4ebe58..6491590a 100644 --- a/vswitchd/bridge.c +++ b/vswitchd/bridge.c @@ -2256,6 +2256,11 @@ port_configure_bond(struct port *port, struct bond_settings *s, port->name, port->cfg->bond_mode, bond_mode_to_string(s->balance)); } + if (s->balance == BM_SLB && port->bridge->cfg->n_flood_vlans) { + VLOG_WARN("port %s: SLB bonds are incompatible with flood_vlans, " + "please use another bond type or disable flood_vlans", + port->name); + } miimon_interval = atoi(get_port_other_config(port->cfg, "bond-miimon-interval", "0")); diff --git a/vswitchd/vswitch.xml b/vswitchd/vswitch.xml index bcabef56..b8aa813c 100644 --- a/vswitchd/vswitch.xml +++ b/vswitchd/vswitch.xml @@ -334,11 +334,19 @@ - VLAN IDs of VLANs on which MAC address learning should be disabled, so - that packets are flooded instead of being sent to specific ports that - are believed to contain packets' destination MACs. This should - ordinarily be used to disable MAC learning on VLANs used for mirroring - (RSPAN VLANs). It may also be useful for debugging. +

+ VLAN IDs of VLANs on which MAC address learning should be disabled, + so that packets are flooded instead of being sent to specific ports + that are believed to contain packets' destination MACs. This should + ordinarily be used to disable MAC learning on VLANs used for + mirroring (RSPAN VLANs). It may also be useful for debugging. +

+

+ SLB bonding (see the column in + the table) is incompatible with + flood_vlans. Consider using another bonding mode or + a different type of mirror instead. +