diff options
author | Beniamino Galvani <bgalvani@redhat.com> | 2018-12-12 14:17:24 +0100 |
---|---|---|
committer | Beniamino Galvani <bgalvani@redhat.com> | 2018-12-12 14:20:32 +0100 |
commit | 359ff57ae92b1e28320d0d397d3a0f3f88afc201 (patch) | |
tree | cac3d1319f92edad37ce6cc047fd7dad2f20f127 | |
parent | c2e1b5c4c447dfbdc9e176edefcdb04ab8f9de45 (diff) | |
download | NetworkManager-bg/sriov-fixes.tar.gz |
platform: sriov: write new values when we can't read old onesbg/sriov-fixes
Fixes: 7df33338797fc335c245fed65ac1186284afc357
-rw-r--r-- | src/platform/nm-linux-platform.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/platform/nm-linux-platform.c b/src/platform/nm-linux-platform.c index 4189176f9e..8b4b081f64 100644 --- a/src/platform/nm-linux-platform.c +++ b/src/platform/nm-linux-platform.c @@ -5741,8 +5741,9 @@ link_set_sriov_params (NMPlatform *platform, { nm_auto_pop_netns NMPNetns *netns = NULL; nm_auto_close int dirfd = -1; - gboolean current_autoprobe; - guint total, current_num; + int current_autoprobe; + guint total; + gint64 current_num; char ifname[IFNAMSIZ]; char buf[64]; @@ -5775,12 +5776,12 @@ link_set_sriov_params (NMPlatform *platform, NMP_SYSCTL_PATHID_NETDIR (dirfd, ifname, "device/sriov_numvfs"), - 10, 0, G_MAXUINT, 0); + 10, 0, G_MAXUINT, -1); current_autoprobe = nm_platform_sysctl_get_int_checked (platform, NMP_SYSCTL_PATHID_NETDIR (dirfd, ifname, "device/sriov_drivers_autoprobe"), - 10, 0, G_MAXUINT, 0); + 10, 0, 1, -1); if ( current_num == num_vfs && (autoprobe == NM_TERNARY_DEFAULT || current_autoprobe == autoprobe)) return TRUE; |