xref: /freebsd/share/man/man4/mod_cc.4 (revision b8d60729deefa0bd13e6a395fcab4928e6e10445)
1f772f9feSLawrence Stewart.\"
2f772f9feSLawrence Stewart.\" Copyright (c) 2010-2011 The FreeBSD Foundation
3f772f9feSLawrence Stewart.\" All rights reserved.
4f772f9feSLawrence Stewart.\"
5f772f9feSLawrence Stewart.\" This documentation was written at the Centre for Advanced Internet
6f772f9feSLawrence Stewart.\" Architectures, Swinburne University of Technology, Melbourne, Australia by
7f772f9feSLawrence Stewart.\" David Hayes and Lawrence Stewart under sponsorship from the FreeBSD
8f772f9feSLawrence Stewart.\" Foundation.
9f772f9feSLawrence Stewart.\"
10f772f9feSLawrence Stewart.\" Redistribution and use in source and binary forms, with or without
11f772f9feSLawrence Stewart.\" modification, are permitted provided that the following conditions
12f772f9feSLawrence Stewart.\" are met:
13f772f9feSLawrence Stewart.\" 1. Redistributions of source code must retain the above copyright
14f772f9feSLawrence Stewart.\"    notice, this list of conditions and the following disclaimer.
15f772f9feSLawrence Stewart.\" 2. Redistributions in binary form must reproduce the above copyright
16f772f9feSLawrence Stewart.\"    notice, this list of conditions and the following disclaimer in the
17f772f9feSLawrence Stewart.\"    documentation and/or other materials provided with the distribution.
18f772f9feSLawrence Stewart.\"
19f772f9feSLawrence Stewart.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
20f772f9feSLawrence Stewart.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21f772f9feSLawrence Stewart.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22f772f9feSLawrence Stewart.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR
23f772f9feSLawrence Stewart.\" ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24f772f9feSLawrence Stewart.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
25f772f9feSLawrence Stewart.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26f772f9feSLawrence Stewart.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27f772f9feSLawrence Stewart.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
28f772f9feSLawrence Stewart.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29f772f9feSLawrence Stewart.\" SUCH DAMAGE.
30f772f9feSLawrence Stewart.\"
31f772f9feSLawrence Stewart.\" $FreeBSD$
32f772f9feSLawrence Stewart.\"
3312b678e9SMichael Tuexen.Dd August 6, 2019
34f772f9feSLawrence Stewart.Dt MOD_CC 4
35f772f9feSLawrence Stewart.Os
36f772f9feSLawrence Stewart.Sh NAME
37f772f9feSLawrence Stewart.Nm mod_cc
38f772f9feSLawrence Stewart.Nd Modular congestion control
39f772f9feSLawrence Stewart.Sh DESCRIPTION
40f772f9feSLawrence StewartThe modular congestion control framework allows the TCP implementation to
41f772f9feSLawrence Stewartdynamically change the congestion control algorithm used by new and existing
42f772f9feSLawrence Stewartconnections.
43f772f9feSLawrence StewartAlgorithms are identified by a unique
44f772f9feSLawrence Stewart.Xr ascii 7
45f772f9feSLawrence Stewartname.
46f772f9feSLawrence StewartAlgorithm modules can be compiled into the kernel or loaded as kernel modules
47f772f9feSLawrence Stewartusing the
48f772f9feSLawrence Stewart.Xr kld 4
49f772f9feSLawrence Stewartfacility.
50f772f9feSLawrence Stewart.Pp
51f772f9feSLawrence StewartThe default algorithm is NewReno, and all connections use the default unless
52d519cedbSGleb Smirnoffexplicitly overridden using the
53d519cedbSGleb Smirnoff.Dv TCP_CONGESTION
54d519cedbSGleb Smirnoffsocket option (see
55f772f9feSLawrence Stewart.Xr tcp 4
56f772f9feSLawrence Stewartfor details).
57f772f9feSLawrence StewartThe default can be changed using a
58f772f9feSLawrence Stewart.Xr sysctl 3
59f772f9feSLawrence StewartMIB variable detailed in the
60f772f9feSLawrence Stewart.Sx MIB Variables
61f772f9feSLawrence Stewartsection below.
62d519cedbSGleb Smirnoff.Pp
63d519cedbSGleb SmirnoffAlgorithm specific parameters can be set or queried using the
64d519cedbSGleb Smirnoff.Dv TCP_CCALGOOPT
65d519cedbSGleb Smirnoffsocket option (see
66d519cedbSGleb Smirnoff.Xr tcp 4
67d519cedbSGleb Smirnofffor details).
68d519cedbSGleb SmirnoffCallers must pass a pointer to an algorithm specific data, and specify
69d519cedbSGleb Smirnoffits size.
70*b8d60729SRandall Stewart.Pp
71*b8d60729SRandall StewartUnloading a congestion control module will fail if it is used as a
72*b8d60729SRandall Stewartdefault by any Vnet.
73*b8d60729SRandall StewartWhen unloading a module, the Vnet default is
74*b8d60729SRandall Stewartused to switch a connection to an alternate congestion control.
75*b8d60729SRandall StewartNote that the new congestion control module may fail to initialize its
76*b8d60729SRandall Stewartinternal memory, if so it will fail the module unload.
77*b8d60729SRandall StewartIf this occurs often times retrying the unload will succeed since the temporary
78*b8d60729SRandall Stewartmemory shortage as the new CC module malloc's memory, that prevented the
79*b8d60729SRandall Stewartswitch is often transient.
80f772f9feSLawrence Stewart.Sh MIB Variables
81f772f9feSLawrence StewartThe framework exposes the following variables in the
82f772f9feSLawrence Stewart.Va net.inet.tcp.cc
83f772f9feSLawrence Stewartbranch of the
84f772f9feSLawrence Stewart.Xr sysctl 3
85f772f9feSLawrence StewartMIB:
86370efe5aSLawrence Stewart.Bl -tag -width ".Va abe_frlossreduce"
87f772f9feSLawrence Stewart.It Va available
88f772f9feSLawrence StewartRead-only list of currently available congestion control algorithms by name.
89f772f9feSLawrence Stewart.It Va algorithm
90f772f9feSLawrence StewartReturns the current default congestion control algorithm when read, and changes
91f772f9feSLawrence Stewartthe default when set.
92f772f9feSLawrence StewartWhen attempting to change the default algorithm, this variable should be set to
93f772f9feSLawrence Stewartone of the names listed by the
94f772f9feSLawrence Stewart.Va net.inet.tcp.cc.available
95f772f9feSLawrence StewartMIB variable.
96370efe5aSLawrence Stewart.It Va abe
9712b678e9SMichael TuexenEnable support for RFC 8511,
98370efe5aSLawrence Stewartwhich alters the window decrease factor applied to the congestion window in
99370efe5aSLawrence Stewartresponse to an ECN congestion signal.
100370efe5aSLawrence StewartRefer to individual congestion control man pages to determine if they implement
101370efe5aSLawrence Stewartsupport for ABE and for configuration details.
102370efe5aSLawrence Stewart.It Va abe_frlossreduce
103370efe5aSLawrence StewartIf non-zero, apply standard beta instead of ABE-beta during ECN-signalled
104370efe5aSLawrence Stewartcongestion recovery episodes if loss also needs to be repaired.
105f772f9feSLawrence Stewart.El
106*b8d60729SRandall Stewart.Pp
107*b8d60729SRandall StewartEach congestion control module may also expose other MIB variables
108*b8d60729SRandall Stewartto control their behaviour.
109*b8d60729SRandall Stewart.Sh Kernel Configuration
110*b8d60729SRandall Stewart.Pp
111*b8d60729SRandall StewartAll of the available congestion control modules may also be loaded
112*b8d60729SRandall Stewartvia kernel configutation options.
113*b8d60729SRandall StewartA kernel configuration is required to have at least one congestion control
114*b8d60729SRandall Stewartalgorithm built into it via kernel option and a system default specified.
115*b8d60729SRandall StewartCompilation of the kernel will fail if these two conditions are not met.
116*b8d60729SRandall Stewart.Sh Kernel Configuration Options
117*b8d60729SRandall StewartThe framework exposes the following kernel configuration options.
118*b8d60729SRandall Stewart.Bl -tag -width ".Va CC_NEWRENO"
119*b8d60729SRandall Stewart.It Va CC_NEWRENO
120*b8d60729SRandall StewartThis directive loads the newreno congestion control algorithm and is included
121*b8d60729SRandall Stewartin GENERIC by default.
122*b8d60729SRandall Stewart.It Va CC_CUBIC
123*b8d60729SRandall StewartThis directive loads the cubic congestion control algorithm.
124*b8d60729SRandall Stewart.It Va CC_VEGAS
125*b8d60729SRandall StewartThis directive loads the vegas congestion control algorithm, note that
126*b8d60729SRandall Stewartthis algorithm also requires the TCP_HHOOK option as well.
127*b8d60729SRandall Stewart.It Va CC_CDG
128*b8d60729SRandall StewartThis directive loads the cdg congestion control algorithm, note that
129*b8d60729SRandall Stewartthis algorithm also requires the TCP_HHOOK option as well.
130*b8d60729SRandall Stewart.It Va CC_DCTCP
131*b8d60729SRandall StewartThis directive loads the dctcp congestion control algorithm.
132*b8d60729SRandall Stewart.It Va CC_HD
133*b8d60729SRandall StewartThis directive loads the hd congestion control algorithm, note that
134*b8d60729SRandall Stewartthis algorithm also requires the TCP_HHOOK option as well.
135*b8d60729SRandall Stewart.It Va CC_CHD
136*b8d60729SRandall StewartThis directive loads the chd congestion control algorithm, note that
137*b8d60729SRandall Stewartthis algorithm also requires the TCP_HHOOK option as well.
138*b8d60729SRandall Stewart.It Va CC_HTCP
139*b8d60729SRandall StewartThis directive loads the htcp congestion control algorithm.
140*b8d60729SRandall Stewart.It Va CC_DEFAULT
141*b8d60729SRandall StewartThis directive specifies the string that represents the name of the system default algorithm, the GENERIC kernel
142*b8d60729SRandall Stewartdefaults this to newreno.
143*b8d60729SRandall Stewart.El
144f772f9feSLawrence Stewart.Sh SEE ALSO
1455547f9fbSKevin Lo.Xr cc_cdg 4 ,
146f772f9feSLawrence Stewart.Xr cc_chd 4 ,
147f772f9feSLawrence Stewart.Xr cc_cubic 4 ,
14864807b30SHiren Panchasara.Xr cc_dctcp 4 ,
149f772f9feSLawrence Stewart.Xr cc_hd 4 ,
150f772f9feSLawrence Stewart.Xr cc_htcp 4 ,
151f772f9feSLawrence Stewart.Xr cc_newreno 4 ,
152f772f9feSLawrence Stewart.Xr cc_vegas 4 ,
153f772f9feSLawrence Stewart.Xr tcp 4 ,
154*b8d60729SRandall Stewart.Xr config 5 ,
155*b8d60729SRandall Stewart.Xr config 8 ,
156f772f9feSLawrence Stewart.Xr mod_cc 9
157f772f9feSLawrence Stewart.Sh ACKNOWLEDGEMENTS
158f772f9feSLawrence StewartDevelopment and testing of this software were made possible in part by grants
159f772f9feSLawrence Stewartfrom the FreeBSD Foundation and Cisco University Research Program Fund at
160f772f9feSLawrence StewartCommunity Foundation Silicon Valley.
161f772f9feSLawrence Stewart.Sh HISTORY
162f772f9feSLawrence StewartThe
163f772f9feSLawrence Stewart.Nm
164f772f9feSLawrence Stewartmodular congestion control framework first appeared in
165f772f9feSLawrence Stewart.Fx 9.0 .
166f772f9feSLawrence Stewart.Pp
167f772f9feSLawrence StewartThe framework was first released in 2007 by James Healy and Lawrence Stewart
168f772f9feSLawrence Stewartwhilst working on the NewTCP research project at Swinburne University of
169f772f9feSLawrence StewartTechnology's Centre for Advanced Internet Architectures, Melbourne, Australia,
170f772f9feSLawrence Stewartwhich was made possible in part by a grant from the Cisco University Research
171f772f9feSLawrence StewartProgram Fund at Community Foundation Silicon Valley.
172f772f9feSLawrence StewartMore details are available at:
173f772f9feSLawrence Stewart.Pp
174f772f9feSLawrence Stewarthttp://caia.swin.edu.au/urp/newtcp/
175f772f9feSLawrence Stewart.Sh AUTHORS
176f772f9feSLawrence Stewart.An -nosplit
177f772f9feSLawrence StewartThe
178f772f9feSLawrence Stewart.Nm
179f772f9feSLawrence Stewartfacility was written by
1806c899950SBaptiste Daroussin.An Lawrence Stewart Aq Mt lstewart@FreeBSD.org ,
1816c899950SBaptiste Daroussin.An James Healy Aq Mt jimmy@deefa.com
182f772f9feSLawrence Stewartand
1836c899950SBaptiste Daroussin.An David Hayes Aq Mt david.hayes@ieee.org .
184f772f9feSLawrence Stewart.Pp
185f772f9feSLawrence StewartThis manual page was written by
1866c899950SBaptiste Daroussin.An David Hayes Aq Mt david.hayes@ieee.org
187f772f9feSLawrence Stewartand
1886c899950SBaptiste Daroussin.An Lawrence Stewart Aq Mt lstewart@FreeBSD.org .
189