function adjust_sqm(peername, latency) {
adjust_ts_delta = (ts - adjust_old)
+ # do not try to set bw more than once a second
+ if (adjust_ts_delta < 1.0) {
+ # print "# " ts " looping too fast, skipping SQM update adjust_ts_delta=" adjust_ts_delta
+ return
+ }
+
# Assume links are clogged, so we short-circuit a bandwidth collapse
if (consec_timeouts > ((1.5 * peer_count) + 2)) {
print "# " ts " --- TIMEOUT-caused bw collapse triggered"
return
}
- # do not try to set bw more than once a second
- if (adjust_ts_delta < 1.0) {
- # print "# " ts " looping too fast, skipping SQM update adjust_ts_delta=" adjust_ts_delta
- return
- }
# XXX TODO - this needs to get MUCH better!
# 1.) FUDGE needs to be properly accounted in BW increase path
PING_SLOTS_PER_PEER=5 # number of samples per PING_PEER to collet averages over
PING_INTERVAL=300 # interval in msec to emit ICMP ECHO towards each PING_PEER
STATS_RX='/sys/class/net/eth1/statistics/rx_bytes' # downstream bandwidth accounting file for your SQM'd interface
-IFACE_RX='eth1' # interface to apply downstream SQM to
+IFACE_RX='ifb4eth1' # interface to apply downstream SQM to
STATS_TX='/sys/class/net/eth1/statistics/tx_bytes' # upstream bandwidth accounting file for your SQM'd interface (presently not used)
IFACE_TX='eth1' # interface to apply downstream SQM to (presently not used)
BW_MIN_RX=10000 # your min. acceptable downstream bandwidth to shape to in Kbps