svn commit: r366149 - head/sys/netinet/cc
Richard Scheffenegger
rscheff at FreeBSD.org
Fri Sep 25 10:23:15 UTC 2020
Author: rscheff
Date: Fri Sep 25 10:23:14 2020
New Revision: 366149
URL: https://svnweb.freebsd.org/changeset/base/366149
Log:
TCP newreno: improve after_idle ssthresh
Adjust ssthresh in after_idle to the maximum of
the prior ssthresh, or 3/4 of the prior cwnd. See
RFC2861 section 2 for an in depth explanation for
the rationale around this.
As newreno is the default "fall-through" reaction,
most tcp variants will benefit from this.
Reviewed by: tuexen
MFC after: 2 weeks
Sponsored by: NetApp, Inc.
Differential Revision: https://reviews.freebsd.org/D22438
Modified:
head/sys/netinet/cc/cc_newreno.c
Modified: head/sys/netinet/cc/cc_newreno.c
==============================================================================
--- head/sys/netinet/cc/cc_newreno.c Fri Sep 25 10:20:12 2020 (r366148)
+++ head/sys/netinet/cc/cc_newreno.c Fri Sep 25 10:23:14 2020 (r366149)
@@ -213,8 +213,15 @@ newreno_after_idle(struct cc_var *ccv)
* wirespeed, overloading router and switch buffers along the way.
*
* See RFC5681 Section 4.1. "Restarting Idle Connections".
+ *
+ * In addition, per RFC2861 Section 2, the ssthresh is set to the
+ * maximum of the former ssthresh or 3/4 of the old cwnd, to
+ * not exit slow-start prematurely.
*/
rw = tcp_compute_initwnd(tcp_maxseg(ccv->ccvc.tcp));
+
+ CCV(ccv, snd_ssthresh) = max(CCV(ccv, snd_ssthresh),
+ CCV(ccv, snd_cwnd)-(CCV(ccv, snd_cwnd)>>2));
CCV(ccv, snd_cwnd) = min(rw, CCV(ccv, snd_cwnd));
}
More information about the svn-src-all
mailing list