Date: Fri, 25 Sep 2020 10:23:14 +0000 (UTC) From: Richard Scheffenegger <rscheff@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r366149 - head/sys/netinet/cc Message-ID: <202009251023.08PANE0t002642@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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)); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202009251023.08PANE0t002642>