From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Dumazet Subject: [PATCH net-next 1/9] tcp: switch tcp_clock_ns() to CLOCK_TAI base Date: Fri, 21 Sep 2018 08:51:46 -0700 Message-ID: <20180921155154.49489-2-edumazet@google.com> References: <20180921155154.49489-1-edumazet@google.com> Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Cc: netdev , Van Jacobson , Neal Cardwell , Yuchung Cheng , Soheil Hassas Yeganeh , Willem de Bruijn , Eric Dumazet , Eric Dumazet To: "David S . Miller" Return-path: Received: from mail-pf1-f195.google.com ([209.85.210.195]:41541 "EHLO mail-pf1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727392AbeIUVl0 (ORCPT ); Fri, 21 Sep 2018 17:41:26 -0400 Received: by mail-pf1-f195.google.com with SMTP id h79-v6so6163404pfk.8 for ; Fri, 21 Sep 2018 08:51:58 -0700 (PDT) In-Reply-To: <20180921155154.49489-1-edumazet@google.com> Sender: netdev-owner@vger.kernel.org List-ID: 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 25db26a91364 ("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 --- include/net/tcp.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/net/tcp.h b/include/net/tcp.h index 770917d0caa71896b6adac06a62b150bfdc72836..c6f0bc1dc6782a1976c06932e846b3f6d708ba9f 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h @@ -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) -- 2.19.0.444.g18242da7ef-goog