Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 26 Feb 2013 10:24:49 +0000 (UTC)
From:      Adrian Chadd <adrian@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r247317 - head/sys/dev/ath/ath_rate/sample
Message-ID:  <201302261024.r1QAOnUO067217@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: adrian
Date: Tue Feb 26 10:24:49 2013
New Revision: 247317
URL: http://svnweb.freebsd.org/changeset/base/247317

Log:
  Update the EWMA statistics for each intermediary rate as well as the final
  rate.
  
  This fixes two things:
  
  * The intermediary rates now also have their EWMA values changed;
  * The existing code was using the wrong value for longtries - so the
    EWMA stats were only adjusted for the first rate and not subsequent
    rates in a MRR setup.
  
  TODO:
  
  * Merge the EWMA updates into update_stats() now..

Modified:
  head/sys/dev/ath/ath_rate/sample/sample.c

Modified: head/sys/dev/ath/ath_rate/sample/sample.c
==============================================================================
--- head/sys/dev/ath/ath_rate/sample/sample.c	Tue Feb 26 08:53:33 2013	(r247316)
+++ head/sys/dev/ath/ath_rate/sample/sample.c	Tue Feb 26 10:24:49 2013	(r247317)
@@ -1008,6 +1008,15 @@ ath_rate_tx_complete(struct ath_softc *s
 				     short_tries, long_tries,
 				     long_tries > rc[0].tries,
 				     nframes, nbad);
+			update_ewma_stats(sc, an, frame_size,
+				     rc[0].rix, rc[0].tries,
+				     rc[1].rix, rc[1].tries,
+				     rc[2].rix, rc[2].tries,
+				     rc[3].rix, rc[3].tries,
+				     short_tries, long_tries,
+				     long_tries > rc[0].tries,
+				     nframes, nbad);
+
 			long_tries -= rc[0].tries;
 		}
 		
@@ -1020,6 +1029,14 @@ ath_rate_tx_complete(struct ath_softc *s
 				     short_tries, long_tries,
 				     status,
 				     nframes, nbad);
+			update_ewma_stats(sc, an, frame_size,
+				     rc[1].rix, rc[1].tries,
+				     rc[2].rix, rc[2].tries,
+				     rc[3].rix, rc[3].tries,
+				     0, 0,
+				     short_tries, long_tries,
+				     status,
+				     nframes, nbad);
 			long_tries -= rc[1].tries;
 		}
 
@@ -1032,6 +1049,14 @@ ath_rate_tx_complete(struct ath_softc *s
 				     short_tries, long_tries,
 				     status,
 				     nframes, nbad);
+			update_ewma_stats(sc, an, frame_size,
+				     rc[2].rix, rc[2].tries,
+				     rc[3].rix, rc[3].tries,
+				     0, 0,
+				     0, 0,
+				     short_tries, long_tries,
+				     status,
+				     nframes, nbad);
 			long_tries -= rc[2].tries;
 		}
 
@@ -1044,17 +1069,15 @@ ath_rate_tx_complete(struct ath_softc *s
 				     short_tries, long_tries,
 				     status,
 				     nframes, nbad);
+			update_ewma_stats(sc, an, frame_size,
+				     rc[3].rix, rc[3].tries,
+				     0, 0,
+				     0, 0,
+				     0, 0,
+				     short_tries, long_tries,
+				     status,
+				     nframes, nbad);
 		}
-
-		update_ewma_stats(sc, an, frame_size,
-			     rc[0].rix, rc[0].tries,
-			     rc[1].rix, rc[1].tries,
-			     rc[2].rix, rc[2].tries,
-			     rc[3].rix, rc[3].tries,
-			     short_tries, long_tries,
-			     long_tries > rc[0].tries,
-			     nframes, nbad);
-
 	}
 }
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201302261024.r1QAOnUO067217>