Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp2291444ybh; Sun, 15 Mar 2020 23:56:41 -0700 (PDT) X-Google-Smtp-Source: ADFU+vvT2ehexFxwPY73MBJNI8SpSXyCtSUqHjDkfwOqWOwrhkTccWe7/pCcq6zCyVMsxhgg47I4 X-Received: by 2002:a9d:64cd:: with SMTP id n13mr21552073otl.274.1584341801284; Sun, 15 Mar 2020 23:56:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584341801; cv=none; d=google.com; s=arc-20160816; b=kNn/cY1vLx4wSa3UIz92tXG8MvIgFTjwYlRqzy2PR4iwDGHwAgH0ab1tN5cEAa7iYn +Zjzk6ewr/9VvgHD7VdV/l3x/pr4oGGMOMb2glnK7PVOD0hRMD+2Qi6/y1vthOrkj3jM AD6hoO2rl+4rsSxrRWAnVUoU6ZWbAFC03FJQTTVhhvfm5RMwwYYkjbxiEJ8XsWB50SNf EwLarDahB8e9x2k+hC3vTbpr8L53bp5f/pSis+rAtOouShAKAPakEsgT5nCq/Io6lQKX kk99aQOwaMhrnfg3M2DnRQ1hNxhbQlIaKdlOWWsrdxEPQGLe52VqroQHv2CEu3xQT6A9 vkRA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=CRd94bsv+t/VODMqevBbUVW5+OiXGXIs3bxOZjAjC08=; b=lNVydIbyGxnnB9fdU3B2TfquL+/lL7ClbuVknpmi3oN7zBPffTaJZr7fuiDuzr109r QiVpoKxGCO77s/EjgJOpAyAbEfe/CDJOdc+ip9g8qsxLtpT2726wpj0cFrE7urPnRNEZ linARqwjiD0YqVWSAiLaaDhgDNXU+HrI2b5J6HPZl/Mjp3glOhgVarEVgoHtaJ/rQgA9 toyL2jraRHgIY7NQMoQtarqEf03sCcy1K8XqR5nZdBnFNR4U1DKNcslV8RG22xRJ4JEn vhzDbYn693h3GZ+2z464J/3KmCW1w1DAdErGFmjznPhCGzKyL+J6pcJThK/K+ak7zc7N 3aWg== 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 d62si8323958oib.137.2020.03.15.23.56.27; Sun, 15 Mar 2020 23:56:41 -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 S1729763AbgCPGzn (ORCPT + 99 others); Mon, 16 Mar 2020 02:55:43 -0400 Received: from aliyun-cloud.icoremail.net ([47.90.88.91]:26760 "HELO aliyun-sdnproxy-2.icoremail.net" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with SMTP id S1729319AbgCPGzn (ORCPT ); Mon, 16 Mar 2020 02:55:43 -0400 Received: from 137.localdomain (unknown [218.107.205.216]) by app1 (Coremail) with SMTP id xjNnewDn7Q1cHm9ew20FAA--.217S3; Mon, 16 Mar 2020 14:36:20 +0800 (CST) From: Pengcheng Yang To: edumazet@google.com, ncardwell@google.com, davem@davemloft.net Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Pengcheng Yang Subject: [PATCH RESEND net-next v2 1/5] tcp: fix stretch ACK bugs in BIC Date: Mon, 16 Mar 2020 14:35:07 +0800 Message-Id: <1584340511-9870-2-git-send-email-yangpc@wangsu.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1584340511-9870-1-git-send-email-yangpc@wangsu.com> References: <1584340511-9870-1-git-send-email-yangpc@wangsu.com> X-CM-TRANSID: xjNnewDn7Q1cHm9ew20FAA--.217S3 X-Coremail-Antispam: 1UD129KBjvdXoWrKrWkGF4DXr4rWF4xXF1DZFb_yoWfCrg_u3 WxKa9rCry8XFs5ZrZF9ry8Ar18Ka93uFsaqF17Jayftr18tFyUJw4kGF95ur1vgF40gF9r Xr9rJFyYva47WjkaLaAFLSUrUUUUjb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUIcSsGvfJTRUUUbYxFc2x0x2IEx4CE42xK8VAvwI8IcIk0rVWrJVCq3wA2ocxC64kI II0Yj41l84x0c7CEw4AK67xGY2AK021l84ACjcxK6xIIjxv20xvE14v26w1j6s0DM28EF7 xvwVC0I7IYx2IY6xkF7I0E14v26rxl6s0DM28EF7xvwVC2z280aVAFwI0_GcCE3s1l84AC jcxK6I8E87Iv6xkF7I0E14v26rxl6s0DM2AIxVAIcxkEcVAq07x20xvEncxIr21l5I8CrV ACY4xI64kE6c02F40Ex7xfMcIj6x8ErcxFaVAv8VW8GwAm72CE4IkC6x0Yz7v_Jr0_Gr1l F7xvr2IYc2Ij64vIr41lF7I21c0EjII2zVCS5cI20VAGYxC7MxkIecxEwVAFwVW8AwCF04 k20xvY0x0EwIxGrwCF04k20xvE74AGY7Cv6cx26r48MxC20s026xCaFVCjc4AY6r1j6r4U MI8I3I0E5I8CrVAFwI0_Jr0_Jr4lx2IqxVCjr7xvwVAFwI0_JrI_JrWlx4CE17CEb7AF67 AKxVWUAVWUtwCIc40Y0x0EwIxGrwCI42IY6xIIjxv20xvE14v26r1j6r1xMIIF0xvE2Ix0 cI8IcVCY1x0267AKxVW8JVWxJwCI42IY6xAIw20EY4v20xvaj40_JFI_Gr1lIxAIcVC2z2 80aVAFwI0_Jr0_Gr1lIxAIcVC2z280aVCY1x0267AKxVW8JVW8JrUvcSsGvfC2KfnxnUUI 43ZEXa7VU00PfPUUUUU== X-CM-SenderInfo: p1dqw1nf6zt0xjvxhudrp/ Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Changes BIC to properly handle stretch ACKs in additive increase mode by passing in the count of ACKed packets to tcp_cong_avoid_ai(). Signed-off-by: Pengcheng Yang --- net/ipv4/tcp_bic.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/net/ipv4/tcp_bic.c b/net/ipv4/tcp_bic.c index 645cc30..f5f588b 100644 --- a/net/ipv4/tcp_bic.c +++ b/net/ipv4/tcp_bic.c @@ -145,12 +145,13 @@ static void bictcp_cong_avoid(struct sock *sk, u32 ack, u32 acked) if (!tcp_is_cwnd_limited(sk)) return; - if (tcp_in_slow_start(tp)) - tcp_slow_start(tp, acked); - else { - bictcp_update(ca, tp->snd_cwnd); - tcp_cong_avoid_ai(tp, ca->cnt, 1); + if (tcp_in_slow_start(tp)) { + acked = tcp_slow_start(tp, acked); + if (!acked) + return; } + bictcp_update(ca, tp->snd_cwnd); + tcp_cong_avoid_ai(tp, ca->cnt, acked); } /* -- 1.8.3.1