Skip to content

Commit 5a8eb47

Browse files
authored
Merge pull request #4273 from fishilico/add-3-SOF_TIMESTAMPING-flags-linux
Add recent socket timestamping flags for Linux and Android
2 parents 0e99e0a + d1d92db commit 5a8eb47

File tree

5 files changed

+21
-0
lines changed

5 files changed

+21
-0
lines changed

libc-test/build.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2024,6 +2024,9 @@ fn test_android(target: &str) {
20242024
| "PF_BLOCK_TS"
20252025
| "PF_SUSPEND_TASK" => true,
20262026

2027+
// FIXME(android): Requires >= 6.12 kernel headers.
2028+
"SOF_TIMESTAMPING_OPT_RX_FILTER" => true,
2029+
20272030
_ => false,
20282031
}
20292032
});
@@ -4263,6 +4266,12 @@ fn test_linux(target: &str) {
42634266
// FIXME(linux): Requires >= 6.11 kernel headers.
42644267
"MAP_DROPPABLE" => true,
42654268

4269+
// FIXME(linux): Requires >= 6.2 kernel headers.
4270+
"SOF_TIMESTAMPING_OPT_ID_TCP" => true,
4271+
4272+
// FIXME(linux): Requires >= 6.12 kernel headers.
4273+
"SOF_TIMESTAMPING_OPT_RX_FILTER" => true,
4274+
42664275
_ => false,
42674276
}
42684277
});

libc-test/semver/android.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2385,9 +2385,12 @@ SOCK_RAW
23852385
SOCK_RDM
23862386
SOCK_SEQPACKET
23872387
SOCK_STREAM
2388+
SOF_TIMESTAMPING_BIND_PHC
23882389
SOF_TIMESTAMPING_OPT_CMSG
23892390
SOF_TIMESTAMPING_OPT_ID
2391+
SOF_TIMESTAMPING_OPT_ID_TCP
23902392
SOF_TIMESTAMPING_OPT_PKTINFO
2393+
SOF_TIMESTAMPING_OPT_RX_FILTER
23912394
SOF_TIMESTAMPING_OPT_STATS
23922395
SOF_TIMESTAMPING_OPT_TSONLY
23932396
SOF_TIMESTAMPING_OPT_TX_SWHW

libc-test/semver/linux.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2898,9 +2898,12 @@ SOCK_NONBLOCK
28982898
SOCK_PACKET
28992899
SOCK_RAW
29002900
SOCK_RDM
2901+
SOF_TIMESTAMPING_BIND_PHC
29012902
SOF_TIMESTAMPING_OPT_CMSG
29022903
SOF_TIMESTAMPING_OPT_ID
2904+
SOF_TIMESTAMPING_OPT_ID_TCP
29032905
SOF_TIMESTAMPING_OPT_PKTINFO
2906+
SOF_TIMESTAMPING_OPT_RX_FILTER
29042907
SOF_TIMESTAMPING_OPT_STATS
29052908
SOF_TIMESTAMPING_OPT_TSONLY
29062909
SOF_TIMESTAMPING_OPT_TX_SWHW

src/unix/linux_like/android/mod.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2900,6 +2900,9 @@ pub const SOF_TIMESTAMPING_OPT_TSONLY: c_uint = 1 << 11;
29002900
pub const SOF_TIMESTAMPING_OPT_STATS: c_uint = 1 << 12;
29012901
pub const SOF_TIMESTAMPING_OPT_PKTINFO: c_uint = 1 << 13;
29022902
pub const SOF_TIMESTAMPING_OPT_TX_SWHW: c_uint = 1 << 14;
2903+
pub const SOF_TIMESTAMPING_BIND_PHC: c_uint = 1 << 15;
2904+
pub const SOF_TIMESTAMPING_OPT_ID_TCP: c_uint = 1 << 16;
2905+
pub const SOF_TIMESTAMPING_OPT_RX_FILTER: c_uint = 1 << 17;
29032906

29042907
#[deprecated(
29052908
since = "0.2.55",

src/unix/linux_like/linux/mod.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4581,6 +4581,9 @@ pub const SOF_TIMESTAMPING_OPT_TSONLY: c_uint = 1 << 11;
45814581
pub const SOF_TIMESTAMPING_OPT_STATS: c_uint = 1 << 12;
45824582
pub const SOF_TIMESTAMPING_OPT_PKTINFO: c_uint = 1 << 13;
45834583
pub const SOF_TIMESTAMPING_OPT_TX_SWHW: c_uint = 1 << 14;
4584+
pub const SOF_TIMESTAMPING_BIND_PHC: c_uint = 1 << 15;
4585+
pub const SOF_TIMESTAMPING_OPT_ID_TCP: c_uint = 1 << 16;
4586+
pub const SOF_TIMESTAMPING_OPT_RX_FILTER: c_uint = 1 << 17;
45844587
pub const SOF_TXTIME_DEADLINE_MODE: u32 = 1 << 0;
45854588
pub const SOF_TXTIME_REPORT_ERRORS: u32 = 1 << 1;
45864589

0 commit comments

Comments
 (0)