summaryrefslogtreecommitdiff
path: root/lib/Vyatta/Qos/ShaperClass.pm
diff options
context:
space:
mode:
authorStephen Hemminger <stephen.hemminger@vyatta.com>2009-05-26 16:00:40 -0700
committerStephen Hemminger <stephen.hemminger@vyatta.com>2009-05-26 16:00:40 -0700
commitd44e3e192b91fe86d399d73b1cdc5a646f767695 (patch)
tree937ae21303ad2b49d65aa7f6a0d036081bf2a718 /lib/Vyatta/Qos/ShaperClass.pm
parent3c8e18df1738999f49138ee83b243b2519cfa58f (diff)
downloadvyatta-cfg-qos-d44e3e192b91fe86d399d73b1cdc5a646f767695.tar.gz
vyatta-cfg-qos-d44e3e192b91fe86d399d73b1cdc5a646f767695.zip
One more pass over on RED parameters
Make sure and get scaling right here.
Diffstat (limited to 'lib/Vyatta/Qos/ShaperClass.pm')
-rw-r--r--lib/Vyatta/Qos/ShaperClass.pm13
1 files changed, 5 insertions, 8 deletions
diff --git a/lib/Vyatta/Qos/ShaperClass.pm b/lib/Vyatta/Qos/ShaperClass.pm
index 4e0ada1..3a25233 100644
--- a/lib/Vyatta/Qos/ShaperClass.pm
+++ b/lib/Vyatta/Qos/ShaperClass.pm
@@ -156,7 +156,7 @@ sub fifoQdisc {
#
# Bandwidth (bits/sec) * Latency (ms)
# Maximum Threshold = --------------------------------------
-# (bytes) 8 bits/byte * 1000000 us/sec
+# (bytes) 8 bits/byte * 1000 ms/sec
#
# Minimum Threshold = Maximum Threshold / 3
# Avpkt = Average Packet Length
@@ -168,12 +168,10 @@ sub fifoQdisc {
#
sub redQdisc {
my ( $self, $dev, $rate ) = @_;
- my $avg = 1000;
- my $latency = 100000;
- my $qmax = ( $rate * $latency ) / 8000000;
+ my $qmax = ( $rate * 100 ) / 8000;
my $qmin = $qmax / 3;
- my $burst = ( 2 * $qmin + $qmax ) / ( 3 * $avg );
- my $maxp = 0.1;
+ my $avg = 1024;
+ my $burst = ( 2 * $qmin + $qmax ) / (3*$avg);
my $limit = $self->{_limit};
my $qlimit;
@@ -184,8 +182,7 @@ sub redQdisc {
}
printf "red limit %d min %d max %d avpkt %d", $qlimit, $qmin, $qmax, $avg;
- printf " burst %d probability %f bandwidth %d ecn\n",
- $burst, $maxp, $rate / 1000;
+ printf " burst %d probability 0.1 bandwidth %s ecn\n", $burst, $rate;
}
my %qdiscOptions = (