summaryrefslogtreecommitdiff
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
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>
-rw-r--r--lib/Vyatta/Qos/FairQueueCodel.pm4
-rw-r--r--lib/Vyatta/Qos/ShaperClass.pm13
-rw-r--r--templates/traffic-policy/fq-codel/node.tag/codel-quantum/node.def2
-rw-r--r--templates/traffic-policy/fq-codel/node.tag/flows/node.def2
-rw-r--r--templates/traffic-policy/fq-codel/node.tag/interval/node.def2
-rw-r--r--templates/traffic-policy/fq-codel/node.tag/quantum/node.def2
-rw-r--r--templates/traffic-policy/fq-codel/node.tag/target/node.def2
-rw-r--r--templates/traffic-policy/priority-queue/node.tag/class/node.tag/codel-quantum/node.def2
-rw-r--r--templates/traffic-policy/priority-queue/node.tag/class/node.tag/flows/node.def2
-rw-r--r--templates/traffic-policy/priority-queue/node.tag/class/node.tag/interval/node.def2
-rw-r--r--templates/traffic-policy/priority-queue/node.tag/class/node.tag/target/node.def3
-rw-r--r--templates/traffic-policy/priority-queue/node.tag/default/codel-quantum/node.def2
-rw-r--r--templates/traffic-policy/priority-queue/node.tag/default/flows/node.def2
-rw-r--r--templates/traffic-policy/priority-queue/node.tag/default/interval/node.def2
-rw-r--r--templates/traffic-policy/priority-queue/node.tag/default/target/node.def3
-rw-r--r--templates/traffic-policy/round-robin/node.tag/class/node.tag/codel-quantum/node.def2
-rw-r--r--templates/traffic-policy/round-robin/node.tag/class/node.tag/flows/node.def2
-rw-r--r--templates/traffic-policy/round-robin/node.tag/class/node.tag/interval/node.def2
-rw-r--r--templates/traffic-policy/round-robin/node.tag/class/node.tag/target/node.def3
-rw-r--r--templates/traffic-policy/round-robin/node.tag/default/codel-quantum/node.def2
-rw-r--r--templates/traffic-policy/round-robin/node.tag/default/flows/node.def2
-rw-r--r--templates/traffic-policy/round-robin/node.tag/default/interval/node.def2
-rw-r--r--templates/traffic-policy/round-robin/node.tag/default/target/node.def3
-rw-r--r--templates/traffic-policy/shaper/node.tag/class/node.tag/codel-quantum/node.def2
-rw-r--r--templates/traffic-policy/shaper/node.tag/class/node.tag/flows/node.def2
-rw-r--r--templates/traffic-policy/shaper/node.tag/class/node.tag/interval/node.def2
-rw-r--r--templates/traffic-policy/shaper/node.tag/class/node.tag/target/node.def3
-rw-r--r--templates/traffic-policy/shaper/node.tag/default/codel-quantum/node.def2
-rw-r--r--templates/traffic-policy/shaper/node.tag/default/flows/node.def2
-rw-r--r--templates/traffic-policy/shaper/node.tag/default/interval/node.def2
-rw-r--r--templates/traffic-policy/shaper/node.tag/default/target/node.def3
31 files changed, 73 insertions, 8 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";
}
diff --git a/templates/traffic-policy/fq-codel/node.tag/codel-quantum/node.def b/templates/traffic-policy/fq-codel/node.tag/codel-quantum/node.def
new file mode 100644
index 0000000..cb1efe3
--- /dev/null
+++ b/templates/traffic-policy/fq-codel/node.tag/codel-quantum/node.def
@@ -0,0 +1,2 @@
+type: u32
+help: fq-codel - Number of bytes used as 'deficit' (default 1514)
diff --git a/templates/traffic-policy/fq-codel/node.tag/flows/node.def b/templates/traffic-policy/fq-codel/node.tag/flows/node.def
index 3d0e485..aff7f29 100644
--- a/templates/traffic-policy/fq-codel/node.tag/flows/node.def
+++ b/templates/traffic-policy/fq-codel/node.tag/flows/node.def
@@ -1,2 +1,2 @@
type: u32
-help: Number of flows (default 1024)
+help: fq-codel - Number of flows (default 1024)
diff --git a/templates/traffic-policy/fq-codel/node.tag/interval/node.def b/templates/traffic-policy/fq-codel/node.tag/interval/node.def
index 857bd62..a7d28b1 100644
--- a/templates/traffic-policy/fq-codel/node.tag/interval/node.def
+++ b/templates/traffic-policy/fq-codel/node.tag/interval/node.def
@@ -1,2 +1,2 @@
type: u32
-help: Interval (milliseconds) used to measure the delay (default 100)
+help: fq-codel - Interval (milliseconds) used to measure the delay (default 100)
diff --git a/templates/traffic-policy/fq-codel/node.tag/quantum/node.def b/templates/traffic-policy/fq-codel/node.tag/quantum/node.def
deleted file mode 100644
index 49edde3..0000000
--- a/templates/traffic-policy/fq-codel/node.tag/quantum/node.def
+++ /dev/null
@@ -1,2 +0,0 @@
-type: u32
-help: Number of bytes used as 'deficit' (default 1514)
diff --git a/templates/traffic-policy/fq-codel/node.tag/target/node.def b/templates/traffic-policy/fq-codel/node.tag/target/node.def
index d678f11..d9b4196 100644
--- a/templates/traffic-policy/fq-codel/node.tag/target/node.def
+++ b/templates/traffic-policy/fq-codel/node.tag/target/node.def
@@ -1,3 +1,3 @@
type: u32
-help: Acceptable minimum queue delay (milliseconds)
+help: fq-codel - Acceptable minimum queue delay (milliseconds)
diff --git a/templates/traffic-policy/priority-queue/node.tag/class/node.tag/codel-quantum/node.def b/templates/traffic-policy/priority-queue/node.tag/class/node.tag/codel-quantum/node.def
new file mode 100644
index 0000000..cb1efe3
--- /dev/null
+++ b/templates/traffic-policy/priority-queue/node.tag/class/node.tag/codel-quantum/node.def
@@ -0,0 +1,2 @@
+type: u32
+help: fq-codel - Number of bytes used as 'deficit' (default 1514)
diff --git a/templates/traffic-policy/priority-queue/node.tag/class/node.tag/flows/node.def b/templates/traffic-policy/priority-queue/node.tag/class/node.tag/flows/node.def
new file mode 100644
index 0000000..aff7f29
--- /dev/null
+++ b/templates/traffic-policy/priority-queue/node.tag/class/node.tag/flows/node.def
@@ -0,0 +1,2 @@
+type: u32
+help: fq-codel - Number of flows (default 1024)
diff --git a/templates/traffic-policy/priority-queue/node.tag/class/node.tag/interval/node.def b/templates/traffic-policy/priority-queue/node.tag/class/node.tag/interval/node.def
new file mode 100644
index 0000000..a7d28b1
--- /dev/null
+++ b/templates/traffic-policy/priority-queue/node.tag/class/node.tag/interval/node.def
@@ -0,0 +1,2 @@
+type: u32
+help: fq-codel - Interval (milliseconds) used to measure the delay (default 100)
diff --git a/templates/traffic-policy/priority-queue/node.tag/class/node.tag/target/node.def b/templates/traffic-policy/priority-queue/node.tag/class/node.tag/target/node.def
new file mode 100644
index 0000000..d9b4196
--- /dev/null
+++ b/templates/traffic-policy/priority-queue/node.tag/class/node.tag/target/node.def
@@ -0,0 +1,3 @@
+type: u32
+help: fq-codel - Acceptable minimum queue delay (milliseconds)
+
diff --git a/templates/traffic-policy/priority-queue/node.tag/default/codel-quantum/node.def b/templates/traffic-policy/priority-queue/node.tag/default/codel-quantum/node.def
new file mode 100644
index 0000000..cb1efe3
--- /dev/null
+++ b/templates/traffic-policy/priority-queue/node.tag/default/codel-quantum/node.def
@@ -0,0 +1,2 @@
+type: u32
+help: fq-codel - Number of bytes used as 'deficit' (default 1514)
diff --git a/templates/traffic-policy/priority-queue/node.tag/default/flows/node.def b/templates/traffic-policy/priority-queue/node.tag/default/flows/node.def
new file mode 100644
index 0000000..aff7f29
--- /dev/null
+++ b/templates/traffic-policy/priority-queue/node.tag/default/flows/node.def
@@ -0,0 +1,2 @@
+type: u32
+help: fq-codel - Number of flows (default 1024)
diff --git a/templates/traffic-policy/priority-queue/node.tag/default/interval/node.def b/templates/traffic-policy/priority-queue/node.tag/default/interval/node.def
new file mode 100644
index 0000000..a7d28b1
--- /dev/null
+++ b/templates/traffic-policy/priority-queue/node.tag/default/interval/node.def
@@ -0,0 +1,2 @@
+type: u32
+help: fq-codel - Interval (milliseconds) used to measure the delay (default 100)
diff --git a/templates/traffic-policy/priority-queue/node.tag/default/target/node.def b/templates/traffic-policy/priority-queue/node.tag/default/target/node.def
new file mode 100644
index 0000000..d9b4196
--- /dev/null
+++ b/templates/traffic-policy/priority-queue/node.tag/default/target/node.def
@@ -0,0 +1,3 @@
+type: u32
+help: fq-codel - Acceptable minimum queue delay (milliseconds)
+
diff --git a/templates/traffic-policy/round-robin/node.tag/class/node.tag/codel-quantum/node.def b/templates/traffic-policy/round-robin/node.tag/class/node.tag/codel-quantum/node.def
new file mode 100644
index 0000000..cb1efe3
--- /dev/null
+++ b/templates/traffic-policy/round-robin/node.tag/class/node.tag/codel-quantum/node.def
@@ -0,0 +1,2 @@
+type: u32
+help: fq-codel - Number of bytes used as 'deficit' (default 1514)
diff --git a/templates/traffic-policy/round-robin/node.tag/class/node.tag/flows/node.def b/templates/traffic-policy/round-robin/node.tag/class/node.tag/flows/node.def
new file mode 100644
index 0000000..aff7f29
--- /dev/null
+++ b/templates/traffic-policy/round-robin/node.tag/class/node.tag/flows/node.def
@@ -0,0 +1,2 @@
+type: u32
+help: fq-codel - Number of flows (default 1024)
diff --git a/templates/traffic-policy/round-robin/node.tag/class/node.tag/interval/node.def b/templates/traffic-policy/round-robin/node.tag/class/node.tag/interval/node.def
new file mode 100644
index 0000000..a7d28b1
--- /dev/null
+++ b/templates/traffic-policy/round-robin/node.tag/class/node.tag/interval/node.def
@@ -0,0 +1,2 @@
+type: u32
+help: fq-codel - Interval (milliseconds) used to measure the delay (default 100)
diff --git a/templates/traffic-policy/round-robin/node.tag/class/node.tag/target/node.def b/templates/traffic-policy/round-robin/node.tag/class/node.tag/target/node.def
new file mode 100644
index 0000000..d9b4196
--- /dev/null
+++ b/templates/traffic-policy/round-robin/node.tag/class/node.tag/target/node.def
@@ -0,0 +1,3 @@
+type: u32
+help: fq-codel - Acceptable minimum queue delay (milliseconds)
+
diff --git a/templates/traffic-policy/round-robin/node.tag/default/codel-quantum/node.def b/templates/traffic-policy/round-robin/node.tag/default/codel-quantum/node.def
new file mode 100644
index 0000000..cb1efe3
--- /dev/null
+++ b/templates/traffic-policy/round-robin/node.tag/default/codel-quantum/node.def
@@ -0,0 +1,2 @@
+type: u32
+help: fq-codel - Number of bytes used as 'deficit' (default 1514)
diff --git a/templates/traffic-policy/round-robin/node.tag/default/flows/node.def b/templates/traffic-policy/round-robin/node.tag/default/flows/node.def
new file mode 100644
index 0000000..aff7f29
--- /dev/null
+++ b/templates/traffic-policy/round-robin/node.tag/default/flows/node.def
@@ -0,0 +1,2 @@
+type: u32
+help: fq-codel - Number of flows (default 1024)
diff --git a/templates/traffic-policy/round-robin/node.tag/default/interval/node.def b/templates/traffic-policy/round-robin/node.tag/default/interval/node.def
new file mode 100644
index 0000000..a7d28b1
--- /dev/null
+++ b/templates/traffic-policy/round-robin/node.tag/default/interval/node.def
@@ -0,0 +1,2 @@
+type: u32
+help: fq-codel - Interval (milliseconds) used to measure the delay (default 100)
diff --git a/templates/traffic-policy/round-robin/node.tag/default/target/node.def b/templates/traffic-policy/round-robin/node.tag/default/target/node.def
new file mode 100644
index 0000000..d9b4196
--- /dev/null
+++ b/templates/traffic-policy/round-robin/node.tag/default/target/node.def
@@ -0,0 +1,3 @@
+type: u32
+help: fq-codel - Acceptable minimum queue delay (milliseconds)
+
diff --git a/templates/traffic-policy/shaper/node.tag/class/node.tag/codel-quantum/node.def b/templates/traffic-policy/shaper/node.tag/class/node.tag/codel-quantum/node.def
new file mode 100644
index 0000000..cb1efe3
--- /dev/null
+++ b/templates/traffic-policy/shaper/node.tag/class/node.tag/codel-quantum/node.def
@@ -0,0 +1,2 @@
+type: u32
+help: fq-codel - Number of bytes used as 'deficit' (default 1514)
diff --git a/templates/traffic-policy/shaper/node.tag/class/node.tag/flows/node.def b/templates/traffic-policy/shaper/node.tag/class/node.tag/flows/node.def
new file mode 100644
index 0000000..aff7f29
--- /dev/null
+++ b/templates/traffic-policy/shaper/node.tag/class/node.tag/flows/node.def
@@ -0,0 +1,2 @@
+type: u32
+help: fq-codel - Number of flows (default 1024)
diff --git a/templates/traffic-policy/shaper/node.tag/class/node.tag/interval/node.def b/templates/traffic-policy/shaper/node.tag/class/node.tag/interval/node.def
new file mode 100644
index 0000000..a7d28b1
--- /dev/null
+++ b/templates/traffic-policy/shaper/node.tag/class/node.tag/interval/node.def
@@ -0,0 +1,2 @@
+type: u32
+help: fq-codel - Interval (milliseconds) used to measure the delay (default 100)
diff --git a/templates/traffic-policy/shaper/node.tag/class/node.tag/target/node.def b/templates/traffic-policy/shaper/node.tag/class/node.tag/target/node.def
new file mode 100644
index 0000000..d9b4196
--- /dev/null
+++ b/templates/traffic-policy/shaper/node.tag/class/node.tag/target/node.def
@@ -0,0 +1,3 @@
+type: u32
+help: fq-codel - Acceptable minimum queue delay (milliseconds)
+
diff --git a/templates/traffic-policy/shaper/node.tag/default/codel-quantum/node.def b/templates/traffic-policy/shaper/node.tag/default/codel-quantum/node.def
new file mode 100644
index 0000000..cb1efe3
--- /dev/null
+++ b/templates/traffic-policy/shaper/node.tag/default/codel-quantum/node.def
@@ -0,0 +1,2 @@
+type: u32
+help: fq-codel - Number of bytes used as 'deficit' (default 1514)
diff --git a/templates/traffic-policy/shaper/node.tag/default/flows/node.def b/templates/traffic-policy/shaper/node.tag/default/flows/node.def
new file mode 100644
index 0000000..aff7f29
--- /dev/null
+++ b/templates/traffic-policy/shaper/node.tag/default/flows/node.def
@@ -0,0 +1,2 @@
+type: u32
+help: fq-codel - Number of flows (default 1024)
diff --git a/templates/traffic-policy/shaper/node.tag/default/interval/node.def b/templates/traffic-policy/shaper/node.tag/default/interval/node.def
new file mode 100644
index 0000000..a7d28b1
--- /dev/null
+++ b/templates/traffic-policy/shaper/node.tag/default/interval/node.def
@@ -0,0 +1,2 @@
+type: u32
+help: fq-codel - Interval (milliseconds) used to measure the delay (default 100)
diff --git a/templates/traffic-policy/shaper/node.tag/default/target/node.def b/templates/traffic-policy/shaper/node.tag/default/target/node.def
new file mode 100644
index 0000000..d9b4196
--- /dev/null
+++ b/templates/traffic-policy/shaper/node.tag/default/target/node.def
@@ -0,0 +1,3 @@
+type: u32
+help: fq-codel - Acceptable minimum queue delay (milliseconds)
+