svn commit: r232341 - user/andre/tcp_workqueue/sys/netinet
Andre Oppermann
andre at FreeBSD.org
Thu Mar 1 15:08:58 UTC 2012
Author: andre
Date: Thu Mar 1 15:08:58 2012
New Revision: 232341
URL: http://svn.freebsd.org/changeset/base/232341
Log:
Adjust the default initial CWND upon connection establishment to the
new and larger values specified by RFC5681 Section 3.1.
The larger initial CWND per RFC3390, if enabled, is not affected.
Modified:
user/andre/tcp_workqueue/sys/netinet/tcp_input.c
Modified: user/andre/tcp_workqueue/sys/netinet/tcp_input.c
==============================================================================
--- user/andre/tcp_workqueue/sys/netinet/tcp_input.c Thu Mar 1 14:42:06 2012 (r232340)
+++ user/andre/tcp_workqueue/sys/netinet/tcp_input.c Thu Mar 1 15:08:58 2012 (r232341)
@@ -347,8 +347,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;
+ 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);
More information about the svn-src-user
mailing list