Dan Kenigsberg has posted comments on this change.

Change subject: Change getMaxMtu to use the info provided by sysfs
......................................................................


Patch Set 1: I would prefer that you didn't submit this

(2 inline comments)

....................................................
File vdsm/configNetwork.py
Line 905:         configWriter = ConfigWriter()
Line 906: 
Line 907:     prevmtu = None
Line 908:     if mtu:
Line 909:         prevmtu = netinfo.getMaxMtu(nics)
I think that Igor's point is that the maximzation should include the "mtu" arg, 
not only "nics".
Line 910: 
Line 911:     nic = nics[0] if nics else None
Line 912:     iface = bonding or nic
Line 913:     if bridged:


....................................................
File vdsm/netinfo.py
Line 123: 
Line 124: 
Line 125: def getMaxMtu(nics):
Line 126:     maxMtu = int(getMtu(nics[0]))
Line 127:     for nic in nics[1:]:
I really like Python's

 max(nics, lambda nic: int(getMtu(nic)))
Line 128:         mtu = int(getMtu(nics[0]))
Line 129:         if mtu > maxMtu:
Line 130:             maxMtu = mtu
Line 131:     return maxMtu


--
To view, visit http://gerrit.ovirt.org/11357
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I89d007eb81c2c64e642ed80af26f882f7632dc1c
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Mark Wu <[email protected]>
Gerrit-Reviewer: Antoni Segura Puimedon <[email protected]>
Gerrit-Reviewer: Dan Kenigsberg <[email protected]>
Gerrit-Reviewer: Igor Lvovsky <[email protected]>
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to