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

@@ -663,6 +663,10 @@ class iproute2(utilsBase):
def link_get_mtu(self, ifacename, refresh=False):
return self._cache_get('link', [ifacename, 'mtu'], refresh=refresh)
def link_get_mtu_sysfs(self, ifacename):
return self.read_file_oneline('/sys/class/net/%s/mtu'
%ifacename)
def link_get_kind(self, ifacename):
return self._cache_get('link', [ifacename, 'kind'])