From 1a9399fe3e2dc25fadff10dd8c72485337dedb51 Mon Sep 17 00:00:00 2001 From: Carl Byington Date: Thu, 18 Dec 2014 09:07:32 -0800 Subject: add fq-codel parameters (#446) Signed-off-by: kouak --- lib/Vyatta/Qos/FairQueueCodel.pm | 4 ++-- lib/Vyatta/Qos/ShaperClass.pm | 13 ++++++++++++- 2 files changed, 14 insertions(+), 3 deletions(-) (limited to 'lib') 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"; } -- cgit v1.2.3