From owner-freebsd-net Fri Aug 9 13:14:33 2002 Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8347337B400 for ; Fri, 9 Aug 2002 13:14:30 -0700 (PDT) Received: from web10407.mail.yahoo.com (web10407.mail.yahoo.com [216.136.130.99]) by mx1.FreeBSD.org (Postfix) with SMTP id 37CB543E65 for ; Fri, 9 Aug 2002 13:14:30 -0700 (PDT) (envelope-from opolyakov@yahoo.com) Message-ID: <20020809201429.56558.qmail@web10407.mail.yahoo.com> Received: from [67.112.212.200] by web10407.mail.yahoo.com via HTTP; Fri, 09 Aug 2002 13:14:29 PDT Date: Fri, 9 Aug 2002 13:14:29 -0700 (PDT) From: Oleg Polyakov Subject: Initial congestion window increase To: freebsd-net@freebsd.org MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="0-323828219-1028924069=:56365" Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org --0-323828219-1028924069=:56365 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Here is a patch allowing to increase TCP's initial congestion window up to 4 mss but less then 4380 bytes as specified in experimental RFC 2414 and draft-ietf-tsvwg-initwin-04.txt. It doesn't touch idle congestion window as per draft. Sysctl variable net.inet.tcp.increased_initial_window allows to turn on/off increased initial window. In case it turned off initial window would be defined by slowstart_flightsize. In case of local network it doesn't change anything. We could eliminate local_slowstart_flightsize for good as too optimistic when increased_initial_window'll be turned on by default. FYI NetBSD implemented RFC 2414 in 1998. The patch is applicable to CURRENT and should work on STABLE as well. ---- Oleg __________________________________________________ Do You Yahoo!? HotJobs - Search Thousands of New Jobs http://www.hotjobs.com --0-323828219-1028924069=:56365 Content-Type: text/plain; name="patch01.5a.txt" Content-Description: patch01.5a.txt Content-Disposition: inline; filename="patch01.5a.txt" --- tcp_input.c.orig Sat Apr 6 05:15:47 2002 +++ tcp_input.c Wed Aug 7 12:30:24 2002 @@ -121,6 +121,10 @@ &tcp_delack_enabled, 0, "Delay ACK to try and piggyback it onto a data packet"); +int inc_init_win = 0; +SYSCTL_INT(_net_inet_tcp, OID_AUTO, increased_initial_window, CTLFLAG_RW, + &inc_init_win, 1, "Increased initial window"); + #ifdef TCP_DROP_SYNFIN static int drop_synfin = 0; SYSCTL_INT(_net_inet_tcp, OID_AUTO, drop_synfin, CTLFLAG_RW, @@ -2492,6 +2496,7 @@ * of the interface), as we can't discover anything about intervening * gateways or networks. We also initialize the congestion/slow start * window to be a single segment if the destination isn't local. + * We may increase the congestion/slow start window in accordance with RFC2414. * While looking at the routing entry, we also initialize other path-dependent * parameters from pre-set or cached values in the routing entry. * @@ -2710,7 +2715,9 @@ #endif ) tp->snd_cwnd = mss * ss_fltsz_local; - else + else if (inc_init_win) + tp->snd_cwnd = min(4*mss, max(2*mss,4380)); + else tp->snd_cwnd = mss * ss_fltsz; if (rt->rt_rmx.rmx_ssthresh) { --0-323828219-1028924069=:56365-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message