[ovs-dev] [PATCH 2 of 2] vswitch: interface-reconfigure: bring down physical interfaces

Ian Campbell ian.campbell at citrix.com
Thu Feb 25 08:15:13 PST 2010

This should be done when bringing down the last PIF which uses a
datapath in order to account for VLAN PIFs sharing a datapath.

The logic in bring_down() already acounts for this requirement by
clearing the dp variable if the datapath is still required so if we
get as far as deconfiguring that datapath then it is also correct to
bring down the physical devices.

Signed-off-by: Ian Campbell <ian.campbell at citrix.com>

diff -r cc11e72f2ec0 -r 0ede0363a33a scripts/InterfaceReconfigureVswitch.py
--- a/scripts/InterfaceReconfigureVswitch.py	Thu Feb 25 16:07:59 2010 +0000
+++ b/scripts/InterfaceReconfigureVswitch.py	Thu Feb 25 16:07:59 2010 +0000
@@ -434,4 +434,11 @@
         if dp:
             vsctl_argv += deconfigure_bridge(dp)
+            physical_devices = [pif_netdev_name(p) for p in datapath_get_physical_pifs(dp)]
+            log("action_down: bring down physical devices - %s" % physical_devices)
+            for p in physical_devices:
+                netdev_down(p)

More information about the dev mailing list