From e8612fb71a85f314e9b13f2ac05e973ab94f3a21 Mon Sep 17 00:00:00 2001 From: Ian Campbell Date: Thu, 8 Jul 2010 14:30:21 +0100 Subject: [PATCH] [PATCH] vswitch: interface-reconfigure: bring down physical interfaces From df9a459ab60259b88610ac781889f69b73fbffad Mon Sep 17 00:00:00 2001 Date: Thu, 25 Feb 2010 16:15:13 +0000 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. With unit test suite update by Ben Pfaff. Signed-off-by: Ian Campbell --- ...ensource_libexec_InterfaceReconfigureVswitch.py | 7 +++++++ 2 files changed, 17 insertions(+), 0 deletions(-) --- scripts/InterfaceReconfigureVswitch.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/scripts/InterfaceReconfigureVswitch.py b/scripts/InterfaceReconfigureVswitch.py index 0d14251b..67636c0a 100644 --- a/scripts/InterfaceReconfigureVswitch.py +++ b/scripts/InterfaceReconfigureVswitch.py @@ -434,4 +434,11 @@ class DatapathVswitch(Datapath): 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) + datapath_modify_config(vsctl_argv) -- 2.39.5