[ovs-dev] [PATCH] ovs-vtep: Don't flood to multiple 'uknown-dsts'.

Gurucharan Shetty shettyg at nicira.com
Fri Oct 18 20:14:35 UTC 2013


This commit changes VTEP simulator's flooding logic as follows:

1. Traffic coming from a VTEP physical port will only be flooded
to all the physical ports in the same VTEP that belongs to that logical
switch and to ONLY one of the devices that have been marked as 'unknown-dst'

2. Traffic coming from any device that has 'unknown-dst' marked, will only be
flooded by VTEP to its physical ports that belong to that logical switch.

Bug #20144.
Signed-off-by: Gurucharan Shetty <gshetty at nicira.com>
---
 vtep/ovs-vtep |   11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/vtep/ovs-vtep b/vtep/ovs-vtep
index 93af9a9..721063b 100755
--- a/vtep/ovs-vtep
+++ b/vtep/ovs-vtep
@@ -114,9 +114,20 @@ class Logical_Switch(object):
     def update_flood(self):
         flood_ports = self.ports.values()
 
+        # Traffic flowing from one 'unknown-dst' should not be flooded to
+        # port belonging to another 'unknown-dst'.
+        for tunnel in self.unknown_dsts:
+            port_no = self.tunnels[tunnel][0]
+            ovs_ofctl("add-flow %s table=1,priority=1,in_port=%s,action=%s"
+                        % (self.short_name, port_no, ",".join(flood_ports)))
+
+        # Traffic coming from a VTEP physical port should only be flooded to
+        # one 'unknown-dst' and to all other physical ports that belong to that
+        # VTEP device and this logical switch.
         for tunnel in self.unknown_dsts:
             port_no = self.tunnels[tunnel][0]
             flood_ports.append(port_no)
+            break
 
         ovs_ofctl("add-flow %s table=1,priority=0,action=%s"
                   % (self.short_name, ",".join(flood_ports)))
-- 
1.7.9.5




More information about the dev mailing list