-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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: add GSO flags for linux and android #3420
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @JohnTitor (or someone else) soon. Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (
|
Continuation of this PR |
@bors r+ |
feat: add GSO flags for linux and android Add Generic Segmentation Offload (GSO) flags based on [if_tun.h](/~https://github.com/torvalds/linux/blob/master/include/uapi/linux/if_tun.h#L87) header in Linux and [if_tun.h](https://android.googlesource.com/platform/bionic/+/HEAD/libc/kernel/uapi/linux/if_tun.h#71) header in Android source code. Include the `IFF_NO_CARRIER` flag as well (found in the same files mentioned in the previous paragraph). There is a [PR](#3320 (comment)) similar to mine, but that PR doesn't include GSO flags for UDP (`TUN_F_USO4` and `TUN_F_USO6`), and it is only for Linux. And also, I used `c_uint`type for GSO flags because related ioctl function (`#define TUNSETOFFLOAD _IOW('T', 208, unsigned int)`) get `unsigned int` but that PR uses `c_ushort`.
💔 Test failed - checks-actions |
Added |
👍 @bors r+ |
☀️ Test successful - checks-actions, checks-cirrus-freebsd-12, checks-cirrus-freebsd-13, checks-cirrus-freebsd-14 |
Add Generic Segmentation Offload (GSO) flags based on if_tun.h header in Linux and if_tun.h header in Android source code.
Include the
IFF_NO_CARRIER
flag as well (found in the same files mentioned in the previous paragraph).There is a PR similar to mine, but that PR doesn't include GSO flags for UDP (
TUN_F_USO4
andTUN_F_USO6
), and it is only for Linux. And also, I usedc_uint
type for GSO flags because related ioctl function (#define TUNSETOFFLOAD _IOW('T', 208, unsigned int)
) getunsigned int
but that PR usesc_ushort
.