Avnu / detd

Proof-of-concept for a developer-friendly system service to handle time-sensitive applications.
BSD 3-Clause "New" or "Revised" License
17 stars 6 forks source link

Replace call to ethtool by ioctl #10

Open xtor opened 8 months ago

xtor commented 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: