Date: Fri, 9 Aug 2002 13:14:29 -0700 (PDT) From: Oleg Polyakov <opolyakov@yahoo.com> To: freebsd-net@freebsd.org Subject: Initial congestion window increase Message-ID: <20020809201429.56558.qmail@web10407.mail.yahoo.com>
next in thread | raw e-mail | index | archive | help
[-- Attachment #1 --]
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
[-- Attachment #2 --]
--- 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) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020809201429.56558.qmail>
