Don't probe network drivers when initializing SR-IOV VFS

Bug #1888367 reported by Gabriel Barazer
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
os-net-config
New
Undecided
Unassigned

Bug Description

The sriov-config stub provided by os-net-config takes forever to start when using a large number of VFs in SR-IOV mode. Kernels 4.12+ provided a sysfs tunable to avoid driver probing for the VFs and it would be helpful to be able to configure this tunable from the os-net-config sriov_pf config.

The sysfs tunable is /sys/class/net/PF/device/sriov_drivers_autoprobe, available since 4.12+.

This really speeds up startup time, especially when also using link_mode: switchdev, since all VFs started and probed are deleted then recreated as representor types when switching to the switchdev mode.

I fixed my own installation by adding the corresponding sysfs write in os_net_config/sriov_config.py:188:

                sriov_drivers_autoprobe = os.path.join(_SYS_CLASS_NET, item['name'],
                                                       "device/sriov_drivers_autoprobe")
                with open(sriov_drivers_autoprobe, 'w') as a:
                    a.write("0")

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.