Open xtor opened 8 months ago
The code currently executes ethtool commands with the Ethtool class: https://github.com/Avnu/detd/blob/30aeb789903ae66424d0f1c3ce87406d863a0467/detd/ethtool.py#L23
In some cases, this leads to problems when two commands are issues consecutively. A workaround is to sleep one second, like in: https://github.com/Avnu/detd/blob/30aeb789903ae66424d0f1c3ce87406d863a0467/detd/devices/intel_i225.py#L67
This is not optimal, and introduces a delay of 1 second, that accounts for a big chunk of the execution time.
The code should use the SIOCETHTOOL to implement the ethtool operations instead. One suggested implementation could be:
The code currently executes ethtool commands with the Ethtool class: https://github.com/Avnu/detd/blob/30aeb789903ae66424d0f1c3ce87406d863a0467/detd/ethtool.py#L23
In some cases, this leads to problems when two commands are issues consecutively. A workaround is to sleep one second, like in: https://github.com/Avnu/detd/blob/30aeb789903ae66424d0f1c3ce87406d863a0467/detd/devices/intel_i225.py#L67
This is not optimal, and introduces a delay of 1 second, that accounts for a big chunk of the execution time.
The code should use the SIOCETHTOOL to implement the ethtool operations instead. One suggested implementation could be: