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:
@@ -9218,8 +9218,9 @@ link_set_sriov_params_async(NMPlatform *platform,
|
|||||||
|
|
||||||
max_vfs = sriov_read_sysctl_uint(platform, dirfd, ifname, "sriov_totalvfs", &error);
|
max_vfs = sriov_read_sysctl_uint(platform, dirfd, ifname, "sriov_totalvfs", &error);
|
||||||
if (max_vfs < 0) {
|
if (max_vfs < 0) {
|
||||||
sriov_async_finish_err(async_state, g_steal_pointer(&error));
|
_LOGD("link: can't read max VFs (%s)", error->message);
|
||||||
return;
|
g_clear_error(&error);
|
||||||
|
max_vfs = sriov_params.num_vfs; /* Try to create all */
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sriov_params.num_vfs > max_vfs) {
|
if (sriov_params.num_vfs > max_vfs) {
|
||||||
|
Reference in New Issue
Block a user