diff mbox series

[net] tcp: change txhash on SYN-data timeout

Message ID 20190109021428.6749-1-ycheng@google.com
State Accepted
Delegated to: David Miller
Headers show
Series [net] tcp: change txhash on SYN-data timeout | expand

Commit Message

Yuchung Cheng Jan. 9, 2019, 2:14 a.m. UTC
Previously upon SYN timeouts the sender recomputes the txhash to
try a different path. However this does not apply on the initial
timeout of SYN-data (active Fast Open). Therefore an active IPv6
Fast Open connection may incur one second RTO penalty to take on
a new path after the second SYN retransmission uses a new flow label.

This patch removes this undesirable behavior so Fast Open changes
the flow label just like the regular connections. This also helps
avoid falsely disabling Fast Open on the sender which triggers
after two consecutive SYN timeouts on Fast Open.

Signed-off-by: Yuchung Cheng <ycheng@google.com>
Reviewed-by: Neal Cardwell <ncardwell@google.com>
---
 net/ipv4/tcp_timer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

David Miller Jan. 10, 2019, 9:56 p.m. UTC | #1
From: Yuchung Cheng <ycheng@google.com>
Date: Tue,  8 Jan 2019 18:14:28 -0800

> Previously upon SYN timeouts the sender recomputes the txhash to
> try a different path. However this does not apply on the initial
> timeout of SYN-data (active Fast Open). Therefore an active IPv6
> Fast Open connection may incur one second RTO penalty to take on
> a new path after the second SYN retransmission uses a new flow label.
> 
> This patch removes this undesirable behavior so Fast Open changes
> the flow label just like the regular connections. This also helps
> avoid falsely disabling Fast Open on the sender which triggers
> after two consecutive SYN timeouts on Fast Open.
> 
> Signed-off-by: Yuchung Cheng <ycheng@google.com>
> Reviewed-by: Neal Cardwell <ncardwell@google.com>

Applied and queued up for -stable, thanks!
diff mbox series

Patch

diff --git a/net/ipv4/tcp_timer.c b/net/ipv4/tcp_timer.c
index f87dbc78b6bc..71a29e9c0620 100644
--- a/net/ipv4/tcp_timer.c
+++ b/net/ipv4/tcp_timer.c
@@ -226,7 +226,7 @@  static int tcp_write_timeout(struct sock *sk)
 	if ((1 << sk->sk_state) & (TCPF_SYN_SENT | TCPF_SYN_RECV)) {
 		if (icsk->icsk_retransmits) {
 			dst_negative_advice(sk);
-		} else if (!tp->syn_data && !tp->syn_fastopen) {
+		} else {
 			sk_rethink_txhash(sk);
 		}
 		retry_until = icsk->icsk_syn_retries ? : net->ipv4.sysctl_tcp_syn_retries;