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

Refactoring: Use Netlink to get netdevice information instead of sysfs where possible #639

Open
adrianchiris opened this issue Feb 19, 2024 · 1 comment

Comments

@adrianchiris
Copy link
Collaborator

Currently we get some netdevice information from sysfs (/sys/class/net//...) and some via netlink.
we should use netlink where possible for implementations of interfaces under host pkg.

From review of the code, where we can switch to netlink is for mtu and mac.

@alkama-hasan
Copy link

Hi @adrianchiris, as i see in the case of mtu and mac it is already using netlink library instead of sysfs (i am referring to pkg/host/internal/network/network.go
but we can use for ifindex also or any more suggestions to replace more low level of accessing filesystem with libraries such as
ghw for getting name from pciAddress or any similar ?let's have a thought on it

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

2 participants