summaryrefslogtreecommitdiffstats
path: root/sys/netinet/tcp_reass.c
diff options
context:
space:
mode:
authorhsu <hsu@FreeBSD.org>2003-03-13 01:43:45 +0000
committerhsu <hsu@FreeBSD.org>2003-03-13 01:43:45 +0000
commit896f13eb8e3acbd612c65af6592524bda6b13423 (patch)
tree82fcbefe531202f28044b8d8c168ea784fe4a6d7 /sys/netinet/tcp_reass.c
parent22308242217f3e9bc1fffc2f8a45c762d541779c (diff)
downloadFreeBSD-src-896f13eb8e3acbd612c65af6592524bda6b13423.zip
FreeBSD-src-896f13eb8e3acbd612c65af6592524bda6b13423.tar.gz
Add support for RFC 3390, which allows for a variable-sized
initial congestion window.
Diffstat (limited to 'sys/netinet/tcp_reass.c')
-rw-r--r--sys/netinet/tcp_reass.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/sys/netinet/tcp_reass.c b/sys/netinet/tcp_reass.c
index 91c90d8..c80cf8b 100644
--- a/sys/netinet/tcp_reass.c
+++ b/sys/netinet/tcp_reass.c
@@ -129,6 +129,11 @@ static int tcp_do_rfc3042 = 0;
SYSCTL_INT(_net_inet_tcp, OID_AUTO, rfc3042, CTLFLAG_RW,
&tcp_do_rfc3042, 0, "Enable RFC 3042 (Limited Transmit)");
+static int tcp_do_rfc3390 = 0;
+SYSCTL_INT(_net_inet_tcp, OID_AUTO, rfc3390, CTLFLAG_RW,
+ &tcp_do_rfc3390, 0,
+ "Enable RFC 3390 (Increasing TCP's Initial Congestion Window)");
+
struct inpcbhead tcb;
#define tcb6 tcb /* for KAME src sync over BSD*'s */
struct inpcbinfo tcbinfo;
@@ -2745,10 +2750,12 @@ tcp_mss(tp, offer)
* Set the slow-start flight size depending on whether this
* is a local network or not.
*/
- if ((isipv6 && in6_localaddr(&inp->in6p_faddr)) ||
+ if (tcp_do_rfc3390)
+ tp->snd_cwnd = min(4 * mss, max(2 * mss, 4380));
+ else if ((isipv6 && in6_localaddr(&inp->in6p_faddr)) ||
(!isipv6 && in_localaddr(inp->inp_faddr)))
tp->snd_cwnd = mss * ss_fltsz_local;
- else
+ else
tp->snd_cwnd = mss * ss_fltsz;
if (rt->rt_rmx.rmx_ssthresh) {
OpenPOWER on IntegriCloud