Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace call to ethtool by ioctl #10

Open
xtor opened this issue Dec 22, 2023 · 0 comments
Open

Replace call to ethtool by ioctl #10

xtor opened this issue Dec 22, 2023 · 0 comments

Comments

@xtor
Copy link
Collaborator

xtor commented Dec 22, 2023

The code currently executes ethtool commands with the Ethtool class:

class CommandEthtool:

In some cases, this leads to problems when two commands are issues consecutively. A workaround is to sleep one second, like in:

def get_rate(self, interface):

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:

  • Create ioctl.py with Ioctl wrapper class
  • Reimplement the required methods
  • Replace the commands in SystemInformation, e.g. for get_rate replace
    def get_rate(self, interface):
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant