Change in vdsm[master]: ipwrapper: fix excessive process creation

asegurap at redhat.com asegurap at redhat.com
Sun Dec 22 11:55:57 UTC 2013


Antoni Segura Puimedon has posted comments on this change.

Change subject: ipwrapper: fix excessive process creation
......................................................................


Patch Set 4:

(3 comments)

....................................................
File lib/vdsm/ipwrapper.py
Line 148: 
Line 149:     @staticmethod
Line 150:     def _detectType(name):
Line 151:         """Returns the LinkType for the specified device."""
Line 152:         # TODO: Add support for virtual functions
True, will submit a separate patch.
Line 153:         detectedType = None
Line 154:         try:
Line 155:             driver = _drvinfo(name)
Line 156:         except IOError as ioe:


Line 242:     ETHTOOL_GDRVINFO = 0x00000003  # ETHTOOL Get driver info command
Line 243:     SIOCETHTOOL = 0x8946  # Ethtool interface
Line 244:     DRVINFO_FORMAT = '= I 32s 32s 32s 32s 32s 12s 5I'
Line 245:     IFREQ_FORMAT = '16sPi'  # device_name, buffer_pointer, buffer_len
Line 246:     sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
Done
Line 247:     try:
Line 248:         buff = array.array('c', b'\0' * struct.calcsize(DRVINFO_FORMAT))
Line 249:         cmd = struct.pack('= I', ETHTOOL_GDRVINFO)
Line 250:         buff[0:len(cmd)] = array.array('c', cmd)


Line 247:     try:
Line 248:         buff = array.array('c', b'\0' * struct.calcsize(DRVINFO_FORMAT))
Line 249:         cmd = struct.pack('= I', ETHTOOL_GDRVINFO)
Line 250:         buff[0:len(cmd)] = array.array('c', cmd)
Line 251:         data = struct.pack(IFREQ_FORMAT, devName, *buff.buffer_info())
Done
Line 252:         fcntl.ioctl(sock, SIOCETHTOOL, data)
Line 253:     finally:
Line 254:         sock.close()
Line 255:     (cmd, driver, version, fw_version, businfo, _, _, n_priv_flags, n_stats,


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I8de502669dfa00585d8d775f51be5617cd4f63d0
Gerrit-PatchSet: 4
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Antoni Segura Puimedon <asegurap at redhat.com>
Gerrit-Reviewer: Antoni Segura Puimedon <asegurap at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list