From patchwork Thu Dec 7 17:43:31 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neal Cardwell X-Patchwork-Id: 845719 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="bwtmlUdM"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3yt2sK1hTDz9s81 for ; Fri, 8 Dec 2017 04:43:49 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753331AbdLGRns (ORCPT ); Thu, 7 Dec 2017 12:43:48 -0500 Received: from mail-yb0-f194.google.com ([209.85.213.194]:45919 "EHLO mail-yb0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752573AbdLGRnp (ORCPT ); Thu, 7 Dec 2017 12:43:45 -0500 Received: by mail-yb0-f194.google.com with SMTP id 184so3273303ybw.12 for ; Thu, 07 Dec 2017 09:43:45 -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=a91zpLd3o7FYrFH9+1NmiCwVlncWypSv3aY3RxBND74=; b=bwtmlUdMmEaXDNvpYqs1xPucdVpIIBMLiIomeKUF8NQA/NP3BkrV61o8htVQb2IBsr kWlEyJ+te4ceAGwCJmdkVXOKqeKy0lI0Jp9+NjDwxON4K8F5nWBUOaNgbNFmY41F2uS+ g8HV+M97VRMQG5+7E48VcsTUsbXSA0TJvVv+UzyBLExt/kHU7RG8PhYqV2a494vlYja3 +mo+ZG+uLteKXomQ5ukgnaQOfDmWKMJIev4SEcFB7I0q2c3cnBT/GSdZNaPV4zJLilE9 IY1h55Uy9SM6iVnQshBsey1fxw8fcwlfbjUW67IXLWjUQ5BVkzV8I3aw14hgqOYWByFE 8TRg== 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=a91zpLd3o7FYrFH9+1NmiCwVlncWypSv3aY3RxBND74=; b=lhyhxP2nwHDXTwKSfsro1CSKVAR8dBNpbUje3dAkYdORZQCANhqCpiUnEU7MP5KGyA fxhXP9nvLxpMxqkPoiezMtGZsl+CIn2dhvtgJ9uu2lqkJtVIfTiGVIRffrSDGXrXy7tO Y+7jkj+us5gJYt+yn5qqvh8ZEH3uKHyRhF6BodZZ7C6jS63iH17C47euhEpjfw7bUZ0s 9qPEKAlJS6OgLO2kFESclztnntNdfFJpWilQASksC/Pt4Ri/O6kZQ6ZgzzSTQ9B/l8z1 q7hjXedagXYCQc+uyYSbFCJYjkF+GVN2Alf7mXobKuov35oAj9Eo3HxMYlstMve4oQZN bjIA== X-Gm-Message-State: AKGB3mJkVci4kCclMuFBZsE18HpL3ORNkGRhYiGTkAxucq2VeskybR8g 0phtSgpFadHH/+fiBHU+98mPkg/+WuA= X-Google-Smtp-Source: AGs4zMZuIoIuOTBA/zG9v9lbwOBmIy7rqVsjaTpiVIQyfnyBDmtfxfkIj6dx4vMc32ULrHDjyKmtrQ== X-Received: by 10.37.92.194 with SMTP id q185mr8532237ybb.257.1512668624850; Thu, 07 Dec 2017 09:43:44 -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.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 07 Dec 2017 09:43:43 -0800 (PST) From: Neal Cardwell To: David Miller Cc: netdev@vger.kernel.org, Neal Cardwell Subject: [PATCH net 2/3] tcp_bbr: reset full pipe detection on loss recovery undo Date: Thu, 7 Dec 2017 12:43:31 -0500 Message-Id: <20171207174332.17689-3-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 the full pipe detection (STARTUP exit) state machine. Under high reordering, reordering events can be interpreted as loss. If the reordering and spurious loss estimates are high enough, this could previously cause BBR to spuriously estimate that the pipe is full. Since spurious loss recovery means that our overall sending will have slowed down spuriously, this commit gives a flow more time to probe robustly for bandwidth and decide the pipe is really full. Signed-off-by: Neal Cardwell Reviewed-by: Yuchung Cheng Acked-by: Soheil Hassas Yeganeh --- net/ipv4/tcp_bbr.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/net/ipv4/tcp_bbr.c b/net/ipv4/tcp_bbr.c index 3089c956b9f9..ab3ff14ea7f7 100644 --- a/net/ipv4/tcp_bbr.c +++ b/net/ipv4/tcp_bbr.c @@ -874,6 +874,10 @@ static u32 bbr_sndbuf_expand(struct sock *sk) */ static u32 bbr_undo_cwnd(struct sock *sk) { + struct bbr *bbr = inet_csk_ca(sk); + + bbr->full_bw = 0; /* spurious slow-down; reset full pipe detection */ + bbr->full_bw_cnt = 0; return tcp_sk(sk)->snd_cwnd; }