[PATCH net] tcp: use current time in tcp_rcv_space_adjust()

Subsystems: networking [general], networking [tcp], the rest

STALE3237d

3 messages, 3 authors, 2017-12-06 · open the first message on its own page

[PATCH net] tcp: use current time in tcp_rcv_space_adjust()

From: Eric Dumazet <hidden>
Date: 2017-12-06 19:08:21

From: Eric Dumazet <redacted>

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 <redacted>
Cc: Wei Wang <redacted>
Cc: Neal Cardwell <ncardwell@google.com>
Cc: Yuchung Cheng <redacted>
---
 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;

Re: [PATCH net] tcp: use current time in tcp_rcv_space_adjust()

From: Neal Cardwell <ncardwell@google.com>
Date: 2017-12-06 19:54:31

On Wed, Dec 6, 2017 at 2:08 PM, Eric Dumazet [off-list ref] wrote:
From: Eric Dumazet <redacted>

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 <redacted>
Cc: Wei Wang <redacted>
Cc: Neal Cardwell <ncardwell@google.com>
Cc: Yuchung Cheng <redacted>
---
Acked-by: Neal Cardwell <ncardwell@google.com>

neal

Re: [PATCH net] tcp: use current time in tcp_rcv_space_adjust()

From: David Miller <davem@davemloft.net>
Date: 2017-12-06 20:54:47

From: Eric Dumazet <redacted>
Date: Wed, 06 Dec 2017 11:08:19 -0800
From: Eric Dumazet <redacted>

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 <redacted>
Applied and queued up for -stable, thanks Eric.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help