diff options
author | glebius <glebius@FreeBSD.org> | 2016-01-22 02:07:48 +0000 |
---|---|---|
committer | glebius <glebius@FreeBSD.org> | 2016-01-22 02:07:48 +0000 |
commit | 40ba1ae95a65027a63267d57c7b0fee6e030bbd2 (patch) | |
tree | dddc38b9e03f3559cc94d54c711282c48c319bd8 /share/man | |
parent | 0840cf26409ce91dd72208f7439fe1b11f4204c8 (diff) | |
download | FreeBSD-src-40ba1ae95a65027a63267d57c7b0fee6e030bbd2.zip FreeBSD-src-40ba1ae95a65027a63267d57c7b0fee6e030bbd2.tar.gz |
Provide new socket option TCP_CCALGOOPT, which stands for TCP congestion
control algorithm options. The argument is variable length and is opaque
to TCP, forwarded directly to the algorithm's ctl_output method.
Provide new includes directory netinet/cc, where algorithm specific
headers can be installed.
The new API doesn't yet have any in tree consumers.
The original code written by lstewart.
Reviewed by: rrs, emax
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D711
Diffstat (limited to 'share/man')
-rw-r--r-- | share/man/man4/mod_cc.4 | 14 | ||||
-rw-r--r-- | share/man/man4/tcp.4 | 7 | ||||
-rw-r--r-- | share/man/man9/mod_cc.9 | 20 |
3 files changed, 36 insertions, 5 deletions
diff --git a/share/man/man4/mod_cc.4 b/share/man/man4/mod_cc.4 index f5f4493..4712a39 100644 --- a/share/man/man4/mod_cc.4 +++ b/share/man/man4/mod_cc.4 @@ -30,7 +30,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 12, 2015 +.Dd January 21, 2016 .Dt MOD_CC 4 .Os .Sh NAME @@ -49,7 +49,9 @@ using the facility. .Pp The default algorithm is NewReno, and all connections use the default unless -explicitly overridden using the TCP_CONGESTION socket option (see +explicitly overridden using the +.Dv TCP_CONGESTION +socket option (see .Xr tcp 4 for details). The default can be changed using a @@ -57,6 +59,14 @@ The default can be changed using a MIB variable detailed in the .Sx MIB Variables section below. +.Pp +Algorithm specific parameters can be set or queried using the +.Dv TCP_CCALGOOPT +socket option (see +.Xr tcp 4 +for details). +Callers must pass a pointer to an algorithm specific data, and specify +its size. .Sh MIB Variables The framework exposes the following variables in the .Va net.inet.tcp.cc diff --git a/share/man/man4/tcp.4 b/share/man/man4/tcp.4 index 8c5887f..de993e7 100644 --- a/share/man/man4/tcp.4 +++ b/share/man/man4/tcp.4 @@ -34,7 +34,7 @@ .\" From: @(#)tcp.4 8.1 (Berkeley) 6/5/93 .\" $FreeBSD$ .\" -.Dd October 27, 2015 +.Dd January 21, 2016 .Dt TCP 4 .Os .Sh NAME @@ -137,6 +137,11 @@ send window size, receive window size, and bandwidth-controlled window space. +.It Dv TCP_CCALGOOPT +Set or query congestion control algorithm specific parameters. +See +.Xr mod_cc 4 +for details. .It Dv TCP_CONGESTION Select or query the congestion control algorithm that TCP will use for the connection. diff --git a/share/man/man9/mod_cc.9 b/share/man/man9/mod_cc.9 index f1cd5be..05205ed 100644 --- a/share/man/man9/mod_cc.9 +++ b/share/man/man9/mod_cc.9 @@ -31,7 +31,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 26, 2014 +.Dd January 21, 2016 .Dt MOD_CC 9 .Os .Sh NAME @@ -40,7 +40,8 @@ .Nm CCV .Nd Modular Congestion Control .Sh SYNOPSIS -.In netinet/cc.h +.In netinet/tcp.h +.In netinet/tcp_cc.h .In netinet/cc/cc_module.h .Fn DECLARE_CC_MODULE "ccname" "ccalgo" .Fn CCV "ccv" "what" @@ -74,6 +75,7 @@ struct cc_algo { void (*cong_signal) (struct cc_var *ccv, uint32_t type); void (*post_recovery) (struct cc_var *ccv); void (*after_idle) (struct cc_var *ccv); + int (*ctl_output)(struct cc_var *, struct sockopt *, void *); }; .Ed .Pp @@ -166,6 +168,20 @@ function is called when data transfer resumes after an idle period. It should be implemented to adjust state as required. .Pp The +.Va ctl_output +function is called when +.Xr getsockopt 2 +or +.Xr setsockopt 2 +is called on a +.Xr tcp 4 +socket with the +.Va struct sockopt +pointer forwarded unmodified from the TCP control, and a +.Va void * +pointer to algorithm specific argument. +.Pp +The .Fn DECLARE_CC_MODULE macro provides a convenient wrapper around the .Xr DECLARE_MODULE 9 |