Page MenuHomeVyOS Platform

vyos.ethtool: improve/fix driver name detection
Closed, ResolvedPublic

Description

The current way of looking up the driver name using the sysfs and more specifically the 'module' file, does not work if the driver is not a module.
If the driver is compiled into the kernel directly 'module' does not exist.

This issue is commonly seen when running custom kernels that include certain device drivers with =y instead of =m.
By leveraging the output of 'ethtool --driver <iface>' the driver can be reliably detected in these circumstances too.

Regression tested on x86 for igc and arm64 qemu virtio-net with CONFIG_VIRTIO_NET=y set.

Details

Version
-
Is it a breaking change?
Unspecified (possibly destroys the router)
Issue type
Internal change (not visible to end users)