summaryrefslogtreecommitdiff
path: root/lib/Vyatta/Qos/Util.pm
diff options
context:
space:
mode:
authorStephen Hemminger <stephen.hemminger@vyatta.com>2009-05-22 15:19:01 -0700
committerStephen Hemminger <stephen.hemminger@vyatta.com>2009-05-22 15:19:01 -0700
commita7ec99d913b0169b987a4ebdf2d26a36670b20bb (patch)
tree2d3163146d662a3b778a8cb67962c032a465a420 /lib/Vyatta/Qos/Util.pm
parentd226558aab489fd5d5abf7ead370d713beb80656 (diff)
downloadvyatta-cfg-qos-a7ec99d913b0169b987a4ebdf2d26a36670b20bb.tar.gz
vyatta-cfg-qos-a7ec99d913b0169b987a4ebdf2d26a36670b20bb.zip
Use better RED parameters
Use recommendations from Sally Floyd.
Diffstat (limited to 'lib/Vyatta/Qos/Util.pm')
-rw-r--r--lib/Vyatta/Qos/Util.pm5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/Vyatta/Qos/Util.pm b/lib/Vyatta/Qos/Util.pm
index afd5c78..ee1b722 100644
--- a/lib/Vyatta/Qos/Util.pm
+++ b/lib/Vyatta/Qos/Util.pm
@@ -329,13 +329,16 @@ sub ethtoolRate {
# Avpkt = Average Packet Length
# Burst = ( 2 * MinThreshold + MaxThreshold) / ( 3 * Avpkt )
# Limit = 4 * MaxThreshold
+#
+# These are based on Sally Floyd's recommendations:
+# http://www.icir.org/floyd/REDparameters.txt
sub RedParam {
my ( $bandwidth, $latency, $avgpkt ) = @_;
my $qmax = ( $bandwidth * $latency ) / 8000000;
my $qmin = $qmax / 3;
my $burst = ( 2 * $qmin + $qmax ) / ( 3 * $avgpkt );
- return ($qmin, $qmax, $burst);
+ return ($qmin, $qmax, $burst, 0.1);
}
1;