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 #3405

Closed
wants to merge 5 commits into from
Closed

feat: add GSO flags for linux and android #3405

wants to merge 5 commits into from

Conversation

elecm
Copy link
Contributor

@elecm elecm commented Oct 25, 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 Oct 25, 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 Oct 25, 2023

Tests were run on Ubuntu 22.04, but its kernel does not support IFF_NO_CARRIER, TUN_F_USO4, and TUN_F_USO6.
Ubuntu 22.04.3 upgrades its kernel to 6.2 and supports them.

@bors
Copy link
Contributor

bors commented Oct 25, 2023

☔ The latest upstream changes (presumably #3320) made this pull request unmergeable. Please resolve the merge conflicts.

@devnexen
Copy link
Contributor

Tests were run on Ubuntu 22.04, but its kernel does not support IFF_NO_CARRIER, TUN_F_USO4, and TUN_F_USO6. Ubuntu 22.04.3 upgrades its kernel to 6.2 and supports them.

If that is the case, it s necessary to put the aforementioned constants as exceptions in the skip_const() helper.

@JohnTitor
Copy link
Member

Could you squash commits into one?

@elecm
Copy link
Contributor Author

elecm commented Nov 1, 2023

I will open another PR, I couldn't squash a merge commit in my commits.

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

8 participants