From 6c2d2a9f8318fea11250a7624144cb06436f91a4 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Fri, 5 Aug 2011 16:58:02 -0700 Subject: [PATCH] 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. --- vswitchd/bridge.c | 5 +++++ vswitchd/vswitch.xml | 18 +++++++++++++----- 2 files changed, 18 insertions(+), 5 deletions(-) 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. +

-- 2.30.2