diff options
author | andre <andre@FreeBSD.org> | 2012-10-28 17:16:09 +0000 |
---|---|---|
committer | andre <andre@FreeBSD.org> | 2012-10-28 17:16:09 +0000 |
commit | 5589a42386ec4529bbf328ac2d0d56993c7b6d61 (patch) | |
tree | 8602c0442ae6fd81ed0da1922e05cad0e77eb54e /sys/netinet/tcp_input.c | |
parent | eba8578ed36bb1ecaf0906655ad18d73c2e06f58 (diff) | |
download | FreeBSD-src-5589a42386ec4529bbf328ac2d0d56993c7b6d61.zip FreeBSD-src-5589a42386ec4529bbf328ac2d0d56993c7b6d61.tar.gz |
Adjust the initial default CWND upon connection establishment to the
new and increased values specified by RFC5681 Section 3.1.
The even larger initial CWND per RFC3390, if enabled, is not affected.
MFC after: 2 weeks
Diffstat (limited to 'sys/netinet/tcp_input.c')
-rw-r--r-- | sys/netinet/tcp_input.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c index 1d56dfd..62819cf 100644 --- a/sys/netinet/tcp_input.c +++ b/sys/netinet/tcp_input.c @@ -351,8 +351,15 @@ cc_conn_init(struct tcpcb *tp) if (V_tcp_do_rfc3390) tp->snd_cwnd = min(4 * tp->t_maxseg, max(2 * tp->t_maxseg, 4380)); - else - tp->snd_cwnd = tp->t_maxseg; + else { + /* Per RFC5681 Section 3.1 */ + if (tp->t_maxseg > 2190) + tp->snd_cwnd = 2 * tp->t_maxseg; + else if (tp->t_maxseg > 1095) + tp->snd_cwnd = 3 * tp->t_maxseg; + else + tp->snd_cwnd = 4 * tp->t_maxseg; + } if (CC_ALGO(tp)->conn_init != NULL) CC_ALGO(tp)->conn_init(tp->ccv); |