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: add GSO flags for linux and android #3420

Merged
merged 1 commit into from Nov 8, 2023
Merged

Conversation

elecm
Copy link
Contributor

@elecm elecm commented Nov 1, 2023

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 and TUN_F_USO6), and it is only for Linux. And also, I used c_uinttype for GSO flags because related ioctl function (#define TUNSETOFFLOAD _IOW('T', 208, unsigned int)) get unsigned int but that PR uses c_ushort.

@rustbot
Copy link
Collaborator

rustbot commented Nov 1, 2023

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 (S-waiting-on-review and S-waiting-on-author) stays updated, invoking these commands when appropriate:

  • @rustbot author: the review is finished, PR author should check the comments and take action accordingly
  • @rustbot review: the author is ready for a review, this PR will be queued again in the reviewer's queue

@elecm
Copy link
Contributor Author

elecm commented Nov 1, 2023

Continuation of this PR

@JohnTitor
Copy link
Member

@bors r+

@bors
Copy link
Contributor

bors commented Nov 6, 2023

📌 Commit 5a6c5f7 has been approved by JohnTitor

It is now in the queue for this repository.

@bors
Copy link
Contributor

bors commented Nov 6, 2023

⌛ Testing commit 5a6c5f7 with merge 88c6565...

bors added a commit that referenced this pull request Nov 6, 2023
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`.
@bors
Copy link
Contributor

bors commented Nov 6, 2023

💔 Test failed - checks-actions

@elecm
Copy link
Contributor Author

elecm commented Nov 6, 2023

💔 Test failed - checks-actions

Added IFF_NO_CARRIER, TUN_F_USO4, and TUN_F_USO6 to android skip_const list. Now it should works.

@JohnTitor
Copy link
Member

👍 @bors r+

@bors
Copy link
Contributor

bors commented Nov 8, 2023

📌 Commit ab83142 has been approved by JohnTitor

It is now in the queue for this repository.

@bors
Copy link
Contributor

bors commented Nov 8, 2023

⌛ Testing commit ab83142 with merge f2c1788...

@bors
Copy link
Contributor

bors commented Nov 8, 2023

☀️ Test successful - checks-actions, checks-cirrus-freebsd-12, checks-cirrus-freebsd-13, checks-cirrus-freebsd-14
Approved by: JohnTitor
Pushing f2c1788 to main...

@bors bors merged commit f2c1788 into rust-lang:main Nov 8, 2023
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants