core: set number of SR-IOV VFs asynchronously

System Internals / NetworkManager - Beniamino Galvani [redhat.com] - 28 May 2019 08:35 EDT

When changing the number of VFs the kernel can block for very long time in the write() to sysfs, especially if autoprobe-drivers is enabled. Turn the nm_platform_link_set_sriov_params() into an asynchronous function.

121c58f0c core: set number of SR-IOV VFs asynchronously
src/devices/nm-device.c | 224 +++++++++++++++++++++++++++++++++------
src/platform/nm-linux-platform.c | 129 ++++++++++++++--------
src/platform/nm-platform.c | 32 ++++--
src/platform/nm-platform.h | 18 +++-
4 files changed, 314 insertions(+), 89 deletions(-)

Upstream: cgit.freedesktop.org


  • Share