2
0
mirror of https://github.com/openvswitch/ovs synced 2025-10-23 14:57:06 +00:00

CP-1592: interface-reconfigure: Configure network device MTU from Network.MTU field

With override via other-config:mtu field on specific objects in the datamodel.

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

# HG changeset patch
# User Ian Campbell <ian.campbell@citrix.com>
# Date 1267008538 0
# Node ID a91df72fd4bf6329831d3efcae45a5ff55e3ba2e
# Parent  219104a041786d7274b15800de5c3efccf0c4f42
This commit is contained in:
Ian Campbell
2010-02-24 10:48:58 +00:00
committed by Ben Pfaff
parent 5c9a0b820c
commit 9a2b117527
5 changed files with 42 additions and 15 deletions

View File

@@ -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)
@@ -386,7 +388,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)