Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 825e1c52 authored by Eric Dumazet's avatar Eric Dumazet Committed by David S. Miller
Browse files

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: default avatarEric Dumazet <edumazet@google.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 97ec3eb3
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;