summaryrefslogtreecommitdiff
path: root/net/ipv4/tcp_cdg.c
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2018-10-15 19:37:58 +0300
committerDavid S. Miller <davem@davemloft.net>2018-10-16 08:56:42 +0300
commit825e1c523d5000f067a1614e4a66bb282a2d373c (patch)
tree0e00bed799a56fb60c399ae94816018a0213e476 /net/ipv4/tcp_cdg.c
parent97ec3eb33dd300764ca5fa8923e5430dc4dbac13 (diff)
downloadlinux-825e1c523d5000f067a1614e4a66bb282a2d373c.tar.xz
tcp: cdg: use tcp high resolution clock cache
We store in tcp socket a cache of most recent high resolution clock, there is no need to call local_clock() again, since this cache is good enough. Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/tcp_cdg.c')
-rw-r--r--net/ipv4/tcp_cdg.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv4/tcp_cdg.c b/net/ipv4/tcp_cdg.c
index 06fbe102a425..37eebd910396 100644
--- a/net/ipv4/tcp_cdg.c
+++ b/net/ipv4/tcp_cdg.c
@@ -146,7 +146,7 @@ static void tcp_cdg_hystart_update(struct sock *sk)
return;
if (hystart_detect & HYSTART_ACK_TRAIN) {
- u32 now_us = div_u64(local_clock(), NSEC_PER_USEC);
+ u32 now_us = tp->tcp_mstamp;
if (ca->last_ack == 0 || !tcp_is_cwnd_limited(sk)) {
ca->last_ack = now_us;