summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorStephen Hemminger <stephen.hemminger@vyatta.com>2009-05-19 16:07:42 -0700
committerStephen Hemminger <stephen.hemminger@vyatta.com>2009-05-19 16:07:42 -0700
commita621b1970b76f7d7585261ba6255b1fa63dc520c (patch)
tree1ac0315daee5a4b95ba5953956385c046348147e /lib
parente1ae2edb9fe3cfd41535bb6f0bd2132e2b23ad47 (diff)
downloadvyatta-cfg-qos-a621b1970b76f7d7585261ba6255b1fa63dc520c.tar.gz
vyatta-cfg-qos-a621b1970b76f7d7585261ba6255b1fa63dc520c.zip
Rename weighted-random
Having too long a name messes up column output on operational commands.
Diffstat (limited to 'lib')
-rw-r--r--lib/Vyatta/Qos/WeightedRandom.pm7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/Vyatta/Qos/WeightedRandom.pm b/lib/Vyatta/Qos/WeightedRandom.pm
index 9397299..6e30839 100644
--- a/lib/Vyatta/Qos/WeightedRandom.pm
+++ b/lib/Vyatta/Qos/WeightedRandom.pm
@@ -23,13 +23,14 @@ require Vyatta::Config;
require Vyatta::Qos::ShaperClass;
use Vyatta::Qos::Util qw/getRate getAutoRate/;
-my $wred = 'weighted-random-detect';
+my $wred = 'weighted-random';
# Create a new instance based on config information
sub new {
my ( $that, $config, $name ) = @_;
my $level = $config->setLevel();
my $rate = $config->returnValue("bandwidth");
+ die "$level bandwidth configuration missing" unless $rate;
my @classes = _getClasses($level);
@@ -111,8 +112,8 @@ sub commands {
my ( $qmin, $qmax, $burst ) = RedParam( $classbw, $latency, $avg );
- print "qdisc chang dev $dev root gred ";
- printf "limit %d min %d max %d avpkt %d", 4 * $qmax, $qmin, $qmax, $avg;
+ print "qdisc chang dev $dev root gred";
+ printf " limit %d min %d max %d avpkt %d", 4 * $qmax, $qmin, $qmax, $avg;
printf " burst %d probability 0.02 bandwidth %d ecn\n",
$burst, $classbw / 1000;