From 1e6b847205ba24e673152b8e67764145105b0062 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Wed, 27 May 2009 10:32:25 -0700 Subject: Fix setup of DP Virtual Queues Was refering to VQ incorrectly, they are not subclasses in GRED --- lib/Vyatta/Qos/RandomDetect.pm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/Vyatta/Qos/RandomDetect.pm') diff --git a/lib/Vyatta/Qos/RandomDetect.pm b/lib/Vyatta/Qos/RandomDetect.pm index 67bbd73..1918711 100644 --- a/lib/Vyatta/Qos/RandomDetect.pm +++ b/lib/Vyatta/Qos/RandomDetect.pm @@ -104,12 +104,12 @@ sub commands { printf "filter add dev %s parent %x:0 protocol ip prio 1 ", $dev, $root; - print " tcindex mask 0xe0 shift 5\n"; + print "tcindex mask 0xe0 shift 5\n"; # 3. Define GRED with unmatched traffic going to index 0 printf "qdisc add dev %s parent %x:0 handle %x:0 gred ", $dev, $root, $root+1; - print " setup DPs 8 default 0 grio\n"; + print "setup DPs 8 default 0 grio\n"; # set VQ parameters for ( my $i = 0 ; $i <= 7 ; $i++ ) { @@ -118,10 +118,10 @@ sub commands { my $qmax = $param->{'max-threshold'}; my $prob = $param->{'mark-probability'}; - printf "qdisc change dev %s parent %x:%x", $dev, $root+1, $i; + printf "qdisc change dev %s handle %x:0 gred", $dev, $root+1, $i; printf " limit %dK min %dK max %dK avpkt 1K", 4 * $qmax, $qmin, $qmax; printf " burst %d bandwidth %d probability %f DP %d prio %d\n", - ( 2 * $qmin + $qmax ) / 3, $rate, $prob, $i, $i; + ( 2 * $qmin + $qmax ) / 3, $rate, $prob, $i, 8-$i; } } -- cgit v1.2.3