[ovs-dev] [PATCH] bridge: Eject NORMAL flows from datapath after bridge flush.

Jesse Gross jesse at nicira.com
Thu Oct 22 00:48:55 UTC 2009


During a bridge flush we clear the learning table and revalidate all
flows.  When revalidating NORMAL flows we consult the empty learning
table and install flows that flood packets.  This means that existing
flows can continue as is but flooding packets because we don't learn
the MAC addresses as the flows never come to userspace.  The problem
is worse with bonding because we can receive one of the flooded
packets back on a bond slave and learn that port, causing us to send
traffic to the wrong location.
---
 vswitchd/bridge.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/vswitchd/bridge.c b/vswitchd/bridge.c
index fda80f1..446ddfc 100644
--- a/vswitchd/bridge.c
+++ b/vswitchd/bridge.c
@@ -1813,6 +1813,13 @@ process_flow(struct bridge *br, const flow_t *flow,
     struct port *out_port = NULL; /* By default, drop the packet/flow. */
     int vlan;
 
+    /* If we are in the process of revalidating flows due to a flush then
+     * eject the flow.  We just cleared our learning table and as a result
+     * will only install flows that flood packets. */
+    if (!packet && br->flush) {
+        return false;
+    }
+
     /* Find the interface and port structure for the received packet. */
     in_iface = iface_from_dp_ifidx(br, flow->in_port);
     if (!in_iface) {
-- 
1.6.0.4





More information about the dev mailing list