* [PATCH net] tcp: use current time in tcp_rcv_space_adjust()
@ 2017-12-06 19:08 Eric Dumazet
2017-12-06 19:54 ` Neal Cardwell
2017-12-06 20:54 ` David Miller
0 siblings, 2 replies; 3+ messages in thread
From: Eric Dumazet @ 2017-12-06 19:08 UTC (permalink / raw)
To: David Miller; +Cc: netdev, Wei Wang, Neal Cardwell, Yuchung Cheng
From: Eric Dumazet <edumazet@google.com>
When I switched rcv_rtt_est to high resolution timestamps, I forgot
that tp->tcp_mstamp needed to be refreshed in tcp_rcv_space_adjust()
Using an old timestamp leads to autotuning lags.
Fixes: 645f4c6f2ebd ("tcp: switch rcv_rtt_est and rcvq_space to high resolution timestamps")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Wei Wang <weiwan@google.com>
Cc: Neal Cardwell <ncardwell@google.com>
Cc: Yuchung Cheng <ycheng@google.com>
---
net/ipv4/tcp_input.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
index 734cfc8ff76edf3453921b50620be2986bfcfdb9..514c00732988b7e71f121953dabf88911b2324d6 100644
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -579,6 +579,7 @@ void tcp_rcv_space_adjust(struct sock *sk)
int time;
int copied;
+ tcp_mstamp_refresh(tp);
time = tcp_stamp_us_delta(tp->tcp_mstamp, tp->rcvq_space.time);
if (time < (tp->rcv_rtt_est.rtt_us >> 3) || tp->rcv_rtt_est.rtt_us == 0)
return;
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH net] tcp: use current time in tcp_rcv_space_adjust()
2017-12-06 19:08 [PATCH net] tcp: use current time in tcp_rcv_space_adjust() Eric Dumazet
@ 2017-12-06 19:54 ` Neal Cardwell
2017-12-06 20:54 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: Neal Cardwell @ 2017-12-06 19:54 UTC (permalink / raw)
To: Eric Dumazet; +Cc: David Miller, netdev, Wei Wang, Yuchung Cheng
On Wed, Dec 6, 2017 at 2:08 PM, Eric Dumazet <eric.dumazet@gmail.com> wrote:
> From: Eric Dumazet <edumazet@google.com>
>
> When I switched rcv_rtt_est to high resolution timestamps, I forgot
> that tp->tcp_mstamp needed to be refreshed in tcp_rcv_space_adjust()
>
> Using an old timestamp leads to autotuning lags.
>
> Fixes: 645f4c6f2ebd ("tcp: switch rcv_rtt_est and rcvq_space to high resolution timestamps")
> Signed-off-by: Eric Dumazet <edumazet@google.com>
> Cc: Wei Wang <weiwan@google.com>
> Cc: Neal Cardwell <ncardwell@google.com>
> Cc: Yuchung Cheng <ycheng@google.com>
> ---
Acked-by: Neal Cardwell <ncardwell@google.com>
neal
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net] tcp: use current time in tcp_rcv_space_adjust()
2017-12-06 19:08 [PATCH net] tcp: use current time in tcp_rcv_space_adjust() Eric Dumazet
2017-12-06 19:54 ` Neal Cardwell
@ 2017-12-06 20:54 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2017-12-06 20:54 UTC (permalink / raw)
To: eric.dumazet; +Cc: netdev, weiwan, ncardwell, ycheng
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Wed, 06 Dec 2017 11:08:19 -0800
> From: Eric Dumazet <edumazet@google.com>
>
> When I switched rcv_rtt_est to high resolution timestamps, I forgot
> that tp->tcp_mstamp needed to be refreshed in tcp_rcv_space_adjust()
>
> Using an old timestamp leads to autotuning lags.
>
> Fixes: 645f4c6f2ebd ("tcp: switch rcv_rtt_est and rcvq_space to high resolution timestamps")
> Signed-off-by: Eric Dumazet <edumazet@google.com>
Applied and queued up for -stable, thanks Eric.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-12-06 20:54 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-06 19:08 [PATCH net] tcp: use current time in tcp_rcv_space_adjust() Eric Dumazet
2017-12-06 19:54 ` Neal Cardwell
2017-12-06 20:54 ` David Miller
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.