Ido Barkan has posted comments on this change.

Change subject: network: restore sriov devices number of vfs
......................................................................


Patch Set 7:

(3 comments)

https://gerrit.ovirt.org/#/c/40088/7/vdsm/network/api.py
File vdsm/network/api.py:

Line 529:                 raise ConfigNetworkError(ne.ERR_LOST_CONNECTION,
Line 530:                                          'connectivity check failed')
Line 531: 
Line 532: 
Line 533: def _update_num_vfs(device_name, num_vfs):
> reintroduced the num_vfs to numvfs consistency
see below comment
Line 534:     with open(_SYSFS_SRIOV_NUMVFS.format(device_name), 'w', 0) as f:
Line 535:         # Zero needs to be written first in order to remove previous 
VFs.
Line 536:         # Trying to just write the number (if n > 0 VF's existed 
before)
Line 537:         # results in 'write error: Device or resource busy'


Line 550:     with open(os.path.join(dir_path, device_name), 'w') as f:
Line 551:         f.write(str(numvfs))
Line 552: 
Line 553: 
Line 554: def changeNumvfs(device_name, num_vfs):
> num_vfs -> numvfs again
that's intended, since this is new code, and a parameter name. I will actually 
want to rename changeNumvfs to change_num_vfs later.
Line 555:     """Change number of virtual functions of a device in a 'safe' 
way. If the
Line 556:     connectivity to engine is lost as a consequence, the value is 
restored.
Line 557:     Since calling this verb is currently blocked by engine if this 
device is
Line 558:     already in use, the logic does not attempt to do anything 
further, such as


https://gerrit.ovirt.org/#/c/40088/7/vdsm/vdsm-restore-net-config
File vdsm/vdsm-restore-net-config:

Line 55:     missing_devices = []  # devices that no longer exist
Line 56: 
Line 57:     if not os.path.exists(_VIRTUAL_FUNCTIONS_PATH):
Line 58:         os.makedirs(_VIRTUAL_FUNCTIONS_PATH)
Line 59:         return 
> Trailing whitespace
Done
Line 60: 
Line 61:     for file_name in os.listdir(_VIRTUAL_FUNCTIONS_PATH):
Line 62:         if file_name not in existing_sriov_devices:
Line 63:             missing_devices.append(file_name)


-- 
To view, visit https://gerrit.ovirt.org/40088
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I76b898019840ffe65939ffad4a1e98829ad3c887
Gerrit-PatchSet: 7
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Ido Barkan <[email protected]>
Gerrit-Reviewer: Dan Kenigsberg <[email protected]>
Gerrit-Reviewer: Francesco Romani <[email protected]>
Gerrit-Reviewer: Ido Barkan <[email protected]>
Gerrit-Reviewer: Martin Polednik <[email protected]>
Gerrit-Reviewer: OndÅ™ej Svoboda <[email protected]>
Gerrit-Reviewer: [email protected]
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to