From owner-svn-src-projects@FreeBSD.ORG Thu Jan 22 14:30:36 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 46062106566B; Thu, 22 Jan 2009 14:30:36 +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 30C588FC21; Thu, 22 Jan 2009 14:30:36 +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 n0MEUacm014683; Thu, 22 Jan 2009 14:30:36 GMT (envelope-from lstewart@svn.freebsd.org) Received: (from lstewart@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0MEUZM4014679; Thu, 22 Jan 2009 14:30:35 GMT (envelope-from lstewart@svn.freebsd.org) Message-Id: <200901221430.n0MEUZM4014679@svn.freebsd.org> From: Lawrence Stewart Date: Thu, 22 Jan 2009 14:30:35 +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: r187590 - projects/tcp_cc_8.x/sys/netinet 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: Thu, 22 Jan 2009 14:30:36 -0000 Author: lstewart Date: Thu Jan 22 14:30:35 2009 New Revision: 187590 URL: http://svn.freebsd.org/changeset/base/187590 Log: First pass at integrating with latest vimage changes. Add missing bracket to tcp_input.c that got mashed in the previous MFH. Modified: projects/tcp_cc_8.x/sys/netinet/cc.c projects/tcp_cc_8.x/sys/netinet/cc.h projects/tcp_cc_8.x/sys/netinet/cc_htcp.c projects/tcp_cc_8.x/sys/netinet/tcp_input.c Modified: projects/tcp_cc_8.x/sys/netinet/cc.c ============================================================================== --- projects/tcp_cc_8.x/sys/netinet/cc.c Thu Jan 22 11:27:39 2009 (r187589) +++ projects/tcp_cc_8.x/sys/netinet/cc.c Thu Jan 22 14:30:35 2009 (r187590) @@ -39,20 +39,18 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include -#include -#include #include #include #include +#include +#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include /* list of available cc algorithms on the current system */ struct cc_head cc_list = STAILQ_HEAD_INITIALIZER(cc_list); @@ -199,8 +197,8 @@ cc_deregister_algorithm(struct cc_algo * * algorithm back to newreno. If the algorithm that was in use requires * deinit code to be run, call it */ - INP_INFO_RLOCK(&tcbinfo); - LIST_FOREACH(inp, &tcb, inp_list) { + INP_INFO_RLOCK(&V_tcbinfo); + LIST_FOREACH(inp, &V_tcb, inp_list) { /* skip tcptw structs */ if (inp->inp_vflag & INP_TIMEWAIT) continue; @@ -223,7 +221,7 @@ cc_deregister_algorithm(struct cc_algo * } INP_WUNLOCK(inp); } - INP_INFO_RUNLOCK(&tcbinfo); + INP_INFO_RUNLOCK(&V_tcbinfo); } return success; @@ -305,7 +303,7 @@ newreno_cwnd_init(struct tcpcb *tp) min(tp->snd_wnd, so->so_snd.sb_hiwat))); else #endif - if (tcp_do_rfc3390) + if (V_tcp_do_rfc3390) tp->snd_cwnd = min(4 * tp->t_maxseg, max(2 * tp->t_maxseg, 4380)); #ifdef INET6 else if ((isipv6 && in6_localaddr(&inp->in6p_faddr)) || @@ -313,9 +311,9 @@ newreno_cwnd_init(struct tcpcb *tp) #else else if (in_localaddr(inp->inp_faddr)) #endif - tp->snd_cwnd = tp->t_maxseg * ss_fltsz_local; + tp->snd_cwnd = tp->t_maxseg * V_ss_fltsz_local; else - tp->snd_cwnd = tp->t_maxseg * ss_fltsz; + tp->snd_cwnd = tp->t_maxseg * V_ss_fltsz; } /* @@ -392,17 +390,17 @@ newreno_after_idle(struct tcpcb *tp) * Set the slow-start flight size depending on whether * this is a local network or not. */ - int ss = ss_fltsz; + int ss = V_ss_fltsz; #ifdef INET6 if (isipv6) { if (in6_localaddr(&tp->t_inpcb->in6p_faddr)) - ss = ss_fltsz_local; + ss = V_ss_fltsz_local; } else #endif /* INET6 */ if (in_localaddr(tp->t_inpcb->inp_faddr)) - ss = ss_fltsz_local; + ss = V_ss_fltsz_local; tp->snd_cwnd = tp->t_maxseg * ss; } Modified: projects/tcp_cc_8.x/sys/netinet/cc.h ============================================================================== --- projects/tcp_cc_8.x/sys/netinet/cc.h Thu Jan 22 11:27:39 2009 (r187589) +++ projects/tcp_cc_8.x/sys/netinet/cc.h Thu Jan 22 14:30:35 2009 (r187590) @@ -35,7 +35,12 @@ #define _NETINET_CC_H_ #include -#include +#include + +#include + +/* Forward declaration of required structs. */ +struct tcpcb; /* * Global CC vars Modified: projects/tcp_cc_8.x/sys/netinet/cc_htcp.c ============================================================================== --- projects/tcp_cc_8.x/sys/netinet/cc_htcp.c Thu Jan 22 11:27:39 2009 (r187589) +++ projects/tcp_cc_8.x/sys/netinet/cc_htcp.c Thu Jan 22 14:30:35 2009 (r187590) @@ -47,11 +47,13 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include +#include #include + +#include #include #include -#include +#include /* useful defines */ #define MODNAME "HTCP congestion control" Modified: projects/tcp_cc_8.x/sys/netinet/tcp_input.c ============================================================================== --- projects/tcp_cc_8.x/sys/netinet/tcp_input.c Thu Jan 22 11:27:39 2009 (r187589) +++ projects/tcp_cc_8.x/sys/netinet/tcp_input.c Thu Jan 22 14:30:35 2009 (r187590) @@ -62,6 +62,7 @@ __FBSDID("$FreeBSD$"); #define TCPSTATES /* for logging */ +#include #include #include #include @@ -76,7 +77,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include @@ -84,7 +84,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #ifdef TCPDEBUG #include #endif /* TCPDEBUG */ @@ -2291,6 +2290,7 @@ process_ACK: if (!IN_FASTRECOVERY(tp)) { if (CC_ALGO(tp)->ack_received) CC_ALGO(tp)->ack_received(tp, th); + } SOCKBUF_LOCK(&so->so_snd); if (acked > so->so_snd.sb_cc) { tp->snd_wnd -= so->so_snd.sb_cc;