integrations-core
integrations-core copied to clipboard
Add collection of ethtool queue stats
What does this PR do?
This PR was previously applied in https://github.com/DataDog/integrations-core/pull/11056
However, this triggered segfault as the buffer's size was incorrect as _u32 element was only counted as one byte.
1 + 32 + 32 + 32 + 32 + 32 + 12 + 5
178
While the correct size should have been
4 + 32 + 32 + 32 + 32 + 32 + 12 + 5 * 4
196
A sizeof confirms it
#include <linux/ethtool.h>
#include <stdio.h>
int main (int argc, char *argv[])
{
printf("%zu\n", sizeof(struct ethtool_drvinfo));
return 0;
}
gcc test.c && ./a.out
196
Motivation
This will provide per queue stats.
Additional Notes
Review checklist (to be filled by reviewers)
- [ ] Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
- [ ] PR title must be written as a CHANGELOG entry (see why)
- [ ] Files changes must correspond to the primary purpose of the PR as described in the title (small unrelated changes should have their own PR)
- [ ] PR must have
changelog/andintegration/labels attached
Codecov Report
Merging #12023 (5d478cd) into master (54ef7cf) will increase coverage by
0.04%. The diff coverage is95.21%.
| Flag | Coverage Δ | |
|---|---|---|
| network | 84.63% <95.21%> (+6.74%) |
:arrow_up: |
Flags with carried forward coverage won't be shown. Click here to find out more.
The validations job has failed; please review the Files changed tab for possible suggestions to resolve.