xref: /freebsd/share/man/man4/cc_newreno.4 (revision cbb3ec25236ba72f91cbdf23f8b78b9d1af0cedf)
1.\"
2.\" Copyright (c) 2009 Lawrence Stewart <lstewart@FreeBSD.org>
3.\" Copyright (c) 2011 The FreeBSD Foundation
4.\" All rights reserved.
5.\"
6.\" Portions of this documentation were written at the Centre for Advanced
7.\" Internet Architectures, Swinburne University of Technology, Melbourne,
8.\" Australia by Lawrence Stewart under sponsorship from the FreeBSD Foundation.
9.\"
10.\" Redistribution and use in source and binary forms, with or without
11.\" modification, are permitted provided that the following conditions
12.\" are met:
13.\" 1. Redistributions of source code must retain the above copyright
14.\"    notice, this list of conditions and the following disclaimer.
15.\" 2. Redistributions in binary form must reproduce the above copyright
16.\"    notice, this list of conditions and the following disclaimer in the
17.\"    documentation and/or other materials provided with the distribution.
18.\"
19.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
20.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR
23.\" ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
25.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
28.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29.\" SUCH DAMAGE.
30.\"
31.Dd February 4, 2023
32.Dt CC_NEWRENO 4
33.Os
34.Sh NAME
35.Nm cc_newreno
36.Nd NewReno Congestion Control Algorithm
37.Sh SYNOPSIS
38.In netinet/cc/cc_newreno.h
39.Sh DESCRIPTION
40Details about the algorithm can be found in RFC5681.
41.Sh Socket Options
42The
43.Nm
44module supports a number of socket options under TCP_CCALGOOPT (refer to
45.Xr tcp 4
46and
47.Xr mod_cc 9 for details)
48which can
49be set with
50.Xr setsockopt 2
51and tested with
52.Xr getsockopt 2 .
53The
54.Nm
55socket options use this structure defined in
56<sys/netinet/cc/cc_newreno.h>:
57.Bd -literal
58struct cc_newreno_opts {
59	int name;
60	uint32_t val;
61}
62.Ed
63.Bl -tag -width ".Va CC_NEWRENO_BETA_ECN"
64.It Va CC_NEWRENO_BETA
65Multiplicative window decrease factor, specified as a percentage, applied to
66the congestion window in response to a congestion signal per: cwnd = (cwnd *
67CC_NEWRENO_BETA) / 100.
68Default is 50.
69.It Va CC_NEWRENO_BETA_ECN
70Multiplicative window decrease factor, specified as a percentage, applied to
71the congestion window in response to an ECN congestion signal when
72.Va net.inet.tcp.cc.abe=1
73per: cwnd = (cwnd * CC_NEWRENO_BETA_ECN) / 100.
74Default is 80.
75.Pp
76Note that currently the only way to enable
77hystart++ is to enable it via socket option.
78When enabling it a value of 1 will enable precise internet-draft (version 4) behavior
79(subject to any MIB variable settings), other setting (2 and 3) are experimental.
80.El
81.Pp
82Note that hystart++ requires the TCP stack be able to call to the congestion
83controller with both the
84.Va newround
85function as well as the
86.Va rttsample
87function.
88Currently the only TCP stacks that provide this feedback to the
89congestion controller is rack.
90.Sh MIB Variables
91The algorithm exposes these variables in the
92.Va net.inet.tcp.cc.newreno
93branch of the
94.Xr sysctl 3
95MIB:
96.Bl -tag -width ".Va beta_ecn"
97.It Va beta
98Multiplicative window decrease factor, specified as a percentage, applied to
99the congestion window in response to a congestion signal per: cwnd = (cwnd *
100beta) / 100.
101Default is 50.
102.It Va beta_ecn
103Multiplicative window decrease factor, specified as a percentage, applied to
104the congestion window in response to an ECN congestion signal when
105.Va net.inet.tcp.cc.abe=1
106per: cwnd = (cwnd * beta_ecn) / 100.
107Default is 80.
108.El
109.Sh SEE ALSO
110.Xr cc_cdg 4 ,
111.Xr cc_chd 4 ,
112.Xr cc_cubic 4 ,
113.Xr cc_dctcp 4 ,
114.Xr cc_hd 4 ,
115.Xr cc_htcp 4 ,
116.Xr cc_vegas 4 ,
117.Xr mod_cc 4 ,
118.Xr tcp 4 ,
119.Xr mod_cc 9
120.Rs
121.%A "Mark Allman"
122.%A "Vern Paxson"
123.%A "Ethan Blanton"
124.%T "TCP Congestion Control"
125.%O "RFC 5681"
126.Re
127.Rs
128.%A "Naeem Khademi"
129.%A "Michael Welzl"
130.%A "Grenville Armitage"
131.%A "Gorry Fairhurst"
132.%T "TCP Alternative Backoff with ECN (ABE)"
133.%O "RFC 8511"
134.Re
135.Sh ACKNOWLEDGEMENTS
136Development and testing of this software were made possible in part by grants
137from the FreeBSD Foundation and Cisco University Research Program Fund at
138Community Foundation Silicon Valley.
139.Sh HISTORY
140The
141.Nm
142congestion control algorithm first appeared in its modular form in
143.Fx 9.0 .
144.Pp
145This was the default congestion control algorithm in FreeBSD before
146version
147.Fx 14.0 ,
148after which
149.Xr cc_cubic 4
150replaced it.
151.Pp
152The module was first released in 2007 by James Healy and Lawrence Stewart whilst
153working on the NewTCP research project at Swinburne University of Technology's
154Centre for Advanced Internet Architectures, Melbourne, Australia, which was made
155possible in part by a grant from the Cisco University Research Program Fund at
156Community Foundation Silicon Valley.
157More details are available at:
158.Pp
159http://caia.swin.edu.au/urp/newtcp/
160.Sh AUTHORS
161.An -nosplit
162The
163.Nm
164congestion control module was written by
165.An James Healy Aq Mt jimmy@deefa.com ,
166.An Lawrence Stewart Aq Mt lstewart@FreeBSD.org
167and
168.An David Hayes Aq Mt david.hayes@ieee.org .
169.Pp
170Support for TCP ABE was added by
171.An Tom Jones Aq Mt tj@enoti.me .
172.Pp
173This manual page was written by
174.An Lawrence Stewart Aq Mt lstewart@FreeBSD.org .
175