1
0
mirror of https://github.com/CumulusNetworks/ifupdown2.git synced 2024-05-06 15:54:50 +00:00

addons: address: various fixes for mtu handling

Ticket: CM-6908, CM-6110, CM-13221
Reviewed By: julien, nikhil
Testing Done: added a new test in ifupdown2-tests which covers all cases

- move all mtu handling to a single function in addons/address.py
- Have an ifupdown2 default of 1500 mtu
- add a policy manager max_mtu check (we want to default cumulus max mtu
  to 9216)
- special handling for bond and bridges
        -  print an info log abt setting mtu on bridge
        -  this can be enhanced in the future to look
        at individual port mtu and rejecting the bridge mtu.
        this operation can be expensive right now. Hence
        just an info log.
- bond and vxlan dev mtu follow the rules of physical device mtu

Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
This commit is contained in:
Roopa Prabhu
2016-11-07 10:48:24 -08:00
committed by Julien Fortin
parent d8b6aad0d5
commit 9f30b2cca7
3 changed files with 66 additions and 21 deletions

View File

@@ -138,10 +138,6 @@ class vlan(moduleBase):
raise Exception('rawdevice %s not present' %vlanrawdevice)
if self.ipcmd.link_exists(ifaceobj.name):
self._bridge_vid_add_del(ifaceobj, vlanrawdevice, vlanid)
if ifupdownConfig.config.get('adjust_logical_dev_mtu', '1') != '0' and len(ifaceobj.lowerifaces):
lower_iface_mtu = self.ipcmd.link_get_mtu(ifaceobj.lowerifaces[0], refresh=True)
if not lower_iface_mtu == self.ipcmd.link_get_mtu(ifaceobj.name):
self.ipcmd.link_set_mtu(ifaceobj.name, lower_iface_mtu)
return
netlink.link_add_vlan(vlanrawdevice, ifaceobj.name, vlanid)
self._bridge_vid_add_del(ifaceobj, vlanrawdevice, vlanid)