svn commit: r195425 - projects/tcp_cc_8.x/sys/netinet
Lawrence Stewart
lstewart at FreeBSD.org
Tue Jul 7 16:10:54 UTC 2009
Author: lstewart
Date: Tue Jul 7 16:10:53 2009
New Revision: 195425
URL: http://svn.freebsd.org/changeset/base/195425
Log:
- Don't manually add newreno to the cc_list in tcp_init, as the
DECLARE_CC_MODULE macro in the new world order takes care of registering the
module for us. Add a KASSERT when initing a tcpcb to check that the list is
not empty.
- sysctl_handle_string is not required in the case where we are setting a new
default algorithm. This change fixes a panic that would occur when trying to
set the default algorithm.
Modified:
projects/tcp_cc_8.x/sys/netinet/cc.c
projects/tcp_cc_8.x/sys/netinet/tcp_subr.c
Modified: projects/tcp_cc_8.x/sys/netinet/cc.c
==============================================================================
--- projects/tcp_cc_8.x/sys/netinet/cc.c Tue Jul 7 13:58:47 2009 (r195424)
+++ projects/tcp_cc_8.x/sys/netinet/cc.c Tue Jul 7 16:10:53 2009 (r195425)
@@ -114,8 +114,6 @@ cc_default_algo(SYSCTL_HANDLER_ARGS)
if (!found)
return (ESRCH);
-
- error = sysctl_handle_string(oidp, arg1, arg2, req);
}
return (error);
@@ -160,8 +158,6 @@ cc_init()
{
CC_LIST_LOCK_INIT();
STAILQ_INIT(&cc_list);
- /* Newreno must always be available as an algorithm. */
- cc_register_algo(&newreno_cc_algo);
}
/*
Modified: projects/tcp_cc_8.x/sys/netinet/tcp_subr.c
==============================================================================
--- projects/tcp_cc_8.x/sys/netinet/tcp_subr.c Tue Jul 7 13:58:47 2009 (r195424)
+++ projects/tcp_cc_8.x/sys/netinet/tcp_subr.c Tue Jul 7 16:10:53 2009 (r195425)
@@ -734,6 +734,7 @@ tcp_newtcpcb(struct inpcb *inp)
* Use the current system default CC algorithm.
*/
CC_LIST_RLOCK();
+ KASSERT(!STAILQ_EMPTY(&cc_list), ("cc_list is empty!"));
CC_ALGO(tp) = CC_DEFAULT();
CC_LIST_RUNLOCK();
More information about the svn-src-projects
mailing list