From patchwork Thu Dec 7 17:43:32 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neal Cardwell X-Patchwork-Id: 845720 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=netdev-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=google.com header.i=@google.com header.b="N5RVLgsh"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3yt2sR1YxHz9ryT for ; Fri, 8 Dec 2017 04:43:55 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753345AbdLGRnx (ORCPT ); Thu, 7 Dec 2017 12:43:53 -0500 Received: from mail-yb0-f193.google.com ([209.85.213.193]:42696 "EHLO mail-yb0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753302AbdLGRnu (ORCPT ); Thu, 7 Dec 2017 12:43:50 -0500 Received: by mail-yb0-f193.google.com with SMTP id t127so3280880ybf.9 for ; Thu, 07 Dec 2017 09:43:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=SRBPwudrdtVR0Xd+cbD2JrDjuJRkrEubFkQueL1DeMk=; b=N5RVLgshCPiTP2m48+wpxTV6hPMO5jX+6IirguCZkwYVyS77lz5M0nAg+mfL6JJMRr idIuVW0Bs0+zle5qzX1s0dPILeedM2gOSyCE7tIqDRxGMI4C8khU5oCRF5qKEMzWx0zb v12J1gi2WCca5RvOS2qlgyuW6ZoZBvXoqwA+Tyo10pa0iRRcOUr+p0258qbpG5/TAAnK f/oKioWbE0264kPtwvrhsyWTOR+w82LcfYm8keWIJ3TjBYJ9/xk7IiVVjBglm2oJ9ll5 KG6TvN9vu4Cq5nnNihN8Utu+IFckVV/Ds/Yg/1VKPkmK9EIMNi4dFv2E35PSEnBI4thr TEnA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=SRBPwudrdtVR0Xd+cbD2JrDjuJRkrEubFkQueL1DeMk=; b=a3d06WE8kSMM1qnIOByHyNiRVrJ/zhy0FJpv1waZFhIb+w3ZnK+fUVii5OGCZXjwIC BC+hjMoNVOw6MSav8H3cRxyZE1nVA1XkeIRHUJNuRMM2VxMscZTHIssHtBGCex9kVQRl NiiSy/GeMJOMubdHDgcwMX7ul3sXVF2jmtEXQ1K23JwwECG0seuNsB7oM2UjMaUCnqde zii0tjZcONES1gbJ8Yb3Y2zKf0/qulQCt6aX/I8FkvbEaCWq6a9qV+XsOXjQ91boyyvO nmqUl8M2UwKQQ8L7qL0h85po5e9cOJWRTex/Yr1xAy46rlpU57WVty6PvBjSrr6v7sTj ev8g== X-Gm-Message-State: AKGB3mK8yEPhvKmlHuO5XIs7XJpawok3g51eL2gIdKjTooRURDRQ1Y1E 7NJta432elFU5k5JgX1sS39UIw== X-Google-Smtp-Source: AGs4zMZsbTNTwREn7z9xe7lTdd8WN6JtpxFZJoeMEZNSuCiPayKCYkwD9Ioz86ihz2ky8X2pq1i5dA== X-Received: by 10.37.104.70 with SMTP id d67mr320885ybc.470.1512668629751; Thu, 07 Dec 2017 09:43:49 -0800 (PST) Received: from joy.nyc.corp.google.com ([100.101.212.71]) by smtp.gmail.com with ESMTPSA id m129sm2577019ywd.66.2017.12.07.09.43.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 07 Dec 2017 09:43:48 -0800 (PST) From: Neal Cardwell To: David Miller Cc: netdev@vger.kernel.org, Neal Cardwell Subject: [PATCH net 3/3] tcp_bbr: reset long-term bandwidth sampling on loss recovery undo Date: Thu, 7 Dec 2017 12:43:32 -0500 Message-Id: <20171207174332.17689-4-ncardwell@google.com> X-Mailer: git-send-email 2.15.1.424.g9478a66081-goog In-Reply-To: <20171207174332.17689-1-ncardwell@google.com> References: <20171207174332.17689-1-ncardwell@google.com> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Fix BBR so that upon notification of a loss recovery undo BBR resets long-term bandwidth sampling. Under high reordering, reordering events can be interpreted as loss. If the reordering and spurious loss estimates are high enough, this can cause BBR to spuriously estimate that we are seeing loss rates high enough to trigger long-term bandwidth estimation. To avoid that problem, this commit resets long-term bandwidth sampling on loss recovery undo events. Signed-off-by: Neal Cardwell Reviewed-by: Yuchung Cheng Acked-by: Soheil Hassas Yeganeh --- net/ipv4/tcp_bbr.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/ipv4/tcp_bbr.c b/net/ipv4/tcp_bbr.c index ab3ff14ea7f7..8322f26e770e 100644 --- a/net/ipv4/tcp_bbr.c +++ b/net/ipv4/tcp_bbr.c @@ -878,6 +878,7 @@ static u32 bbr_undo_cwnd(struct sock *sk) bbr->full_bw = 0; /* spurious slow-down; reset full pipe detection */ bbr->full_bw_cnt = 0; + bbr_reset_lt_bw_sampling(sk); return tcp_sk(sk)->snd_cwnd; }