Skip to content

Commit

Permalink
tcp: switch tcp_clock_ns() to CLOCK_TAI base
Browse files Browse the repository at this point in the history
TCP pacing is either implemented in sch_fq or internally.
We have the goal of being able to offload pacing on the NICS.

TCP will soon provide per skb skb->tstamp as early departure time.

Like ETF in commit 25db26a ("net/sched: Introduce the ETF Qdisc")
we chose CLOCK_T as the clock base, so that TCP and pacers can share
a common clock, to get better RTT samples (without pacing artificially
inflating these samples).

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Eric Dumazet authored and David S. Miller committed Sep 22, 2018
1 parent 4f4b93a commit 72b0094
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/net/tcp.h
Original file line number Diff line number Diff line change
Expand Up @@ -732,7 +732,7 @@ void tcp_send_window_probe(struct sock *sk);

static inline u64 tcp_clock_ns(void)
{
return local_clock();
return ktime_get_tai_ns();
}

static inline u64 tcp_clock_us(void)
Expand Down

0 comments on commit 72b0094

Please sign in to comment.