svn commit: r344512 - stable/11/sys/netinet/cc

Michael Tuexen tuexen at FreeBSD.org
Mon Feb 25 10:51:22 UTC 2019


Author: tuexen
Date: Mon Feb 25 10:51:21 2019
New Revision: 344512
URL: https://svnweb.freebsd.org/changeset/base/344512

Log:
  MFC r343920:
  
  Ensure that when using the TCP CDG congestion control and setting the
  sysctl variable net.inet.tcp.cc.cdg.smoothing_factor to 0, the smoothing
  is disabled. Without this patch, a division by zero orrurs.
  
  Reviewed by:		lstewart@, rrs@
  Sponsored by:		Netflix, Inc.
  Differential Revision:	https://reviews.freebsd.org/D19071

Modified:
  stable/11/sys/netinet/cc/cc_cdg.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/netinet/cc/cc_cdg.c
==============================================================================
--- stable/11/sys/netinet/cc/cc_cdg.c	Mon Feb 25 10:38:37 2019	(r344511)
+++ stable/11/sys/netinet/cc/cc_cdg.c	Mon Feb 25 10:51:21 2019	(r344512)
@@ -590,7 +590,11 @@ cdg_ack_received(struct cc_var *ccv, uint16_t ack_type
 			qdiff_min = ((long)(cdg_data->minrtt_in_rtt -
 			    cdg_data->minrtt_in_prevrtt) << D_P_E );
 
-			calc_moving_average(cdg_data, qdiff_max, qdiff_min);
+			if (cdg_data->sample_q_size == 0) {
+				cdg_data->max_qtrend = qdiff_max;
+				cdg_data->min_qtrend = qdiff_min;
+			} else
+				calc_moving_average(cdg_data, qdiff_max, qdiff_min);
 
 			/* Probabilistic backoff with respect to gradient. */
 			if (slowstart && qdiff_min > 0)


More information about the svn-src-stable mailing list