xref: /freebsd/share/man/man4/cc_newreno.4 (revision f374ba41)
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.\" $FreeBSD$
32.\"
33.Dd February 4, 2023
34.Dt CC_NEWRENO 4
35.Os
36.Sh NAME
37.Nm cc_newreno
38.Nd NewReno Congestion Control Algorithm
39.Sh SYNOPSIS
40.In netinet/cc/cc_newreno.h
41.Sh DESCRIPTION
42Details about the algorithm can be found in RFC5681.
43.Sh Socket Options
44The
45.Nm
46module supports a number of socket options under TCP_CCALGOOPT (refer to
47.Xr tcp 4
48and
49.Xr mod_cc 9 for details)
50which can
51be set with
52.Xr setsockopt 2
53and tested with
54.Xr getsockopt 2 .
55The
56.Nm
57socket options use this structure defined in
58<sys/netinet/cc/cc_newreno.h>:
59.Bd -literal
60struct cc_newreno_opts {
61	int name;
62	uint32_t val;
63}
64.Ed
65.Bl -tag -width ".Va CC_NEWRENO_BETA_ECN"
66.It Va CC_NEWRENO_BETA
67Multiplicative window decrease factor, specified as a percentage, applied to
68the congestion window in response to a congestion signal per: cwnd = (cwnd *
69CC_NEWRENO_BETA) / 100.
70Default is 50.
71.It Va CC_NEWRENO_BETA_ECN
72Multiplicative window decrease factor, specified as a percentage, applied to
73the congestion window in response to an ECN congestion signal when
74.Va net.inet.tcp.cc.abe=1
75per: cwnd = (cwnd * CC_NEWRENO_BETA_ECN) / 100.
76Default is 80.
77.Pp
78Note that currently the only way to enable
79hystart++ is to enable it via socket option.
80When enabling it a value of 1 will enable precise internet-draft (version 4) behavior
81(subject to any MIB variable settings), other setting (2 and 3) are experimental.
82.El
83.Pp
84Note that hystart++ requires the TCP stack be able to call to the congestion
85controller with both the
86.Va newround
87function as well as the
88.Va rttsample
89function.
90Currently the only TCP stacks that provide this feedback to the
91congestion controller is rack.
92.Sh MIB Variables
93The algorithm exposes these variables in the
94.Va net.inet.tcp.cc.newreno
95branch of the
96.Xr sysctl 3
97MIB:
98.Bl -tag -width ".Va beta_ecn"
99.It Va beta
100Multiplicative window decrease factor, specified as a percentage, applied to
101the congestion window in response to a congestion signal per: cwnd = (cwnd *
102beta) / 100.
103Default is 50.
104.It Va beta_ecn
105Multiplicative window decrease factor, specified as a percentage, applied to
106the congestion window in response to an ECN congestion signal when
107.Va net.inet.tcp.cc.abe=1
108per: cwnd = (cwnd * beta_ecn) / 100.
109Default is 80.
110.El
111.Sh SEE ALSO
112.Xr cc_cdg 4 ,
113.Xr cc_chd 4 ,
114.Xr cc_cubic 4 ,
115.Xr cc_dctcp 4 ,
116.Xr cc_hd 4 ,
117.Xr cc_htcp 4 ,
118.Xr cc_vegas 4 ,
119.Xr mod_cc 4 ,
120.Xr tcp 4 ,
121.Xr mod_cc 9
122.Rs
123.%A "Mark Allman"
124.%A "Vern Paxson"
125.%A "Ethan Blanton"
126.%T "TCP Congestion Control"
127.%O "RFC 5681"
128.Re
129.Rs
130.%A "Naeem Khademi"
131.%A "Michael Welzl"
132.%A "Grenville Armitage"
133.%A "Gorry Fairhurst"
134.%T "TCP Alternative Backoff with ECN (ABE)"
135.%O "RFC 8511"
136.Re
137.Sh ACKNOWLEDGEMENTS
138Development and testing of this software were made possible in part by grants
139from the FreeBSD Foundation and Cisco University Research Program Fund at
140Community Foundation Silicon Valley.
141.Sh HISTORY
142The
143.Nm
144congestion control algorithm first appeared in its modular form in
145.Fx 9.0 .
146.Pp
147This was the default congestion control algorithm in FreeBSD before
148version
149.Fx 14.0 ,
150after which
151.Xr cc_cubic 4
152replaced it.
153.Pp
154The module was first released in 2007 by James Healy and Lawrence Stewart whilst
155working on the NewTCP research project at Swinburne University of Technology's
156Centre for Advanced Internet Architectures, Melbourne, Australia, which was made
157possible in part by a grant from the Cisco University Research Program Fund at
158Community Foundation Silicon Valley.
159More details are available at:
160.Pp
161http://caia.swin.edu.au/urp/newtcp/
162.Sh AUTHORS
163.An -nosplit
164The
165.Nm
166congestion control module was written by
167.An James Healy Aq Mt jimmy@deefa.com ,
168.An Lawrence Stewart Aq Mt lstewart@FreeBSD.org
169and
170.An David Hayes Aq Mt david.hayes@ieee.org .
171.Pp
172Support for TCP ABE was added by
173.An Tom Jones Aq Mt tj@enoti.me .
174.Pp
175This manual page was written by
176.An Lawrence Stewart Aq Mt lstewart@FreeBSD.org .
177