]> johannes.truschnigg.info Git - sqm_lagthrottle/commitdiff
Make bw collapse to lowest step in low-latency mode
authorJohannes Truschnigg <johannes@truschnigg.info>
Sat, 19 Mar 2022 19:41:18 +0000 (20:41 +0100)
committerJohannes Truschnigg <johannes@truschnigg.info>
Sat, 19 Mar 2022 19:41:18 +0000 (20:41 +0100)
__lagdetect.awk

index 2ab8ebfcfb8b046d1e8cf147aa42f4caf8873ca5..1f64406be94c29f9d1fcd568f1e194500541cb8e 100644 (file)
@@ -245,6 +245,11 @@ function adjust_sqm(peername, latency) {
   thresh_fudged = (FUDGE + (ping_avgs[peername] * THRESHOLD))
   if (last2avg > thresh_fudged) {
     if (latency > ping_prev[peername] && latency > ping_pprev[peername]) {
+      if (prefer_high_bw == 0) {
+          bw_step_rx_next = 0
+          print "--- " ts " low-latency mode enforces step " bw_step_rx_next " := " STEPS_RX[bw_step_rx_next] "Kbps rx=" rx_rate " tx=" tx_rate
+         return
+      }
       if (rx_rate < (rx_rate_max * 0.1)) { # XXX TODO is this correct?
         print "# " ts " line does not appear to be loaded, skipping futile SQM bw downgrade"
       } else {