X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=xenserver%2Fopt_xensource_libexec_InterfaceReconfigureBridge.py;h=8803122d8a7ec86dfe46764ac9b14e14c7f74032;hb=535d6987a7af3bef33bf2db21b52bb81e3ea64ee;hp=2a3aa8cead499f37f6ec3aacaad94ac8db49aa7e;hpb=64ddb6fecfe21a7b50c5907dd88de67a87ec6eca;p=openvswitch diff --git a/xenserver/opt_xensource_libexec_InterfaceReconfigureBridge.py b/xenserver/opt_xensource_libexec_InterfaceReconfigureBridge.py index 2a3aa8ce..8803122d 100644 --- a/xenserver/opt_xensource_libexec_InterfaceReconfigureBridge.py +++ b/xenserver/opt_xensource_libexec_InterfaceReconfigureBridge.py @@ -267,6 +267,8 @@ def _configure_physical_interface(pif): pifrec = db().get_pif_record(pif) + log("Configuring physical interface %s" % pifrec['device']) + f = open_pif_ifcfg(pif) f.write("TYPE=Ethernet\n") @@ -278,7 +280,7 @@ def _configure_physical_interface(pif): if len(offload): f.write("ETHTOOL_OFFLOAD_OPTS=\"%s\"\n" % str.join(" ", offload)) - mtu = mtu_setting(pifrec['other_config']) + mtu = mtu_setting(pifrec['network'], "PIF", pifrec['other_config']) if mtu: f.write("MTU=%s\n" % mtu) @@ -336,7 +338,7 @@ def _configure_bond_interface(pif): if len(offload): f.write("ETHTOOL_OFFLOAD_OPTS=\"%s\"\n" % str.join(" ", offload)) - mtu = mtu_setting(pifrec['other_config']) + mtu = mtu_setting(pifrec['network'], "VLAN-PIF", pifrec['other_config']) if mtu: f.write("MTU=%s\n" % mtu) @@ -347,6 +349,7 @@ def _configure_bond_interface(pif): "downdelay": "200", "updelay": "31000", "use_carrier": "1", + "hashing-algorithm": "src_mac", } # override defaults with values from other-config whose keys being with "bond-" @@ -386,7 +389,7 @@ def _configure_vlan_interface(pif): if len(offload): f.write("ETHTOOL_OFFLOAD_OPTS=\"%s\"\n" % str.join(" ", offload)) - mtu = mtu_setting(pifrec['other_config']) + mtu = mtu_setting(pifrec['network'], "Bond-PIF", pifrec['other_config']) if mtu: f.write("MTU=%s\n" % mtu) @@ -421,6 +424,9 @@ def _configure_pif(pif): class DatapathBridge(Datapath): def __init__(self, pif): + if pif_is_tunnel(pif): + raise Error("Tunnel PIFs are not supported in Bridge mode") + Datapath.__init__(self, pif) log("Configured for Bridge datapath")