-
Notifications
You must be signed in to change notification settings - Fork 184
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
pkg: net: report backing device address #221
Conversation
WIP because we need tests; to enable tests, we need to have a ghw snapshot in the source tree; I will provide it with a PR soon enough. |
To move forward, we need first to move forward on #224 |
This PR is a precondition to solve #92 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@fromanirh thank you for the PR! Left a couple notes and suggestions inline for ya.
Report the backing device address - currently PCI only - in the network interface data. This allows the client code to fetch the device information using the specific package, for example `pkg/pci`. The PCIAddress field is non-nil only if the backing device is connected through a PCI bus. Non-PCI devices (e.g. USB network interface are not yet supported). Signed-off-by: Francesco Romani <[email protected]>
617636e
to
13f3f64
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome work, @fromanirh :) Thank you!
@fromanirh for a future PR, feel free to update the README.md to list this new PCIAddress field. |
Sure thing! #226 (actually I should have done this earlier :\ ) |
Report the backing device address - currently PCI only -
in the network interface data.
This allows the client code to fetch the device information using
the specific package, for example
pkg/pci
.We prefer to add the address, and not a pointer to the relevant
backing device object, the make the net module less coupled with
the other hardware modules.
Signed-off-by: Francesco Romani [email protected]