summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2012-03-10 12:03:30 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2012-03-10 12:03:30 +0000
commit42d255c62aedb127e67556470e3fc3608807f8e5 (patch)
treee09272879c7f60be37e37b556312449341a0f766
parentc0b5ce92fb63be3a448ca6388300fe719f268b3a (diff)
Increase TCP's initial window to 10 * MSS or 14600 bytes as proposed in
draft-ietf-tcpm-initcwnd. net.inet.tcp.rfc3390 defaults to 2 now which uses the 10*MSS, setting it back to 1 brings back the old default of 4*MSS. OK sperreault@, henning@, sthen@, markus@
-rw-r--r--sys/netinet/tcp_input.c5
-rw-r--r--sys/netinet/tcp_subr.c4
2 files changed, 6 insertions, 3 deletions
diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c
index f68750f85cc..fd0ac5c9c86 100644
--- a/sys/netinet/tcp_input.c
+++ b/sys/netinet/tcp_input.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tcp_input.c,v 1.251 2011/10/15 18:56:52 haesbaert Exp $ */
+/* $OpenBSD: tcp_input.c,v 1.252 2012/03/10 12:03:29 claudio Exp $ */
/* $NetBSD: tcp_input.c,v 1.23 1996/02/13 23:43:44 christos Exp $ */
/*
@@ -3160,6 +3160,9 @@ tcp_mss(struct tcpcb *tp, int offer)
tp->snd_cwnd = ulmax((tp->snd_cwnd / tp->t_maxseg) *
mss, mss);
}
+ } else if (tcp_do_rfc3390 == 2) {
+ /* increase initial window */
+ tp->snd_cwnd = ulmin(10 * mss, ulmax(2 * mss, 14600));
} else if (tcp_do_rfc3390) {
/* increase initial window */
tp->snd_cwnd = ulmin(4 * mss, ulmax(2 * mss, 4380));
diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c
index 2f10358d2f2..26726f6d798 100644
--- a/sys/netinet/tcp_subr.c
+++ b/sys/netinet/tcp_subr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tcp_subr.c,v 1.112 2011/01/11 15:42:05 deraadt Exp $ */
+/* $OpenBSD: tcp_subr.c,v 1.113 2012/03/10 12:03:29 claudio Exp $ */
/* $NetBSD: tcp_subr.c,v 1.22 1996/02/13 23:44:00 christos Exp $ */
/*
@@ -115,7 +115,7 @@ int tcp_ack_on_push = 0; /* set to enable immediate ACK-on-PUSH */
#ifdef TCP_ECN
int tcp_do_ecn = 0; /* RFC3168 ECN enabled/disabled? */
#endif
-int tcp_do_rfc3390 = 1; /* RFC3390 Increasing TCP's Initial Window */
+int tcp_do_rfc3390 = 2; /* Increase TCP's Initial Window to 10*mss */
u_int32_t tcp_now = 1;