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

feat(s2n-quic-xdp): add syscall for NIC queues #1755

Merged
merged 2 commits into from
May 15, 2023
Merged

Conversation

camshaft
Copy link
Contributor

@camshaft camshaft commented May 9, 2023

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.

@camshaft camshaft force-pushed the camshaft/xdp-ethtool branch from 04c3e0e to e884d18 Compare May 11, 2023 21:14
@camshaft camshaft marked this pull request as ready for review May 11, 2023 21:19
Comment on lines 38 to 40
/// Returns an invalid file descriptor
///
/// This should only be used in tests to avoid creating an actual socket.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment needs an update

@camshaft camshaft force-pushed the camshaft/xdp-ethtool branch from e884d18 to 54e7a61 Compare May 15, 2023 16:37
@camshaft camshaft merged commit b2e152f into main May 15, 2023
@camshaft camshaft deleted the camshaft/xdp-ethtool branch May 15, 2023 18:38
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

Successfully merging this pull request may close these issues.

2 participants