Re: [PATCH] tcp: replace head->tstamp with head->skb_mstamp_ns in tcp_tso_should_defer()
From: Eric Dumazet
Date: Wed Dec 04 2024 - 07:12:22 EST
On Wed, Dec 4, 2024 at 12:00 PM MengEn Sun <mengensun88@xxxxxxxxx> wrote:
>
> Thank you very much for your reply!
>
> There is no functional issue with using tstamp here.
>
> TCP does indeed use tstamp in many places, but it seems that most of
> them are related to SO_TIMESTAMP*.
Not at all. TCP switched to EDT model back in 2018, the goal had
nothing to do with SO_TIMESTAMP
commit d3edd06ea8ea9e03de6567fda80b8be57e21a537 tcp: provide earliest
departure time in skb->tstamp
Note how a prior field (skb->skb_mstamp) has been renamed to
skb->skb_mstamp_ns to express
the fact that a change in units happened at that time, because suddenly
TCP was providing skb->tstamp to lower stack (fq qdisc for instance
makes use of it) in ns units.
Starting from this point, skb->tstamp and skb->skb_mstamp_ns had the
same meaning as far as TCP is concerned.
Note how it is absolutely clear in the doc:
include/linux/skbuff.h:762: * @skb_mstamp_ns: (aka @tstamp) earliest
departure time; start point
include/linux/skbuff.h:892: u64 skb_mstamp_ns;
/* earliest departure time */
I actually had in my TODO list a _removal_ of skb_mstamp_ns, mostly because of
an unfortunate naming (mstamp would imply millisecond units, which is
simply not true)
Same remark for tp->tcp_mstamp : quite a bad name, but unfortunately
changing it would make future backports more difficult.