Skip to content

Commit

Permalink
tcp: cdg: use tcp high resolution clock cache
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Eric Dumazet authored and David S. Miller committed Oct 16, 2018
1 parent 97ec3eb commit 825e1c5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/ipv4/tcp_cdg.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 825e1c5

Please sign in to comment.