Received: by 10.223.185.116 with SMTP id b49csp5457432wrg; Wed, 7 Mar 2018 12:05:43 -0800 (PST) X-Google-Smtp-Source: AG47ELumciq6B4NOxLZ/PsQA7yPczFdrWIw4iVSUKUZ/EIwN6G0bHo77/ZDuMd0BxBokTIT8/B0o X-Received: by 10.98.14.79 with SMTP id w76mr15895428pfi.1.1520453143418; Wed, 07 Mar 2018 12:05:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520453143; cv=none; d=google.com; s=arc-20160816; b=jNryKXkpIGFWrNyB6j0gBxshl/m2BtYKMu2OGe5HBTsVpNVHuTuCn/9dn12GLMvzrh 887ZMw00ndHcWgD41xxM1dFNJt8g1pD+w8BrNKa+23qC+Y8MNnayphWfcEj8VI/y4sQ3 inPY5C/vtrvEJARQ2ds7c+VSewwtu6BstUvXR/3quqXQyWzkKY2eVAEkkc4W4YO1E2Sy e/MOJ6Qk6SN1OyN2gl4i8Gom/CWDrBbjRUmRYqr9zhcCosCa8iYn0szW7/p8aWSca1yF 19CaUZ6ousEwIvLQhunyeUMqLSZDmNTKCTsF8yQ8apdTL55tTAOC+RyoY+BLUtf2UXWF ellw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=Z4DTuwlFekou0ka4yyh1dNyyHXJ1pmwoVuXjQ0uwEUY=; b=fz5m9Oh6F/CcvrZoH/W+2kb2gWzQ2743IyGwhLIb9YB56Io7pJQc87wa+QSiPmuGQl Xl7ip+2iGIOyJ3MpsM9AV1Um+twbyW5ntwqcYQb7ejwDhCht6hxNLOIiq1ZJLr7uVGLy XDkZxBTc8ukce7CXBmeeV5SVtZHzXYhTAMygPvMXQZjRcw0hMHIk5ipm4I+PpHVlG1Bf zA7yJruNb25s+GfTZWTcDMn61lo2LbZvowwkxkep2m8CaD51hFj0FcTu4nP67vf4xwvu VIlY1LWStyHhWHngFLyM76YVy37eWuRRCfrVvFfHfCasGfn/p4LROlJtzpxpf3dx7g1u /ZZw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e190si10639831pfe.203.2018.03.07.12.05.28; Wed, 07 Mar 2018 12:05:43 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965528AbeCGUEk (ORCPT + 99 others); Wed, 7 Mar 2018 15:04:40 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:44564 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965465AbeCGTqX (ORCPT ); Wed, 7 Mar 2018 14:46:23 -0500 Received: from localhost (unknown [185.236.200.248]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id D7BBE1032; Wed, 7 Mar 2018 19:46:22 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Teodor Milkov , Yuchung Cheng , Neal Cardwell , "David S. Miller" Subject: [PATCH 4.14 060/110] tcp: revert F-RTO middle-box workaround Date: Wed, 7 Mar 2018 11:38:43 -0800 Message-Id: <20180307191047.255266311@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180307191039.748351103@linuxfoundation.org> References: <20180307191039.748351103@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Yuchung Cheng [ Upstream commit d4131f09770d9b7471c9da65e6ecd2477746ac5c ] This reverts commit cc663f4d4c97b7297fb45135ab23cfd508b35a77. While fixing some broken middle-boxes that modifies receive window fields, it does not address middle-boxes that strip off SACK options. The best solution is to fully revert this patch and the root F-RTO enhancement. Fixes: cc663f4d4c97 ("tcp: restrict F-RTO to work-around broken middle-boxes") Reported-by: Teodor Milkov Signed-off-by: Yuchung Cheng Signed-off-by: Neal Cardwell Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- net/ipv4/tcp_input.c | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c @@ -1947,7 +1947,6 @@ void tcp_enter_loss(struct sock *sk) struct tcp_sock *tp = tcp_sk(sk); struct net *net = sock_net(sk); struct sk_buff *skb; - bool new_recovery = icsk->icsk_ca_state < TCP_CA_Recovery; bool is_reneg; /* is receiver reneging on SACKs? */ bool mark_lost; @@ -2010,17 +2009,15 @@ void tcp_enter_loss(struct sock *sk) tp->high_seq = tp->snd_nxt; tcp_ecn_queue_cwr(tp); - /* F-RTO RFC5682 sec 3.1 step 1: retransmit SND.UNA if no previous - * loss recovery is underway except recurring timeout(s) on - * the same SND.UNA (sec 3.2). Disable F-RTO on path MTU probing - * - * In theory F-RTO can be used repeatedly during loss recovery. - * In practice this interacts badly with broken middle-boxes that - * falsely raise the receive window, which results in repeated - * timeouts and stop-and-go behavior. + /* F-RTO RFC5682 sec 3.1 step 1 mandates to disable F-RTO + * if a previous recovery is underway, otherwise it may incorrectly + * call a timeout spurious if some previously retransmitted packets + * are s/acked (sec 3.2). We do not apply that retriction since + * retransmitted skbs are permanently tagged with TCPCB_EVER_RETRANS + * so FLAG_ORIG_SACK_ACKED is always correct. But we do disable F-RTO + * on PTMU discovery to avoid sending new data. */ tp->frto = sysctl_tcp_frto && - (new_recovery || icsk->icsk_retransmits) && !inet_csk(sk)->icsk_mtup.probe_size; }