From owner-svn-src-projects@FreeBSD.ORG Fri Jul 3 11:20:50 2009 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0A75E1065670; Fri, 3 Jul 2009 11:20:50 +0000 (UTC) (envelope-from lstewart@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E362C8FC13; Fri, 3 Jul 2009 11:20:49 +0000 (UTC) (envelope-from lstewart@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n63BKnb2076474; Fri, 3 Jul 2009 11:20:49 GMT (envelope-from lstewart@svn.freebsd.org) Received: (from lstewart@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n63BKnTD076471; Fri, 3 Jul 2009 11:20:49 GMT (envelope-from lstewart@svn.freebsd.org) Message-Id: <200907031120.n63BKnTD076471@svn.freebsd.org> From: Lawrence Stewart Date: Fri, 3 Jul 2009 11:20:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r195305 - in projects/tcp_cc_8.x/share/man: man4 man9 X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Jul 2009 11:20:50 -0000 Author: lstewart Date: Fri Jul 3 11:20:49 2009 New Revision: 195305 URL: http://svn.freebsd.org/changeset/base/195305 Log: WIP for man pages. Added: projects/tcp_cc_8.x/share/man/man4/cc_newreno.4 Modified: projects/tcp_cc_8.x/share/man/man9/cc.9 Added: projects/tcp_cc_8.x/share/man/man4/cc_newreno.4 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ projects/tcp_cc_8.x/share/man/man4/cc_newreno.4 Fri Jul 3 11:20:49 2009 (r195305) @@ -0,0 +1,62 @@ +.\" +.\" Copyright (c) 2009 Lawrence Stewart +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions, and the following disclaimer, +.\" without modification, immediately at the beginning of the file. +.\" 2. The name of the author may not be used to endorse or promote products +.\" derived from this software without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR +.\" ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd July 3, 2009 +.Dt CC_NEWRENO 4 +.Os +.Sh NAME +.Nm cc_newreno +.Nd NewReno Congestion Control Algorithm +.Sh DESCRIPTION +The +.N +congestion control algorithm +.Ss Runtime Configuration +There are currently no tunable variables. +.Sh SEE ALSO +.Xr cc 9 +.Sh HISTORY +The +.Nm +congestion control module first appeared in +.Fx 8.0 . +.Sh AUTHORS +.An -nosplit +The +.Nm +congestion control module was written by +.An James Healy Aq jimmy@deefa.com +and +.An Lawrence Stewart Aq lstewart@FreeBSD.org +while working at the Centre for Advanced Internet Architectures, +Swinburne University (http://caia.swin.edu.au/). +.Pp +This manual page was written by +.An Lawrence Stewart Aq lstewart@FreeBSD.org . +.Sh ACKNOWLEDGMENTS +Development of this software was made possible in part by a grant from the +Cisco University Research Program Fund at Community Foundation Silicon Valley. Modified: projects/tcp_cc_8.x/share/man/man9/cc.9 ============================================================================== --- projects/tcp_cc_8.x/share/man/man9/cc.9 Fri Jul 3 11:18:08 2009 (r195304) +++ projects/tcp_cc_8.x/share/man/man9/cc.9 Fri Jul 3 11:20:49 2009 (r195305) @@ -1,5 +1,5 @@ .\" -.\" Copyright (c) 2008 Lawrence Stewart +.\" Copyright (c) 2008-2009 Lawrence Stewart .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -30,15 +30,12 @@ .Os .Sh NAME .Nm cc , -.Nm cc_register_algorithm , -.Nm cc_deregister_algorithm +.Nm DECLARE_CC_MODULE .Nd Modular Congestion Control .Sh SYNOPSIS .In netinet/cc.h -.Ft int -.Fn cc_register_algorithm "struct cc_algo *add_cc" -.Ft int -.Fn cc_deregister_algorithm "struct cc_algo *remove_cc" +.In netinet/cc_module.h +.Fn DECLARE_CC_MODULE "name" "name_cc_algo" .Sh DESCRIPTION The .Nm @@ -52,9 +49,11 @@ which has the following members: .Bd -literal -offset indent struct cc_algo { char name[TCP_CA_NAME_MAX]; - int (*init) (struct tcpcb *tp); - void (*deinit) (struct tcpcb *tp); - void (*cwnd_init) (struct tcpcb *tp); + int (*mod_init) (void); + int (*mod_destroy) (void); + int (*cb_init) (struct tcpcb *tp); + void (*cb_destroy) (struct tcpcb *tp); + void (*conn_init) (struct tcpcb *tp); void (*ack_received) (struct tcpcb *tp, struct tcphdr *th); void (*pre_fr) (struct tcpcb *tp, struct tcphdr *th); void (*post_fr) (struct tcpcb *tp, struct tcphdr *th); @@ -66,6 +65,19 @@ struct cc_algo { The .Va name field identifies the unique name of the algorithm. +.Pp +The +.Va mod_init +function pointer is called by the framework when a new module is loaded into +the system. +It should be implemented if a module needs to set up some global state prior to +being available for use by new connections. +The +.Va mod_destroy +function pointer is called by the framework when an existing module is unloaded +from the system. +It should be implemented if a module needs to perform any cleanup activities +related to global state before being removed from the kernel. .Ss Runtime Configuration The following .Xr sysctl 8 @@ -85,18 +97,21 @@ list will change the system default for .El .Sh FUNCTIONS The -.Fn cc_register_algorithm +.Fn cc_register_algo function registers the algorithm pointed to by .Fa add_cc with the framework. .Sh IMPLEMENTATION NOTES .Sh RETURN VALUES The -.Fn cc_register_algorithm +.Fn cc_register_algo function returns non-zero on failure. .Sh SEE ALSO -.Xr cc_cubic 4 , -.Xr cc_htcp 4 , + +.\" Coming soon... +.\" .Xr cc_cubic 4 , +.\" .Xr cc_htcp 4 , +.Xr cc_newreno 4 , .Xr sctp 4 .Xr tcp 4 , .Sh HISTORY