-
Notifications
You must be signed in to change notification settings - Fork 356
add sriov, power state and numa node info in PciDevice #748
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
Conversation
Signed-off-by: Jain Johny <[email protected]>
Signed-off-by: Jain Johny <[email protected]>
Signed-off-by: Jain Johny <[email protected]>
Signed-off-by: Jain Johny <[email protected]>
support for sriov, numa and power management config
Signed-off-by: Jain Johny <[email protected]>
Signed-off-by: root <[email protected]> Signed-off-by: Jain Johny <[email protected]>
sysfs/pci_device.go
Outdated
|
|
||
| // These files must exist in a device directory. | ||
| for _, f := range [...]string{"class", "vendor", "device", "subsystem_vendor", "subsystem_device", "revision"} { | ||
| for _, f := range [...]string{"class", "vendor", "device", "subsystem_vendor", "subsystem_device", "revision", "numa_node"} { |
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.
Are we sure numa_node is always going to exist? Even on older kernels? We tend to support some pretty old kernel versions here.
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.
From 2.6.21 onwards as per
https://kernelnewbies.org/Linux_2_6_21
and
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=81bb0e198b4638ac65233b316f4588639dfe1fcd
But I think I made a mixup here. I used *int32 to make it optional. But added to this list of mandatory files. Will move it out.
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.
Thanks for double checking the versions. We used to support 2.6.32, but recently Go changed to >= 3.2.0.
So that works.
SuperQ
left a comment
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.
Thanks, this mostly looks good. Question about the new required file.
Signed-off-by: Jain Johny <[email protected]>
|
SuperQ
left a comment
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.
Thanks!
I found these important for the observability tool I am building. Once this is merged, I will be adding these to the p8s collector as well.
Test case added from a Intel E810 NIC.
I am not really interested in Offset, Stride VfDevice and MSI-X. Just added for completeness. Please let me know if I should rather remove them.
@discordianfish for your kind review.
ref: https://www.kernel.org/doc/Documentation/ABI/testing/sysfs-bus-pci