From owner-svn-src-all@freebsd.org Wed Jul 8 09:04:21 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B4E7E35BE70; Wed, 8 Jul 2020 09:04:21 +0000 (UTC) (envelope-from rscheff@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B1tfF4Pbgz3W8g; Wed, 8 Jul 2020 09:04:21 +0000 (UTC) (envelope-from rscheff@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7A3BF1DA71; Wed, 8 Jul 2020 09:04:21 +0000 (UTC) (envelope-from rscheff@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 06894LkY090451; Wed, 8 Jul 2020 09:04:21 GMT (envelope-from rscheff@FreeBSD.org) Received: (from rscheff@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 06894Lfm090450; Wed, 8 Jul 2020 09:04:21 GMT (envelope-from rscheff@FreeBSD.org) Message-Id: <202007080904.06894Lfm090450@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rscheff set sender to rscheff@FreeBSD.org using -f From: Richard Scheffenegger Date: Wed, 8 Jul 2020 09:04:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r363005 - stable/12/sys/netinet/cc X-SVN-Group: stable-12 X-SVN-Commit-Author: rscheff X-SVN-Commit-Paths: stable/12/sys/netinet/cc X-SVN-Commit-Revision: 363005 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Jul 2020 09:04:21 -0000 Author: rscheff Date: Wed Jul 8 09:04:20 2020 New Revision: 363005 URL: https://svnweb.freebsd.org/changeset/base/363005 Log: MFC r362580: TCP: fix cubic RTO reaction. Proper TCP Cubic operation requires the knowledge of the maximum congestion window prior to the last congestion event. This restores and improves a bugfix previously added by jtl@ but subsequently removed due to a revert. Reported by: chengc_netapp.com Reviewed by: chengc_netapp.com, tuexen (mentor) Approved by: tuexen (mentor), rgrimes (mentor, blanket) MFC after: 2 weeks Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D25133 Modified: stable/12/sys/netinet/cc/cc_cubic.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/netinet/cc/cc_cubic.c ============================================================================== --- stable/12/sys/netinet/cc/cc_cubic.c Wed Jul 8 09:00:05 2020 (r363004) +++ stable/12/sys/netinet/cc/cc_cubic.c Wed Jul 8 09:04:20 2020 (r363005) @@ -313,10 +313,15 @@ cubic_cong_signal(struct cc_var *ccv, uint32_t type) * timeout has fired more than once, as there is a reasonable * chance the first one is a false alarm and may not indicate * congestion. + * This will put Cubic firmly into the concave / TCP friendly + * region, for a slower ramp-up after two consecutive RTOs. */ if (CCV(ccv, t_rxtshift) >= 2) { cubic_data->flags |= CUBICFLAG_CONG_EVENT; cubic_data->t_last_cong = ticks; + cubic_data->max_cwnd = CCV(ccv, snd_cwnd_prev); + cubic_data->K = cubic_k(cubic_data->max_cwnd / + CCV(ccv, t_maxseg)); } break; }