Skip to content

Add recent socket timestamping flags for Linux and Android #4273

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

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions libc-test/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2024,6 +2024,9 @@ fn test_android(target: &str) {
| "PF_BLOCK_TS"
| "PF_SUSPEND_TASK" => true,

// FIXME(android): Requires >= 6.12 kernel headers.
"SOF_TIMESTAMPING_OPT_RX_FILTER" => true,

_ => false,
}
});
Expand Down Expand Up @@ -4263,6 +4266,12 @@ fn test_linux(target: &str) {
// FIXME(linux): Requires >= 6.11 kernel headers.
"MAP_DROPPABLE" => true,

// FIXME(linux): Requires >= 6.2 kernel headers.
"SOF_TIMESTAMPING_OPT_ID_TCP" => true,

// FIXME(linux): Requires >= 6.12 kernel headers.
"SOF_TIMESTAMPING_OPT_RX_FILTER" => true,

_ => false,
}
});
Expand Down
3 changes: 3 additions & 0 deletions libc-test/semver/android.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2385,9 +2385,12 @@ SOCK_RAW
SOCK_RDM
SOCK_SEQPACKET
SOCK_STREAM
SOF_TIMESTAMPING_BIND_PHC
SOF_TIMESTAMPING_OPT_CMSG
SOF_TIMESTAMPING_OPT_ID
SOF_TIMESTAMPING_OPT_ID_TCP
SOF_TIMESTAMPING_OPT_PKTINFO
SOF_TIMESTAMPING_OPT_RX_FILTER
SOF_TIMESTAMPING_OPT_STATS
SOF_TIMESTAMPING_OPT_TSONLY
SOF_TIMESTAMPING_OPT_TX_SWHW
Expand Down
3 changes: 3 additions & 0 deletions libc-test/semver/linux.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2898,9 +2898,12 @@ SOCK_NONBLOCK
SOCK_PACKET
SOCK_RAW
SOCK_RDM
SOF_TIMESTAMPING_BIND_PHC
SOF_TIMESTAMPING_OPT_CMSG
SOF_TIMESTAMPING_OPT_ID
SOF_TIMESTAMPING_OPT_ID_TCP
SOF_TIMESTAMPING_OPT_PKTINFO
SOF_TIMESTAMPING_OPT_RX_FILTER
SOF_TIMESTAMPING_OPT_STATS
SOF_TIMESTAMPING_OPT_TSONLY
SOF_TIMESTAMPING_OPT_TX_SWHW
Expand Down
3 changes: 3 additions & 0 deletions src/unix/linux_like/android/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2900,6 +2900,9 @@ pub const SOF_TIMESTAMPING_OPT_TSONLY: c_uint = 1 << 11;
pub const SOF_TIMESTAMPING_OPT_STATS: c_uint = 1 << 12;
pub const SOF_TIMESTAMPING_OPT_PKTINFO: c_uint = 1 << 13;
pub const SOF_TIMESTAMPING_OPT_TX_SWHW: c_uint = 1 << 14;
pub const SOF_TIMESTAMPING_BIND_PHC: c_uint = 1 << 15;
pub const SOF_TIMESTAMPING_OPT_ID_TCP: c_uint = 1 << 16;
pub const SOF_TIMESTAMPING_OPT_RX_FILTER: c_uint = 1 << 17;

#[deprecated(
since = "0.2.55",
Expand Down
3 changes: 3 additions & 0 deletions src/unix/linux_like/linux/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4581,6 +4581,9 @@ pub const SOF_TIMESTAMPING_OPT_TSONLY: c_uint = 1 << 11;
pub const SOF_TIMESTAMPING_OPT_STATS: c_uint = 1 << 12;
pub const SOF_TIMESTAMPING_OPT_PKTINFO: c_uint = 1 << 13;
pub const SOF_TIMESTAMPING_OPT_TX_SWHW: c_uint = 1 << 14;
pub const SOF_TIMESTAMPING_BIND_PHC: c_uint = 1 << 15;
pub const SOF_TIMESTAMPING_OPT_ID_TCP: c_uint = 1 << 16;
pub const SOF_TIMESTAMPING_OPT_RX_FILTER: c_uint = 1 << 17;
pub const SOF_TXTIME_DEADLINE_MODE: u32 = 1 << 0;
pub const SOF_TXTIME_REPORT_ERRORS: u32 = 1 << 1;

Expand Down
Loading