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

Michael Tuexen tuexen at FreeBSD.org
Mon Feb 25 12:25:45 UTC 2019


Author: tuexen
Date: Mon Feb 25 12:25:44 2019
New Revision: 344514
URL: https://svnweb.freebsd.org/changeset/base/344514

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.
  
  PR:			193762
  Reviewed by:		lstewart@, rrs@
  Sponsored by:		Netflix, Inc.
  Differential Revision:	https://reviews.freebsd.org/D19071

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

Modified: stable/12/sys/netinet/cc/cc_cdg.c
==============================================================================
--- stable/12/sys/netinet/cc/cc_cdg.c	Mon Feb 25 11:59:29 2019	(r344513)
+++ stable/12/sys/netinet/cc/cc_cdg.c	Mon Feb 25 12:25:44 2019	(r344514)
@@ -592,7 +592,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-all mailing list