mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager
synced 2024-07-22 02:35:25 +00:00
sriov: don't fail if sriov_totalvfs sysfs file is missing
If sriov_totalvfs file doesn't exist we don't need to consider it a
fatal failure. Try to create the required number of VFs as we were doing
before.
Note: at least netdevsim doesn't have sriov_totalvfs file, I don't know
if there are real drivers that neither has it.
(cherry picked from commit 27eaf34fcf
)
This commit is contained in:
parent
f0133e1a5e
commit
dda94d6f66
|
@ -9218,8 +9218,9 @@ link_set_sriov_params_async(NMPlatform *platform,
|
|||
|
||||
max_vfs = sriov_read_sysctl_uint(platform, dirfd, ifname, "sriov_totalvfs", &error);
|
||||
if (max_vfs < 0) {
|
||||
sriov_async_finish_err(async_state, g_steal_pointer(&error));
|
||||
return;
|
||||
_LOGD("link: can't read max VFs (%s)", error->message);
|
||||
g_clear_error(&error);
|
||||
max_vfs = sriov_params.num_vfs; /* Try to create all */
|
||||
}
|
||||
|
||||
if (sriov_params.num_vfs > max_vfs) {
|
||||
|
|
Loading…
Reference in a new issue