-
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
Add recent socket timestamping flags for Linux and Android #4273
Add recent socket timestamping flags for Linux and Android #4273
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @tgross35 (or someone else) some time within the next two weeks. 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 (
|
Some changes occurred in the Android module cc @maurer |
I see the CI reports:
and I guess that's because the CI uses Ubuntu 24.10, which currently packages What is the usual approach regarding kernel changes not present in the headers used by the CI yet? |
You can update the test crate's build.rs, there are overrides that can be set for each OS |
ac4106b
to
de1f5de
Compare
Linux defines 3 more flags for socket option SO_TIMESTAMPING: - SOF_TIMESTAMPING_BIND_PHC introduced in Linux 5.14 https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=d463126e23f112629edb01594141ca437a92a108 - SOF_TIMESTAMPING_OPT_ID_TCP introduced in Linux 6.2 https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=b534dc46c8ae0165b1b2509be24dbea4fa9c4011 - SOF_TIMESTAMPING_OPT_RX_FILTER introduced in Linux 6.12 https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=be8e9eb3750639aa5cffb3f764ca080caed41bd0 These flags are defined in https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/include/uapi/linux/net_tstamp.h?h=v6.13 Android C library (bionic) picked this flags up: https://android.googlesource.com/platform//bionic/+/9cdc362a2f7463670a766400defcd332a9edfe19/libc/kernel/uapi/linux/net_tstamp.h Update Linux and Android files accordingly.
de1f5de
to
d1d92db
Compare
Thanks for the help! I am trying to update |
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.
Thanks!
Linux defines 3 more flags for socket option SO_TIMESTAMPING: - SOF_TIMESTAMPING_BIND_PHC introduced in Linux 5.14 https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=d463126e23f112629edb01594141ca437a92a108 - SOF_TIMESTAMPING_OPT_ID_TCP introduced in Linux 6.2 https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=b534dc46c8ae0165b1b2509be24dbea4fa9c4011 - SOF_TIMESTAMPING_OPT_RX_FILTER introduced in Linux 6.12 https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=be8e9eb3750639aa5cffb3f764ca080caed41bd0 These flags are defined in https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/include/uapi/linux/net_tstamp.h?h=v6.13 Android C library (bionic) picked this flags up: https://android.googlesource.com/platform//bionic/+/9cdc362a2f7463670a766400defcd332a9edfe19/libc/kernel/uapi/linux/net_tstamp.h Update Linux and Android files accordingly. (backport <rust-lang#4273>) (cherry picked from commit d1d92db)
Linux defines 3 more flags for socket option SO_TIMESTAMPING: - SOF_TIMESTAMPING_BIND_PHC introduced in Linux 5.14 https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=d463126e23f112629edb01594141ca437a92a108 - SOF_TIMESTAMPING_OPT_ID_TCP introduced in Linux 6.2 https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=b534dc46c8ae0165b1b2509be24dbea4fa9c4011 - SOF_TIMESTAMPING_OPT_RX_FILTER introduced in Linux 6.12 https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=be8e9eb3750639aa5cffb3f764ca080caed41bd0 These flags are defined in https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/include/uapi/linux/net_tstamp.h?h=v6.13 Android C library (bionic) picked this flags up: https://android.googlesource.com/platform//bionic/+/9cdc362a2f7463670a766400defcd332a9edfe19/libc/kernel/uapi/linux/net_tstamp.h Update Linux and Android files accordingly. (backport <rust-lang#4273>) (cherry picked from commit d1d92db)
Description
Linux (and Android) defines 3 more flags for socket option
SO_TIMESTAMPING
.Sources
SOF_TIMESTAMPING_BIND_PHC
introduced in Linux 5.14 (https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=d463126e23f112629edb01594141ca437a92a108)SOF_TIMESTAMPING_OPT_ID_TCP
introduced in Linux 6.2 (https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=b534dc46c8ae0165b1b2509be24dbea4fa9c4011)SOF_TIMESTAMPING_OPT_RX_FILTER
introduced in Linux 6.12 (https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=be8e9eb3750639aa5cffb3f764ca080caed41bd0)These flags are defined in https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/include/uapi/linux/net_tstamp.h?h=v6.13
Android C library (bionic) picked this flags up: https://android.googlesource.com/platform//bionic/+/9cdc362a2f7463670a766400defcd332a9edfe19/libc/kernel/uapi/linux/net_tstamp.h
Checklist
libc-test/semver
have been updated*LAST
or*MAX
areincluded (see #3131)
cd libc-test && cargo test --target mytarget
);especially relevant for platforms that may not be checked in CI