From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Dumazet Subject: [PATCH net] tcp: use current time in tcp_rcv_space_adjust() Date: Wed, 06 Dec 2017 11:08:19 -0800 Message-ID: <1512587299.25033.11.camel@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit Cc: netdev , Wei Wang , Neal Cardwell , Yuchung Cheng To: David Miller Return-path: Received: from mail-pf0-f170.google.com ([209.85.192.170]:44858 "EHLO mail-pf0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752073AbdLFTIV (ORCPT ); Wed, 6 Dec 2017 14:08:21 -0500 Received: by mail-pf0-f170.google.com with SMTP id m26so2720992pfj.11 for ; Wed, 06 Dec 2017 11:08:21 -0800 (PST) Sender: netdev-owner@vger.kernel.org List-ID: From: Eric Dumazet 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 Cc: Wei Wang Cc: Neal Cardwell Cc: Yuchung Cheng ---  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;