feat(s2n-quic-xdp): add syscall for NIC queues #1755
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of changes:
This change adds a syscall function to make it easy for the XDP IO provider to query how many queues a NIC has configured and create that many AF_XDP sockets.
Call-outs:
I needed to generate some bindings for the
ethtool
userspace API so that's included here. I've also included some small refactors that didn't seem worth their own PR.Testing:
Since the number of queues is specific to the hardware you're running on, it's hard to write an automated test for this. However, I was able to show it working on my machine with a NIC running the igb driver. I did include an automated test that runs the code and asserts that it has at least 1 queue on loopback, which is probably as much as we can do.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.