Received: by 10.223.185.116 with SMTP id b49csp5477842wrg; Wed, 7 Mar 2018 12:27:18 -0800 (PST) X-Google-Smtp-Source: AG47ELtK36XgUqRePp3EkE9FuzITWWGXwSrANutmavUVtg/39g5L7qaurlHhc+84bth8ZxhWQsS/ X-Received: by 2002:a17:902:6d0f:: with SMTP id s15-v6mr21401272plk.375.1520454438283; Wed, 07 Mar 2018 12:27:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520454438; cv=none; d=google.com; s=arc-20160816; b=gN1L4DynE9iXhNVdQMUSJ9Ge1jNoJ61H96BMBKI69/esxBsg0YlSE1I8cg+p1VG/Hv cw3f7YqCylzLiYeYXHCvas/qraMQA4LztXF5INoKvCnnFIPzdnS6tuazhEdd8oyHezHS xCeB+ZGNT+PhDSRChcHyBfOSP3L0RFH0NKwSr++/w7JFSZZNp6Z4fMUu/lWRDzlEXJIk UpfCiuf1OJtfIDqDry+jPEZZVnuEv/mcbu+4YFH0TC6XVe/qYBy3rJ6A32+YxSZYFQjD jaeMpV7GSwUZsdojCqVnaZ56sMYe6r1FyUadxXmy2hnVwN9FYapJxGozg9Ouv+LGMzM8 fphg== 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=nw5vl3bevftyBim6zkajlXLsZ3DwDcrbtG9IiFsMifc=; b=eHJmQmAms8lWICWleiJjDvQia9W6h090uO159iXsnfE1sY85/zzs/PrbWH6+IwC5En Ipq1/XQWftYhxRmHC5yoe/EuoAcEYHWe5Qskg0h3j+Mzb9o0shI/TENu729P/6fAgFDB j27UTLI7mptdwhBgDutrcY4s2GvOGhFE4Ka/bkRq4ee5ZS0klcgPM1kbqs+uruWHPH0p +SQw7Tu/SmFXj6+BgNtWF656xVPyhzl7ImLLG/pRvJ4trOl/AsQdrKESZ88kxJ0y4OZy JTHAyW0jZoTcqdt8T46U/WvCcr3M9AROs3FvA/e5hvTBaY7by8Hxg5MVorunDGehDyQ6 r3XQ== 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 t19-v6si13225142plo.742.2018.03.07.12.27.03; Wed, 07 Mar 2018 12:27:18 -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 S935003AbeCGU0N (ORCPT + 99 others); Wed, 7 Mar 2018 15:26:13 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:42652 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934677AbeCGTnM (ORCPT ); Wed, 7 Mar 2018 14:43:12 -0500 Received: from localhost (unknown [185.236.200.248]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 7C7F6109B; Wed, 7 Mar 2018 19:43:11 +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.15 096/122] tcp: revert F-RTO middle-box workaround Date: Wed, 7 Mar 2018 11:38:28 -0800 Message-Id: <20180307191743.245437591@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180307191729.190879024@linuxfoundation.org> References: <20180307191729.190879024@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.15-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(-) diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index 45f750e85714..50963f92a67d 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c @@ -1915,7 +1915,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; @@ -1974,17 +1973,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 = net->ipv4.sysctl_tcp_frto && - (new_recovery || icsk->icsk_retransmits) && !inet_csk(sk)->icsk_mtup.probe_size; } -- 2.14.3