svn commit: r362857 - stable/12/sys/netinet/cc

Michael Tuexen tuexen at FreeBSD.org
Wed Jul 1 19:50:03 UTC 2020


Author: tuexen
Date: Wed Jul  1 19:50:03 2020
New Revision: 362857
URL: https://svnweb.freebsd.org/changeset/base/362857

Log:
  MFC r354773: Improve TCP CUBIC specific after idle reaction.
  The adjustments are inspired by the Linux stack, which has had a
  functionally equivalent implementation for more than a decade now.
  
  MFC r356224: Add curly braces missed in above change
  
  Submitted by:           rscheff
  Reviewed by:            Cheng Cui
  Differential Revision:  https://reviews.freebsd.org/D18982

Modified:
  stable/12/sys/netinet/cc/cc_cubic.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/netinet/cc/cc_cubic.c
==============================================================================
--- stable/12/sys/netinet/cc/cc_cubic.c	Wed Jul  1 19:42:23 2020	(r362856)
+++ stable/12/sys/netinet/cc/cc_cubic.c	Wed Jul  1 19:50:03 2020	(r362857)
@@ -199,8 +199,11 @@ cubic_ack_received(struct cc_var *ccv, uint16_t type)
 			 * max_cwnd.
 			 */
 			if (((cubic_data->flags & CUBICFLAG_CONG_EVENT) == 0) &&
-			    cubic_data->max_cwnd < CCV(ccv, snd_cwnd))
+			    cubic_data->max_cwnd < CCV(ccv, snd_cwnd)) {
 				cubic_data->max_cwnd = CCV(ccv, snd_cwnd);
+				cubic_data->K = cubic_k(cubic_data->max_cwnd /
+				    CCV(ccv, t_maxseg));
+			}
 		}
 	} else if (type == CC_ACK && !IN_RECOVERY(CCV(ccv, t_flags)) &&
 	    !(ccv->flags & CCF_CWND_LIMITED)) {
@@ -219,6 +222,9 @@ cubic_after_idle(struct cc_var *ccv)
 	struct cubic *cubic_data;
 
 	cubic_data = ccv->cc_data;
+
+	cubic_data->max_cwnd = ulmax(cubic_data->max_cwnd, CCV(ccv, snd_cwnd));
+	cubic_data->K = cubic_k(cubic_data->max_cwnd / CCV(ccv, t_maxseg));
 
 	newreno_cc_algo.after_idle(ccv);
 	cubic_data->t_last_cong = ticks;


More information about the svn-src-all mailing list