svn commit: r184153 - in projects/tcp_cc_7.x/sys: . netinet
Lawrence Stewart
lstewart at FreeBSD.org
Wed Oct 22 07:21:02 UTC 2008
Author: lstewart
Date: Wed Oct 22 07:21:02 2008
New Revision: 184153
URL: http://svn.freebsd.org/changeset/base/184153
Log:
Merge r184152 from tcp_cc_8.x
Modified:
projects/tcp_cc_7.x/sys/ (props changed)
projects/tcp_cc_7.x/sys/netinet/cc.c
projects/tcp_cc_7.x/sys/netinet/tcp_input.c
Modified: projects/tcp_cc_7.x/sys/netinet/cc.c
==============================================================================
--- projects/tcp_cc_7.x/sys/netinet/cc.c Wed Oct 22 07:06:38 2008 (r184152)
+++ projects/tcp_cc_7.x/sys/netinet/cc.c Wed Oct 22 07:21:02 2008 (r184153)
@@ -333,8 +333,15 @@ newreno_ack_received(struct tcpcb *tp, s
u_int cw = tp->snd_cwnd;
u_int incr = tp->t_maxseg;
+ /*
+ * If cwnd <= ssthresh, open exponentially (maxseg per packet).
+ * Otherwise, open linearly (approx. maxseg per RTT
+ * i.e. maxseg^2 / cwnd per ACK received).
+ * If cwnd > maxseg^2, fix the cwnd increment at 1 byte
+ * to avoid capping cwnd (as suggested in RFC2581).
+ */
if (cw > tp->snd_ssthresh)
- incr = incr * incr / cw;
+ incr = max((incr * incr / cw), 1);
tp->snd_cwnd = min(cw+incr, TCP_MAXWIN<<tp->snd_scale);
}
Modified: projects/tcp_cc_7.x/sys/netinet/tcp_input.c
==============================================================================
--- projects/tcp_cc_7.x/sys/netinet/tcp_input.c Wed Oct 22 07:06:38 2008 (r184152)
+++ projects/tcp_cc_7.x/sys/netinet/tcp_input.c Wed Oct 22 07:21:02 2008 (r184153)
@@ -2002,12 +2002,8 @@ process_ACK:
/*
* When new data is acked, open the congestion window.
- * If the window gives us less than ssthresh packets
- * in flight, open exponentially (maxseg per packet).
- * Otherwise open linearly: maxseg per window
- * (maxseg^2 / cwnd per packet).
- * If cwnd > maxseg^2, fix the cwnd increment at 1 byte
- * to avoid capping cwnd (as suggested in RFC2581).
+ * The specifics of how this is achieved are up to the
+ * congestion control algorithm in use for this connection.
*/
if (!IN_FASTRECOVERY(tp)) {
if (CC_ALGO(tp)->ack_received)
More information about the svn-src-projects
mailing list