On Thu, Jan 16, 2025 at 6:11 AM Martin KaFai Lau <martin.lau@xxxxxxxxx> wrote: > > On 1/12/25 3:37 AM, Jason Xing wrote: > > void __skb_tstamp_tx(struct sk_buff *orig_skb, > > const struct sk_buff *ack_skb, > > struct skb_shared_hwtstamps *hwtstamps, > > - struct sock *sk, int tstype) > > + struct sock *sk, bool sw, int tstype) > > Instead of adding a new "bool sw" and changing all callers, is it the same as > testing "!hwtstamps" ? Actually, I had a version using the hwtstamps, then I realized that hardware or driver may go wrong and pass a NULL hwstamps. It's indeed unlikely to happen. If so, timestamping code will consider it as a software timestamp. I don't expect that thing happening, ensuring our code is robust enough. The original timestamping code seems not deal with this case as we cannot see some particular test in __skb_tstamp_tx(). The worst thing is if it happens, we would never know and treat it as a software SCM_TSTAMP_SND case. Does it make any sense to you? Thanks, Jason