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>
This commit is contained in:
Eric Dumazet 2018-10-15 09:37:58 -07:00 коммит произвёл David S. Miller
Родитель 97ec3eb33d
Коммит 825e1c523d
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -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;