129f269dcSLawrence Stewart.\" 229f269dcSLawrence Stewart.\" Copyright (c) 2009 Lawrence Stewart <lstewart@FreeBSD.org> 329f269dcSLawrence Stewart.\" Copyright (c) 2011 The FreeBSD Foundation 429f269dcSLawrence Stewart.\" All rights reserved. 529f269dcSLawrence Stewart.\" 629f269dcSLawrence Stewart.\" Portions of this documentation were written at the Centre for Advanced 7891b8ed4SLawrence Stewart.\" Internet Architectures, Swinburne University of Technology, Melbourne, 8891b8ed4SLawrence Stewart.\" Australia by Lawrence Stewart under sponsorship from the FreeBSD Foundation. 929f269dcSLawrence Stewart.\" 1029f269dcSLawrence Stewart.\" Redistribution and use in source and binary forms, with or without 1129f269dcSLawrence Stewart.\" modification, are permitted provided that the following conditions 1229f269dcSLawrence Stewart.\" are met: 1329f269dcSLawrence Stewart.\" 1. Redistributions of source code must retain the above copyright 1429f269dcSLawrence Stewart.\" notice, this list of conditions and the following disclaimer. 1529f269dcSLawrence Stewart.\" 2. Redistributions in binary form must reproduce the above copyright 1629f269dcSLawrence Stewart.\" notice, this list of conditions and the following disclaimer in the 1729f269dcSLawrence Stewart.\" documentation and/or other materials provided with the distribution. 1829f269dcSLawrence Stewart.\" 1929f269dcSLawrence Stewart.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 2029f269dcSLawrence Stewart.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 2129f269dcSLawrence Stewart.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 2229f269dcSLawrence Stewart.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR 2329f269dcSLawrence Stewart.\" ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 2429f269dcSLawrence Stewart.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 2529f269dcSLawrence Stewart.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 2629f269dcSLawrence Stewart.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 2729f269dcSLawrence Stewart.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 2829f269dcSLawrence Stewart.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 2929f269dcSLawrence Stewart.\" SUCH DAMAGE. 3029f269dcSLawrence Stewart.\" 3129f269dcSLawrence Stewart.\" $FreeBSD$ 3229f269dcSLawrence Stewart.\" 338ea5eeb9SMichael Tuexen.Dd May 13, 2021 3429f269dcSLawrence Stewart.Dt CC_NEWRENO 4 3529f269dcSLawrence Stewart.Os 3629f269dcSLawrence Stewart.Sh NAME 3729f269dcSLawrence Stewart.Nm cc_newreno 3829f269dcSLawrence Stewart.Nd NewReno Congestion Control Algorithm 39370efe5aSLawrence Stewart.Sh SYNOPSIS 40370efe5aSLawrence Stewart.In netinet/cc/cc_newreno.h 4129f269dcSLawrence Stewart.Sh DESCRIPTION 4229f269dcSLawrence StewartThe NewReno congestion control algorithm is the default for TCP. 4329f269dcSLawrence StewartDetails about the algorithm can be found in RFC5681. 44370efe5aSLawrence Stewart.Sh Socket Options 45370efe5aSLawrence StewartThe 46370efe5aSLawrence Stewart.Nm 47370efe5aSLawrence Stewartmodule supports a number of socket options under TCP_CCALGOOPT (refer to 48370efe5aSLawrence Stewart.Xr tcp 4 49370efe5aSLawrence Stewartand 50d458747eSChristian Brueffer.Xr mod_cc 9 for details) 51370efe5aSLawrence Stewartwhich can 52370efe5aSLawrence Stewartbe set with 53370efe5aSLawrence Stewart.Xr setsockopt 2 54370efe5aSLawrence Stewartand tested with 55370efe5aSLawrence Stewart.Xr getsockopt 2 . 56370efe5aSLawrence StewartThe 57370efe5aSLawrence Stewart.Nm 58370efe5aSLawrence Stewartsocket options use this structure defined in 59370efe5aSLawrence Stewart<sys/netinet/cc/cc_newreno.h>: 60370efe5aSLawrence Stewart.Bd -literal 61370efe5aSLawrence Stewartstruct cc_newreno_opts { 62370efe5aSLawrence Stewart int name; 63370efe5aSLawrence Stewart uint32_t val; 64370efe5aSLawrence Stewart} 65370efe5aSLawrence Stewart.Ed 66370efe5aSLawrence Stewart.Bl -tag -width ".Va CC_NEWRENO_BETA_ECN" 67370efe5aSLawrence Stewart.It Va CC_NEWRENO_BETA 68370efe5aSLawrence StewartMultiplicative window decrease factor, specified as a percentage, applied to 69370efe5aSLawrence Stewartthe congestion window in response to a congestion signal per: cwnd = (cwnd * 70370efe5aSLawrence StewartCC_NEWRENO_BETA) / 100. 71370efe5aSLawrence StewartDefault is 50. 72370efe5aSLawrence Stewart.It Va CC_NEWRENO_BETA_ECN 73370efe5aSLawrence StewartMultiplicative window decrease factor, specified as a percentage, applied to 74370efe5aSLawrence Stewartthe congestion window in response to an ECN congestion signal when 75370efe5aSLawrence Stewart.Va net.inet.tcp.cc.abe=1 76370efe5aSLawrence Stewartper: cwnd = (cwnd * CC_NEWRENO_BETA_ECN) / 100. 77370efe5aSLawrence StewartDefault is 80. 78*b8d60729SRandall Stewart.It Va CC_NEWRENO_ENABLE_HYSTART 79*b8d60729SRandall Stewartwill enable or disable the application of Hystart++. 80*b8d60729SRandall StewartThe current implementation allows the values 0, 1, 2 and 3. 81*b8d60729SRandall StewartA value of 0 (the default) disables the use of Hystart++. 82*b8d60729SRandall StewartSetting the value to 1 enables Hystart++. 83*b8d60729SRandall StewartSetting the value to 2 enables Hystart++ but also will cause, on exit from Hystart++'s CSS, to 84*b8d60729SRandall Stewartset the cwnd to the value of where the increase in RTT first began as 85*b8d60729SRandall Stewartwell as setting ssthresh to the flight at send when we exit CSS. 86*b8d60729SRandall StewartSetting a value of 3 will keep the setting of the cwnd the same as 2, but will cause ssthresh 87*b8d60729SRandall Stewartto be set to the average value between the lowest fas rtt (the value cwnd is 88*b8d60729SRandall Stewartset to) and the fas value at exit of CSS. 89*b8d60729SRandall Stewart.PP 90*b8d60729SRandall StewartNote that currently the only way to enable 91*b8d60729SRandall Stewarthystart++ is to enable it via socket option. 92*b8d60729SRandall StewartWhen enabling it a value of 1 will enable precise internet-draft behavior 93*b8d60729SRandall Stewart(subject to any MIB variable settings), other setting (2 and 3) are experimental. 941adc28f5SChristian Brueffer.El 95*b8d60729SRandall Stewart.PP 96*b8d60729SRandall StewartNote that hystart++ requires the TCP stack be able to call to the congestion 97*b8d60729SRandall Stewartcontroller with both the 98*b8d60729SRandall Stewart.Va newround 99*b8d60729SRandall Stewartfunction as well as the 100*b8d60729SRandall Stewart.Va rttsample 101*b8d60729SRandall Stewartfunction. 102*b8d60729SRandall StewartCurrently the only TCP stacks that provide this feedback to the 103*b8d60729SRandall Stewartcongestion controller is rack. 104*b8d60729SRandall Stewart.Pp 10529f269dcSLawrence Stewart.Sh MIB Variables 106370efe5aSLawrence StewartThe algorithm exposes these variables in the 107370efe5aSLawrence Stewart.Va net.inet.tcp.cc.newreno 108370efe5aSLawrence Stewartbranch of the 109370efe5aSLawrence Stewart.Xr sysctl 3 110370efe5aSLawrence StewartMIB: 111370efe5aSLawrence Stewart.Bl -tag -width ".Va beta_ecn" 112370efe5aSLawrence Stewart.It Va beta 113370efe5aSLawrence StewartMultiplicative window decrease factor, specified as a percentage, applied to 114370efe5aSLawrence Stewartthe congestion window in response to a congestion signal per: cwnd = (cwnd * 115370efe5aSLawrence Stewartbeta) / 100. 116370efe5aSLawrence StewartDefault is 50. 117370efe5aSLawrence Stewart.It Va beta_ecn 118370efe5aSLawrence StewartMultiplicative window decrease factor, specified as a percentage, applied to 119370efe5aSLawrence Stewartthe congestion window in response to an ECN congestion signal when 120370efe5aSLawrence Stewart.Va net.inet.tcp.cc.abe=1 121370efe5aSLawrence Stewartper: cwnd = (cwnd * beta_ecn) / 100. 122370efe5aSLawrence StewartDefault is 80. 123*b8d60729SRandall Stewart.It Va hystartplusplus.bblogs 124*b8d60729SRandall StewartThis boolean controls if black box logging will be done for hystart++ events. If set 125*b8d60729SRandall Stewartto zero (the default) no logging is performed. 126*b8d60729SRandall StewartIf set to one then black box logs will be generated on all hystart++ events. 127*b8d60729SRandall Stewart.It Va hystartplusplus.css_rounds 128*b8d60729SRandall StewartThis value controls the number of rounds that CSS runs for. 129*b8d60729SRandall StewartThe default value matches the current internet-draft of 5. 130*b8d60729SRandall Stewart.It Va hystartplusplus.css_growth_div 131*b8d60729SRandall StewartThis value controls the divisor applied to slowstart during CSS. 132*b8d60729SRandall StewartThe default value matches the current internet-draft of 4. 133*b8d60729SRandall Stewart.It Va hystartplusplus.n_rttsamples 134*b8d60729SRandall StewartThis value controls how many rtt samples must be collected in each round for 135*b8d60729SRandall Stewarthystart++ to be active. 136*b8d60729SRandall StewartThe default value matches the current internet-draft of 8. 137*b8d60729SRandall Stewart.It Va hystartplusplus.maxrtt_thresh 138*b8d60729SRandall StewartThis value controls the maximum rtt variance clamp when considering if CSS is needed. 139*b8d60729SRandall StewartThe default value matches the current internet-draft of 16000 (in microseconds). 140*b8d60729SRandall StewartFor further explanation please see the internet-draft. 141*b8d60729SRandall Stewart.It Va hystartplusplus.minrtt_thresh 142*b8d60729SRandall StewartThis value controls the minimum rtt variance clamp when considering if CSS is needed. 143*b8d60729SRandall StewartThe default value matches the current internet-draft of 4000 (in microseconds). 144*b8d60729SRandall StewartFor further explanation please see the internet-draft. 145*b8d60729SRandall Stewart.It Va hystartplusplus.lowcwnd 146*b8d60729SRandall StewartThis value controls what is the lowest congestion window that the tcp 147*b8d60729SRandall Stewartstack must be at before hystart++ engages. 148*b8d60729SRandall StewartThe default value matches the current internet-draft of 16. 1491adc28f5SChristian Brueffer.El 15029f269dcSLawrence Stewart.Sh SEE ALSO 1518ea5eeb9SMichael Tuexen.Xr cc_cdg 4 , 15229f269dcSLawrence Stewart.Xr cc_chd 4 , 15329f269dcSLawrence Stewart.Xr cc_cubic 4 , 1548ea5eeb9SMichael Tuexen.Xr cc_dctcp 4 , 15529f269dcSLawrence Stewart.Xr cc_hd 4 , 15629f269dcSLawrence Stewart.Xr cc_htcp 4 , 15729f269dcSLawrence Stewart.Xr cc_vegas 4 , 158f772f9feSLawrence Stewart.Xr mod_cc 4 , 15929f269dcSLawrence Stewart.Xr tcp 4 , 160f772f9feSLawrence Stewart.Xr mod_cc 9 161370efe5aSLawrence Stewart.Rs 162370efe5aSLawrence Stewart.%A "Mark Allman" 163370efe5aSLawrence Stewart.%A "Vern Paxson" 164370efe5aSLawrence Stewart.%A "Ethan Blanton" 165370efe5aSLawrence Stewart.%T "TCP Congestion Control" 166370efe5aSLawrence Stewart.%O "RFC 5681" 167370efe5aSLawrence Stewart.Re 168370efe5aSLawrence Stewart.Rs 169370efe5aSLawrence Stewart.%A "Naeem Khademi" 170370efe5aSLawrence Stewart.%A "Michael Welzl" 171370efe5aSLawrence Stewart.%A "Grenville Armitage" 172370efe5aSLawrence Stewart.%A "Gorry Fairhurst" 173370efe5aSLawrence Stewart.%T "TCP Alternative Backoff with ECN (ABE)" 17412b678e9SMichael Tuexen.%O "RFC 8511" 175370efe5aSLawrence Stewart.Re 17629f269dcSLawrence Stewart.Sh ACKNOWLEDGEMENTS 17729f269dcSLawrence StewartDevelopment and testing of this software were made possible in part by grants 17829f269dcSLawrence Stewartfrom the FreeBSD Foundation and Cisco University Research Program Fund at 17929f269dcSLawrence StewartCommunity Foundation Silicon Valley. 18029f269dcSLawrence Stewart.Sh HISTORY 18129f269dcSLawrence StewartThe 18229f269dcSLawrence Stewart.Nm 18329f269dcSLawrence Stewartcongestion control algorithm first appeared in its modular form in 18429f269dcSLawrence Stewart.Fx 9.0 . 18529f269dcSLawrence Stewart.Pp 18629f269dcSLawrence StewartThe module was first released in 2007 by James Healy and Lawrence Stewart whilst 187891b8ed4SLawrence Stewartworking on the NewTCP research project at Swinburne University of Technology's 188891b8ed4SLawrence StewartCentre for Advanced Internet Architectures, Melbourne, Australia, which was made 189891b8ed4SLawrence Stewartpossible in part by a grant from the Cisco University Research Program Fund at 190891b8ed4SLawrence StewartCommunity Foundation Silicon Valley. 19129f269dcSLawrence StewartMore details are available at: 19229f269dcSLawrence Stewart.Pp 19329f269dcSLawrence Stewarthttp://caia.swin.edu.au/urp/newtcp/ 19429f269dcSLawrence Stewart.Sh AUTHORS 19529f269dcSLawrence Stewart.An -nosplit 19629f269dcSLawrence StewartThe 19729f269dcSLawrence Stewart.Nm 19829f269dcSLawrence Stewartcongestion control module was written by 1996c899950SBaptiste Daroussin.An James Healy Aq Mt jimmy@deefa.com , 2006c899950SBaptiste Daroussin.An Lawrence Stewart Aq Mt lstewart@FreeBSD.org 20129f269dcSLawrence Stewartand 2026c899950SBaptiste Daroussin.An David Hayes Aq Mt david.hayes@ieee.org . 20329f269dcSLawrence Stewart.Pp 204370efe5aSLawrence StewartSupport for TCP ABE was added by 205370efe5aSLawrence Stewart.An Tom Jones Aq Mt tj@enoti.me . 206370efe5aSLawrence Stewart.Pp 20729f269dcSLawrence StewartThis manual page was written by 2086c899950SBaptiste Daroussin.An Lawrence Stewart Aq Mt lstewart@FreeBSD.org . 209