From 36b87338ede898da6a1b86d374d2036683195856 Mon Sep 17 00:00:00 2001 From: Gurucharan Shetty Date: Fri, 18 Oct 2013 13:06:50 -0700 Subject: [PATCH] ovs-vtep: Don't flood to multiple 'uknown-dsts'. 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 Acked-by: Justin Pettit --- vtep/ovs-vtep | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/vtep/ovs-vtep b/vtep/ovs-vtep index 93af9a955..721063b3e 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))) -- 2.43.0