From: Yuchung Cheng Subject: [PATCH net] tcp: change txhash on SYN-data timeout Date: Tue, 8 Jan 2019 18:14:28 -0800 Message-ID: <20190109021428.6749-1-ycheng@google.com> Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Cc: netdev@vger.kernel.org, ncardwell@google.com, Yuchung Cheng To: davem@davemloft.net, edumazet@google.com Return-path: Received: from mail-pl1-f193.google.com ([209.85.214.193]:33373 "EHLO mail-pl1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728112AbfAICOs (ORCPT ); Tue, 8 Jan 2019 21:14:48 -0500 Received: by mail-pl1-f193.google.com with SMTP id z23so2832034plo.0 for ; Tue, 08 Jan 2019 18:14:48 -0800 (PST) Sender: netdev-owner@vger.kernel.org List-ID: 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 Reviewed-by: Neal Cardwell --- net/ipv4/tcp_timer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.20.1.97.g81188d93c3-goog