Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1116238imm; Wed, 1 Aug 2018 10:26:53 -0700 (PDT) X-Google-Smtp-Source: AAOMgpe3wAV+UeJoqEYZG4fHlLqBgWGFF2QidSZXQ2JMjnQW8LX5Arxdf95QOieeUfp7UbdW5rsM X-Received: by 2002:a17:902:7b83:: with SMTP id w3-v6mr25356712pll.192.1533144412942; Wed, 01 Aug 2018 10:26:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533144412; cv=none; d=google.com; s=arc-20160816; b=gld8JaNgO4nRt+JioU7EXVVnOE+AO37ut2YW809U0pDCsa3gahymCqdaJuc2s/4Wnw yXOzIAg7nxnChMUbkLcpXlssVEO4Kxo06t7yzcVWm9lW+OUUlRSdDnp6BpG654HPdeWM ZRcNs7S6yJUqhrb1I7yCNk/0WOgWQ8uN7ZV9Xvcfq7vE3vXD3gmweQ0c5lyPiYWYwqdx TYXW4nhpE4YtR6TSeic+F/M0nl8eTbxOTmITD75XCjWmjSZLgT0I/q73AFSm3xSI84E0 /8dqc4Dgmu/TboecDWWQi73uf9BKqqwqGHf0xW8DQsihv+acFwQ1oKjWfmPAjpCik9El R/qQ== 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=fzTvP5XTTKcUP8harV5AZ+N8mXQvLkikrPVP89eqJ1w=; b=fgVXheWSu37QG31+AZD7iuHabWeUn7cV5xCkSj97AVE6BTXRZrFsulBC6owx/unQBE PS7EMdxV/ICFva4AQb0Z0dgmndNdZGU/qvt2RIVH1T2YgAhAP2gl9ke/mI9jiI53gKYk DPT76Y9oLDAKSRHLBFRGNwiGkEFSmqrUoq5tCTH6HItw/6EA0Tr++Pd2fZT6KC1uvPiP PztIjc3FoeaaCfrHDwsOOn9b/EFD37YyKLRt/R5spqop/v6gPQXbUatzNtstiBfFEUJK W8/0gSm5QJQEvCXHNV4Oi8TjkowtyRGyTHHqo7vKGJYYic7Pe9ca2x7nAbA/Q2k3PstD bEAg== 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 97-v6si15351348pld.345.2018.08.01.10.26.38; Wed, 01 Aug 2018 10:26:52 -0700 (PDT) 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 S2406509AbeHATKy (ORCPT + 99 others); Wed, 1 Aug 2018 15:10:54 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:51088 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2405484AbeHATKx (ORCPT ); Wed, 1 Aug 2018 15:10:53 -0400 Received: from localhost (D57E6652.static.ziggozakelijk.nl [213.126.102.82]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 1E7AECC9; Wed, 1 Aug 2018 17:24:10 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Eric Dumazet , Neal Cardwell , Lawrence Brakmo , "David S. Miller" Subject: [PATCH 4.14 246/246] tcp: add one more quick ack after after ECN events Date: Wed, 1 Aug 2018 18:52:36 +0200 Message-Id: <20180801165023.510241468@linuxfoundation.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180801165011.700991984@linuxfoundation.org> References: <20180801165011.700991984@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: Eric Dumazet [ Upstream commit 15ecbe94a45ef88491ca459b26efdd02f91edb6d ] Larry Brakmo proposal ( https://patchwork.ozlabs.org/patch/935233/ tcp: force cwnd at least 2 in tcp_cwnd_reduction) made us rethink about our recent patch removing ~16 quick acks after ECN events. tcp_enter_quickack_mode(sk, 1) makes sure one immediate ack is sent, but in the case the sender cwnd was lowered to 1, we do not want to have a delayed ack for the next packet we will receive. Fixes: 522040ea5fdd ("tcp: do not aggressively quick ack after ECN events") Signed-off-by: Eric Dumazet Reported-by: Neal Cardwell Cc: Lawrence Brakmo Acked-by: Neal Cardwell Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- net/ipv4/tcp_input.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c @@ -261,7 +261,7 @@ static void __tcp_ecn_check_ce(struct so * it is probably a retransmit. */ if (tp->ecn_flags & TCP_ECN_SEEN) - tcp_enter_quickack_mode(sk, 1); + tcp_enter_quickack_mode(sk, 2); break; case INET_ECN_CE: if (tcp_ca_needs_ecn(sk)) @@ -269,7 +269,7 @@ static void __tcp_ecn_check_ce(struct so if (!(tp->ecn_flags & TCP_ECN_DEMAND_CWR)) { /* Better not delay acks, sender can have a very low cwnd */ - tcp_enter_quickack_mode(sk, 1); + tcp_enter_quickack_mode(sk, 2); tp->ecn_flags |= TCP_ECN_DEMAND_CWR; } tp->ecn_flags |= TCP_ECN_SEEN;