diff options
author | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2009-05-22 15:19:01 -0700 |
---|---|---|
committer | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2009-05-22 15:19:01 -0700 |
commit | a7ec99d913b0169b987a4ebdf2d26a36670b20bb (patch) | |
tree | 2d3163146d662a3b778a8cb67962c032a465a420 /lib/Vyatta/Qos/WeightedRandom.pm | |
parent | d226558aab489fd5d5abf7ead370d713beb80656 (diff) | |
download | vyatta-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/WeightedRandom.pm')
-rw-r--r-- | lib/Vyatta/Qos/WeightedRandom.pm | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/lib/Vyatta/Qos/WeightedRandom.pm b/lib/Vyatta/Qos/WeightedRandom.pm index 99f9b9e..0b1dc37 100644 --- a/lib/Vyatta/Qos/WeightedRandom.pm +++ b/lib/Vyatta/Qos/WeightedRandom.pm @@ -102,7 +102,7 @@ sub commands { # fill in id of default $default->{id} = ++$maxid; - unshift @$classes, $default; + push @$classes, $default; print "qdisc add dev $dev handle 1: root gred"; printf " setup DPs %d default %d\n", $maxid+1, $maxid; @@ -112,15 +112,16 @@ sub commands { my $avg = $class->{_avgpkt}; my $latency = getTime( $class->{_latency} ); - my ( $qmin, $qmax, $burst ) = RedParam( $classbw, $latency, $avg ); + my ( $qmin, $qmax, $burst, $maxp ) + = RedParam( $classbw, $latency, $avg ); print "qdisc change dev $dev root gred"; - printf " limit %d min %d max %d avpkt %d", - 4 * $qmax, $qmin, $qmax, $avg; + printf " prio %d", $class->{_priority} if $class->{_priority}; + printf " limit %d min %d max %d avpkt %d probability %f", + 4 * $qmax, $qmin, $qmax, $avg, $maxp; printf " burst %d bandwidth %d DP %d", $burst, $rate, $class->{id}; - printf " prio %d", $class->{_priority} if $class->{_priority}; - print " probability 0.02\n"; + print " probability 0.1\n"; foreach my $match ( $class->matchRules() ) { $match->filter( $dev, 1, $class->{_priority} ); |