Martin KaFai Lau wrote: > On 11/1/24 6:32 AM, Willem de Bruijn wrote: > >> In udp/raw/..., I don't know how likely is the user space having "cork->tx_flags > >> & SKBTX_ANY_TSTAMP" set but has neither "READ_ONCE(sk->sk_tsflags) & > >> SOF_TIMESTAMPING_OPT_ID" nor "cork->flags & IPCORK_TS_OPT_ID" set. > > This is not something to rely on. OPT_ID was added relatively recently. > > Older applications, or any that just use the most straightforward API, > > will not set this. > > Good point that the OPT_ID per cmsg is very new. > > The datagram support on SOF_TIMESTAMPING_OPT_ID in sk->sk_tsflags had > been there for quite some time now. Is it a safe assumption that > most applications doing udp tx timestamping should have > the SOF_TIMESTAMPING_OPT_ID set to be useful? I don't think so. The very first open source code I happen to look at, github.com/ptpd, already sets SO_TIMESTAMPING without OPT_ID.