svn commit: r364354 - head/sys/netinet/cc

Richard Scheffenegger rscheff at FreeBSD.org
Tue Aug 18 19:34:32 UTC 2020


Author: rscheff
Date: Tue Aug 18 19:34:31 2020
New Revision: 364354
URL: https://svnweb.freebsd.org/changeset/base/364354

Log:
  TCP Cubic: recalculate cwnd for every ACK.
  
  Since cubic calculates cwnd based on absolute
  time, retaining RFC3465 (ABC) once-per-window updates
  can lead to dramatic changes of cwnd in the convex
  region. Updating cwnd for each incoming ack minimizes
  this delta, preventing unintentional line-rate bursts.
  
  Reviewed by:	chengc_netapp.com, tuexen (mentor)
  MFC after:	2 weeks
  Sponsored by:	NetApp, Inc.
  Differential Revision:	https://reviews.freebsd.org/D26060

Modified:
  head/sys/netinet/cc/cc_cubic.c

Modified: head/sys/netinet/cc/cc_cubic.c
==============================================================================
--- head/sys/netinet/cc/cc_cubic.c	Tue Aug 18 19:25:03 2020	(r364353)
+++ head/sys/netinet/cc/cc_cubic.c	Tue Aug 18 19:34:31 2020	(r364354)
@@ -131,16 +131,11 @@ cubic_ack_received(struct cc_var *ccv, uint16_t type)
 	cubic_record_rtt(ccv);
 
 	/*
-	 * Regular ACK and we're not in cong/fast recovery and we're cwnd
-	 * limited and we're either not doing ABC or are just coming out
-	 * from slow-start or were application limited or are slow starting
-	 * or are doing ABC and we've sent a cwnd's worth of bytes.
+	 * For a regular ACK and we're not in cong/fast recovery and
+	 * we're cwnd limited, always recalculate cwnd.
 	 */
 	if (type == CC_ACK && !IN_RECOVERY(CCV(ccv, t_flags)) &&
-	    (ccv->flags & CCF_CWND_LIMITED) && (!V_tcp_do_rfc3465 ||
-	    (cubic_data->flags & (CUBICFLAG_IN_SLOWSTART | CUBICFLAG_IN_APPLIMIT)) ||
-	    CCV(ccv, snd_cwnd) <= CCV(ccv, snd_ssthresh) ||
-	    (V_tcp_do_rfc3465 && (ccv->flags & CCF_ABC_SENTAWND)))) {
+	    (ccv->flags & CCF_CWND_LIMITED)) {
 		 /* Use the logic in NewReno ack_received() for slow start. */
 		if (CCV(ccv, snd_cwnd) <= CCV(ccv, snd_ssthresh) ||
 		    cubic_data->min_rtt_ticks == TCPTV_SRTTBASE) {
@@ -193,15 +188,8 @@ cubic_ack_received(struct cc_var *ccv, uint16_t type)
 				 * cwnd growth.
 				 * Only update snd_cwnd, if it doesn't shrink.
 				 */
-				if (V_tcp_do_rfc3465)
-					CCV(ccv, snd_cwnd) = ulmin(w_cubic_next,
-					    INT_MAX);
-				else
-					CCV(ccv, snd_cwnd) += ulmax(1,
-					    ((ulmin(w_cubic_next, INT_MAX) -
-					    CCV(ccv, snd_cwnd)) *
-					    CCV(ccv, t_maxseg)) /
-					    CCV(ccv, snd_cwnd));
+				CCV(ccv, snd_cwnd) = ulmin(w_cubic_next,
+				    INT_MAX);
 			}
 
 			/*


More information about the svn-src-all mailing list