From owner-svn-src-head@freebsd.org Thu May 3 15:01:27 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A6AB3FADD83; Thu, 3 May 2018 15:01:27 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 54A39757A1; Thu, 3 May 2018 15:01:27 +0000 (UTC) (envelope-from sbruno@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 4F92D21627; Thu, 3 May 2018 15:01:27 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w43F1RBr024235; Thu, 3 May 2018 15:01:27 GMT (envelope-from sbruno@FreeBSD.org) Received: (from sbruno@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w43F1Reo024234; Thu, 3 May 2018 15:01:27 GMT (envelope-from sbruno@FreeBSD.org) Message-Id: <201805031501.w43F1Reo024234@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sbruno set sender to sbruno@FreeBSD.org using -f From: Sean Bruno Date: Thu, 3 May 2018 15:01:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r333211 - head/sys/netinet/cc X-SVN-Group: head X-SVN-Commit-Author: sbruno X-SVN-Commit-Paths: head/sys/netinet/cc X-SVN-Commit-Revision: 333211 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 May 2018 15:01:27 -0000 Author: sbruno Date: Thu May 3 15:01:27 2018 New Revision: 333211 URL: https://svnweb.freebsd.org/changeset/base/333211 Log: cc_cubic: - Update cubic parameters to draft-ietf-tcpm-cubic-04 Submitted by: Matt Macy Reviewed by: lstewart Differential Revision: https://reviews.freebsd.org/D10556 Modified: head/sys/netinet/cc/cc_cubic.h Modified: head/sys/netinet/cc/cc_cubic.h ============================================================================== --- head/sys/netinet/cc/cc_cubic.h Thu May 3 14:48:42 2018 (r333210) +++ head/sys/netinet/cc/cc_cubic.h Thu May 3 15:01:27 2018 (r333211) @@ -51,23 +51,23 @@ /* 0.5 << CUBIC_SHIFT. */ #define RENO_BETA 128 -/* ~0.8 << CUBIC_SHIFT. */ -#define CUBIC_BETA 204 +/* ~0.7 << CUBIC_SHIFT. */ +#define CUBIC_BETA 179 -/* ~0.2 << CUBIC_SHIFT. */ -#define ONE_SUB_CUBIC_BETA 51 +/* ~0.3 << CUBIC_SHIFT. */ +#define ONE_SUB_CUBIC_BETA 77 /* 3 * ONE_SUB_CUBIC_BETA. */ -#define THREE_X_PT2 153 +#define THREE_X_PT3 231 /* (2 << CUBIC_SHIFT) - ONE_SUB_CUBIC_BETA. */ -#define TWO_SUB_PT2 461 +#define TWO_SUB_PT3 435 /* ~0.4 << CUBIC_SHIFT. */ #define CUBIC_C_FACTOR 102 -/* CUBIC fast convergence factor: ~0.9 << CUBIC_SHIFT. */ -#define CUBIC_FC_FACTOR 230 +/* CUBIC fast convergence factor: (1+beta_cubic)/2. */ +#define CUBIC_FC_FACTOR 217 /* Don't trust s_rtt until this many rtt samples have been taken. */ #define CUBIC_MIN_RTT_SAMPLES 8 @@ -79,9 +79,8 @@ extern int hz; /* * Implementation based on the formulae found in the CUBIC Internet Draft - * "draft-rhee-tcpm-cubic-02". + * "draft-ietf-tcpm-cubic-04". * - * Note BETA used in cc_cubic is equal to (1-beta) in the I-D */ static __inline float @@ -91,7 +90,7 @@ theoretical_cubic_k(double wmax_pkts) C = 0.4; - return (pow((wmax_pkts * 0.2) / C, (1.0 / 3.0)) * pow(2, CUBIC_SHIFT)); + return (pow((wmax_pkts * 0.3) / C, (1.0 / 3.0)) * pow(2, CUBIC_SHIFT)); } static __inline unsigned long @@ -120,7 +119,7 @@ theoretical_tf_cwnd(int ticks_since_cong, int rtt_tick uint32_t smss) { - return ((wmax * 0.8) + ((3 * 0.2) / (2 - 0.2) * + return ((wmax * 0.7) + ((3 * 0.3) / (2 - 0.3) * (ticks_since_cong / (float)rtt_ticks) * smss)); } @@ -232,7 +231,7 @@ reno_cwnd(int ticks_since_cong, int rtt_ticks, unsigne /* * Compute an approximation of the "TCP friendly" cwnd some number of ticks * after a congestion event that is designed to yield the same average cwnd as - * NewReno while using CUBIC's beta of 0.8. RTT should be the average RTT + * NewReno while using CUBIC's beta of 0.7. RTT should be the average RTT * estimate for the path measured over the previous congestion epoch and wmax is * the value of cwnd at the last congestion event. */ @@ -242,8 +241,8 @@ tf_cwnd(int ticks_since_cong, int rtt_ticks, unsigned { /* Equation 4 of I-D. */ - return (((wmax * CUBIC_BETA) + (((THREE_X_PT2 * ticks_since_cong * - smss) << CUBIC_SHIFT) / TWO_SUB_PT2 / rtt_ticks)) >> CUBIC_SHIFT); + return (((wmax * CUBIC_BETA) + (((THREE_X_PT3 * ticks_since_cong * + smss) << CUBIC_SHIFT) / TWO_SUB_PT3 / rtt_ticks)) >> CUBIC_SHIFT); } #endif /* _NETINET_CC_CUBIC_H_ */