-
Notifications
You must be signed in to change notification settings - Fork 675
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
Support UDP GSO and GRO on linux #1209
Conversation
Looks like your tests are failing because this feature isn't implemented in Travis. You'll have to figure out how to test for the feature's availability at runtime. We have a few other tests that do that already. Also, I wonder if it would be worth converting the Linux CI tests to use Cirrus-ci.com, if it can get us more coverage. |
@asomers I've added the macro to skip tests if kernel version doesn't match. What do you think? |
Is there not a more direct way to check for kernel support? Support could be removed from the kernel configuration, for example, in which case this wouldn't work. |
Unfortunately, I didn't find any direct way to check if UDP offload is supported. Checking the error code on actual call (like I think that considering the kernel version is generally a good idea because we typically know at what version the particular call appeared. Regarding the customization of the kernel, I think it's a pretty common problem for almost any part of nix tests. The good solution would be to check if the particular configuration flag is enabled in kernel config (see here). |
src/sys/socket/mod.rs
Outdated
@@ -617,6 +626,9 @@ pub enum ControlMessage<'a> { | |||
))] | |||
AlgSetAeadAssoclen(&'a u32), | |||
|
|||
///Gso UDP |
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.
Please document this enum variant.
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.
Much better. Just add those comments so I can understand how the tests work. And it looks like you'll need to rebase, too.
c318172
to
bec8fb4
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.
Ok, looks good! Now just add a CHANGELOG message, and you can go ahead and squash your commits.
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.
bors r+
Build succeeded: |
This PR implements support for UDP GSO and GRO on Linux. It provides the way to send/receive UDP payloads bigger than interface MTU. The goal is to improve UDP performance.
GSO was introduced in Linux 4.18, GRO in 5.3