X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=xenserver%2Fopt_xensource_libexec_InterfaceReconfigureVswitch.py;h=ef3ed090e1b7a6d972928173256aeb7cc5de87c6;hb=3b1acc9955fa9c595f6b9e41999aa40041c7b049;hp=6e5deb7ed8bb926f0fcfeb7203c0d33b3ada02b8;hpb=e91087c7f935b74f818739e9a8ec86cc15679cbc;p=openvswitch diff --git a/xenserver/opt_xensource_libexec_InterfaceReconfigureVswitch.py b/xenserver/opt_xensource_libexec_InterfaceReconfigureVswitch.py index 6e5deb7e..ef3ed090 100644 --- a/xenserver/opt_xensource_libexec_InterfaceReconfigureVswitch.py +++ b/xenserver/opt_xensource_libexec_InterfaceReconfigureVswitch.py @@ -89,8 +89,9 @@ def pif_currently_in_use(pif): def pif_datapath(pif): """Return the datapath PIF associated with PIF. -For a non-VLAN PIF, the datapath name is the bridge name. -For a VLAN PIF, the datapath name is the bridge name for the PIF's VLAN slave. +A non-VLAN PIF is its own datapath PIF, except that a bridgeless PIF has +no datapath PIF at all. +A VLAN PIF's datapath PIF is its VLAN slave's datapath PIF. """ if pif_is_vlan(pif): return pif_datapath(pif_get_vlan_slave(pif)) @@ -330,6 +331,7 @@ class DatapathVswitch(Datapath): extra_ports = [] pifrec = db().get_pif_record(self._pif) + dprec = db().get_pif_record(self._dp) ipdev = self._ipdev bridge = pif_bridge_name(self._dp) @@ -366,9 +368,9 @@ class DatapathVswitch(Datapath): # XXX Needs support in ovs-vsctl #if bridge == ipdev: - # vsctl_argv += ['--add=bridge.%s.mac=%s' % (bridge, pifrec['MAC'])] + # vsctl_argv += ['--add=bridge.%s.mac=%s' % (bridge, dprec['MAC'])] #else: - # vsctl_argv += ['--add=iface.%s.mac=%s' % (ipdev, pifrec['MAC'])] + # vsctl_argv += ['--add=iface.%s.mac=%s' % (ipdev, dprec['MAC'])] self._vsctl_argv = vsctl_argv self._extra_ports = extra_ports