summaryrefslogtreecommitdiff
path: root/lib/Vyatta
diff options
context:
space:
mode:
authorCarl Byington <carl@five-ten-sg.com>2014-12-18 09:07:32 -0800
committerkouak <kouak@kouak.org>2015-03-26 19:31:31 +0100
commit1a9399fe3e2dc25fadff10dd8c72485337dedb51 (patch)
tree671c5a5849f35618e5a3dddbf3cf6187180e69ae /lib/Vyatta
parentb0d2fde832dcef9fb1018ce66eed7533c32be43a (diff)
downloadvyatta-cfg-qos-1a9399fe3e2dc25fadff10dd8c72485337dedb51.tar.gz
vyatta-cfg-qos-1a9399fe3e2dc25fadff10dd8c72485337dedb51.zip
add fq-codel parameters (#446)
Signed-off-by: kouak <kouak@kouak.org>
Diffstat (limited to 'lib/Vyatta')
-rw-r--r--lib/Vyatta/Qos/FairQueueCodel.pm4
-rw-r--r--lib/Vyatta/Qos/ShaperClass.pm13
2 files changed, 14 insertions, 3 deletions
diff --git a/lib/Vyatta/Qos/FairQueueCodel.pm b/lib/Vyatta/Qos/FairQueueCodel.pm
index 980cbeb..79c1f79 100644
--- a/lib/Vyatta/Qos/FairQueueCodel.pm
+++ b/lib/Vyatta/Qos/FairQueueCodel.pm
@@ -43,7 +43,7 @@ sub new {
$self->{_flows} = $config->returnValue('flows');
$self->{_target} = $config->returnValue('target');
$self->{_interval} = $config->returnValue('interval');
- $self->{_quantum} = $config->returnValue('quantum');
+ $self->{_cquantum} = $config->returnValue('codel-quantum');
return bless $self, $class;
}
@@ -55,7 +55,7 @@ sub commands {
print " flows $self->{_flows}" if ( $self->{_flows} );
print " target $self->{_target}" if ( $self->{_target} );
print " interval $self->{_interval}" if ( $self->{_interval} );
- print " quantum $self->{_quantum}" if ( $self->{_quantum} );
+ print " quantum $self->{_cquantum}" if ( $self->{_cquantum} );
print " noecn\n";
}
diff --git a/lib/Vyatta/Qos/ShaperClass.pm b/lib/Vyatta/Qos/ShaperClass.pm
index a7d9b22..b4689b4 100644
--- a/lib/Vyatta/Qos/ShaperClass.pm
+++ b/lib/Vyatta/Qos/ShaperClass.pm
@@ -52,6 +52,13 @@ sub new {
$self->{_avgpkt} = $config->returnValue("packet-length");
$self->{_latency} = $config->returnValue("latency");
$self->{_quantum} = $config->returnValue("quantum");
+ $self->{_flows} = $config->returnValue('flows');
+ $self->{_target} = $config->returnValue('target');
+ $self->{_interval} = $config->returnValue('interval');
+ $self->{_cquantum} = $config->returnValue('codel-quantum');
+
+ if ( $self->{_target} ) { $self->{_target} *= 1000; }
+ if ( $self->{_interval} ) { $self->{_interval} *= 1000; }
$self->{dsmark} = getDsfield( $config->returnValue("set-dscp") );
my @matches = _getMatch("$level match");
@@ -126,7 +133,11 @@ sub codelQdisc {
my ( $self, $dev, $rate ) = @_;
print "fq_codel";
- print " limit $self->{_limit}" if ( $self->{_limit} );
+ print " limit $self->{_limit}" if ( $self->{_limit} );
+ print " flows $self->{_flows}" if ( $self->{_flows} );
+ print " target $self->{_target}" if ( $self->{_target} );
+ print " interval $self->{_interval}" if ( $self->{_interval} );
+ print " quantum $self->{_cquantum}" if ( $self->{_cquantum} );
print " noecn\n";
}