Change in vdsm[master]: netlink: Do not truncate InfiniBand HW addresses anymore

danken at redhat.com danken at redhat.com
Tue Jun 10 23:30:19 UTC 2014


Dan Kenigsberg has posted comments on this change.

Change subject: netlink: Do not truncate InfiniBand HW addresses anymore
......................................................................


Patch Set 1: Code-Review-1

(1 comment)

http://gerrit.ovirt.org/#/c/28554/1/lib/vdsm/netlink.py
File lib/vdsm/netlink.py:

Line 178:     """Returns the MAC address of a link object or None if the link does not
Line 179:     have a physical address."""
Line 180:     nl_addr = _rtnl_link_get_addr(link)
Line 181:     if nl_addr:
Line 182:         # InfiniBand HW address needs 59+1 bytes
There is no real relation between the catch-all CHARBUFFSIZE to the size of infiniband addresses.

A new

 HWADDRSIZE = 60

constant would make things clearer.
Line 183:         address = (c_char * (CHARBUFFSIZE * 2))()
Line 184:         return _nl_addr2str(nl_addr, address, sizeof(address))
Line 185:     else:
Line 186:         return None


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ib53e6518d0f2f8ea573451d04ae8cb0464142a17
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Ondřej Svoboda <osvoboda at redhat.com>
Gerrit-Reviewer: Antoni Segura Puimedon <asegurap at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Ondřej Svoboda <osvoboda at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list