From 3c68c870041d5e4e2be560db5ba9e5be08450df8 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Fri, 13 Jul 2012 13:53:51 -0700 Subject: Add support for priority-queue policy Bug 3643 Enhancement to expose kernel priority queuing. --- Makefile.am | 1 + lib/Vyatta/Qos/Priority.pm | 118 +++++++++++++++++++++ lib/Vyatta/Qos/ShaperClass.pm | 5 +- lib/Vyatta/Qos/TrafficShaper.pm | 4 +- templates/traffic-policy/priority-queue/node.def | 8 ++ .../priority-queue/node.tag/class/node.def | 6 ++ .../node.tag/class/node.tag/description/node.def | 2 + .../node.tag/class/node.tag/match/node.def | 4 + .../node.tag/match/node.tag/description/node.def | 2 + .../match/node.tag/ether/destination/node.def | 2 + .../class/node.tag/match/node.tag/ether/node.def | 1 + .../match/node.tag/ether/protocol/node.def | 15 +++ .../node.tag/match/node.tag/ether/source/node.def | 2 + .../node.tag/match/node.tag/interface/node.def | 7 ++ .../match/node.tag/ip/destination/address/node.def | 2 + .../match/node.tag/ip/destination/node.def | 1 + .../match/node.tag/ip/destination/port/node.def | 5 + .../class/node.tag/match/node.tag/ip/dscp/node.def | 18 ++++ .../class/node.tag/match/node.tag/ip/node.def | 2 + .../node.tag/match/node.tag/ip/protocol/node.def | 16 +++ .../match/node.tag/ip/source/address/node.def | 2 + .../node.tag/match/node.tag/ip/source/node.def | 1 + .../match/node.tag/ip/source/port/node.def | 6 ++ .../node.tag/ipv6/destination/address/node.def | 2 + .../match/node.tag/ipv6/destination/node.def | 1 + .../match/node.tag/ipv6/destination/port/node.def | 5 + .../node.tag/match/node.tag/ipv6/dscp/node.def | 18 ++++ .../class/node.tag/match/node.tag/ipv6/node.def | 1 + .../node.tag/match/node.tag/ipv6/protocol/node.def | 16 +++ .../match/node.tag/ipv6/source/address/node.def | 2 + .../node.tag/match/node.tag/ipv6/source/node.def | 1 + .../match/node.tag/ipv6/source/port/node.def | 6 ++ .../class/node.tag/match/node.tag/mark/node.def | 2 + .../class/node.tag/match/node.tag/vif/node.def | 5 + .../node.tag/class/node.tag/priority/node.def | 5 + .../node.tag/class/node.tag/queue-limit/node.def | 4 + .../node.tag/class/node.tag/queue-type/node.def | 11 ++ .../priority-queue/node.tag/default/node.def | 1 + .../node.tag/default/priority/node.def | 5 + .../node.tag/default/queue-limit/node.def | 4 + .../node.tag/default/queue-type/node.def | 8 ++ .../priority-queue/node.tag/description/node.def | 2 + 42 files changed, 327 insertions(+), 2 deletions(-) create mode 100644 lib/Vyatta/Qos/Priority.pm create mode 100644 templates/traffic-policy/priority-queue/node.def create mode 100644 templates/traffic-policy/priority-queue/node.tag/class/node.def create mode 100644 templates/traffic-policy/priority-queue/node.tag/class/node.tag/description/node.def create mode 100644 templates/traffic-policy/priority-queue/node.tag/class/node.tag/match/node.def create mode 100644 templates/traffic-policy/priority-queue/node.tag/class/node.tag/match/node.tag/description/node.def create mode 100644 templates/traffic-policy/priority-queue/node.tag/class/node.tag/match/node.tag/ether/destination/node.def create mode 100644 templates/traffic-policy/priority-queue/node.tag/class/node.tag/match/node.tag/ether/node.def create mode 100644 templates/traffic-policy/priority-queue/node.tag/class/node.tag/match/node.tag/ether/protocol/node.def create mode 100644 templates/traffic-policy/priority-queue/node.tag/class/node.tag/match/node.tag/ether/source/node.def create mode 100644 templates/traffic-policy/priority-queue/node.tag/class/node.tag/match/node.tag/interface/node.def create mode 100644 templates/traffic-policy/priority-queue/node.tag/class/node.tag/match/node.tag/ip/destination/address/node.def create mode 100644 templates/traffic-policy/priority-queue/node.tag/class/node.tag/match/node.tag/ip/destination/node.def create mode 100644 templates/traffic-policy/priority-queue/node.tag/class/node.tag/match/node.tag/ip/destination/port/node.def create mode 100644 templates/traffic-policy/priority-queue/node.tag/class/node.tag/match/node.tag/ip/dscp/node.def create mode 100644 templates/traffic-policy/priority-queue/node.tag/class/node.tag/match/node.tag/ip/node.def create mode 100644 templates/traffic-policy/priority-queue/node.tag/class/node.tag/match/node.tag/ip/protocol/node.def create mode 100644 templates/traffic-policy/priority-queue/node.tag/class/node.tag/match/node.tag/ip/source/address/node.def create mode 100644 templates/traffic-policy/priority-queue/node.tag/class/node.tag/match/node.tag/ip/source/node.def create mode 100644 templates/traffic-policy/priority-queue/node.tag/class/node.tag/match/node.tag/ip/source/port/node.def create mode 100644 templates/traffic-policy/priority-queue/node.tag/class/node.tag/match/node.tag/ipv6/destination/address/node.def create mode 100644 templates/traffic-policy/priority-queue/node.tag/class/node.tag/match/node.tag/ipv6/destination/node.def create mode 100644 templates/traffic-policy/priority-queue/node.tag/class/node.tag/match/node.tag/ipv6/destination/port/node.def create mode 100644 templates/traffic-policy/priority-queue/node.tag/class/node.tag/match/node.tag/ipv6/dscp/node.def create mode 100644 templates/traffic-policy/priority-queue/node.tag/class/node.tag/match/node.tag/ipv6/node.def create mode 100644 templates/traffic-policy/priority-queue/node.tag/class/node.tag/match/node.tag/ipv6/protocol/node.def create mode 100644 templates/traffic-policy/priority-queue/node.tag/class/node.tag/match/node.tag/ipv6/source/address/node.def create mode 100644 templates/traffic-policy/priority-queue/node.tag/class/node.tag/match/node.tag/ipv6/source/node.def create mode 100644 templates/traffic-policy/priority-queue/node.tag/class/node.tag/match/node.tag/ipv6/source/port/node.def create mode 100644 templates/traffic-policy/priority-queue/node.tag/class/node.tag/match/node.tag/mark/node.def create mode 100644 templates/traffic-policy/priority-queue/node.tag/class/node.tag/match/node.tag/vif/node.def create mode 100644 templates/traffic-policy/priority-queue/node.tag/class/node.tag/priority/node.def create mode 100644 templates/traffic-policy/priority-queue/node.tag/class/node.tag/queue-limit/node.def create mode 100644 templates/traffic-policy/priority-queue/node.tag/class/node.tag/queue-type/node.def create mode 100644 templates/traffic-policy/priority-queue/node.tag/default/node.def create mode 100644 templates/traffic-policy/priority-queue/node.tag/default/priority/node.def create mode 100644 templates/traffic-policy/priority-queue/node.tag/default/queue-limit/node.def create mode 100644 templates/traffic-policy/priority-queue/node.tag/default/queue-type/node.def create mode 100644 templates/traffic-policy/priority-queue/node.tag/description/node.def diff --git a/Makefile.am b/Makefile.am index fb904c6..0d15ff1 100644 --- a/Makefile.am +++ b/Makefile.am @@ -18,6 +18,7 @@ share_perl5_DATA += lib/Vyatta/Qos/RoundRobin.pm share_perl5_DATA += lib/Vyatta/Qos/NetworkEmulator.pm share_perl5_DATA += lib/Vyatta/Qos/RandomDetect.pm share_perl5_DATA += lib/Vyatta/Qos/TrafficLimiter.pm +share_perl5_DATA += lib/Vyatta/Qos/Priority.pm etcdir = /etc etc_SCRIPTS = diff --git a/lib/Vyatta/Qos/Priority.pm b/lib/Vyatta/Qos/Priority.pm new file mode 100644 index 0000000..b148b1c --- /dev/null +++ b/lib/Vyatta/Qos/Priority.pm @@ -0,0 +1,118 @@ +# Priority Queue +# +# **** License **** +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License version 2 as +# published by the Free Software Foundation. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# This code was originally developed by Vyatta, Inc. +# Portions created by Vyatta are Copyright (C) 2008 Vyatta, Inc. +# All Rights Reserved. +# **** End License **** + +package Vyatta::Qos::Priority; +use strict; +use warnings; + +require Vyatta::Config; +require Vyatta::Qos::ShaperClass; +use POSIX; + +# Kernel limits on quantum (bytes) +use constant { + MAXQUANTUM => 200000, + MINQUANTUM => 1000, +}; + + +# Create a new instance based on config information +sub new { + my ( $that, $config, $name ) = @_; + my $level = $config->setLevel(); + my @classes = _getClasses($level); + + my $self = {}; + my $class = ref($that) || $that; + bless $self, $class; + + $self->{_level} = $level; + $self->{_classes} = \@classes; + return $self; +} + +sub _getClasses { + my $level = shift; + my @classes; + my $config = new Vyatta::Config; + + $config->setLevel($level); + $config->exists("default") + or die "$level configuration not complete: missing default class\n"; + + $config->setLevel("$level default"); + push @classes, new Vyatta::Qos::ShaperClass($config); + $config->setLevel($level); + + foreach my $id ( $config->listNodes("class") ) { + $config->setLevel("$level class $id"); + push @classes, new Vyatta::Qos::ShaperClass( $config, $id ); + } + + return @classes; +} + +# Note: priority does not have internal classes, only sub-qdisc's +# +# Although Linux supports mapping TOS and priority to bands, this +# is not used here. Instead we apply filters to traffic and statically +# assign bands. +sub commands { + my ( $self, $dev ) = @_; + my $classes = $self->{_classes}; + my $default = shift @$classes; + my $maxid = 1; + my $bands = 2; + + foreach my $class (@$classes) { + my $level = "$self->{_level} class $class->{id}"; + $class->valid_leaf( $level ); + + # find largest class id + $maxid = $class->{id} + if ( defined $class->{id} && $class->{id} > $maxid ); + + # find largest priority + my $prio = $class->{_priority}; + + $bands = $prio + 1 + if ( defined $prio && $prio >= $bands); + } + + # fill in id of default + $default->{id} = ++$maxid; + unshift @$classes, $default; + + my $parent = 1; + my $root = "root"; + + # Since we use filters to set priority + printf "qdisc add dev %s %s handle %x: prio bands %d\n", + $dev, $root, $parent, $bands; + + # prio is not really classful! + foreach my $class (@$classes) { + $class->gen_leaf( $dev, $parent ); + + my $prio = 1; + foreach my $match ( $class->matchRules() ) { + $match->filter( $dev, $parent, $class->{id}, $prio++ ); + } + } +} + +1; diff --git a/lib/Vyatta/Qos/ShaperClass.pm b/lib/Vyatta/Qos/ShaperClass.pm index 4afd90c..1cb7fbe 100644 --- a/lib/Vyatta/Qos/ShaperClass.pm +++ b/lib/Vyatta/Qos/ShaperClass.pm @@ -234,6 +234,10 @@ sub rateCheck { $rate / 1000; exit 1; } +} + +sub valid_leaf { + my ($self, $level, $rate) = @_; my $qtype = $self->{_qdisc}; my $q = $qdiscValidate{$qtype}; @@ -268,7 +272,6 @@ sub gen_class { print " quantum $quantum" if ($quantum); print " burst $self->{_burst}" if ( $self->{_burst} ); print " prio $self->{_priority}" if ( $self->{_priority} ); - print "\n"; } diff --git a/lib/Vyatta/Qos/TrafficShaper.pm b/lib/Vyatta/Qos/TrafficShaper.pm index 3fd687a..5e365c5 100644 --- a/lib/Vyatta/Qos/TrafficShaper.pm +++ b/lib/Vyatta/Qos/TrafficShaper.pm @@ -144,7 +144,9 @@ sub commands { $default->rateCheck( $rate, "$self->{_level} default" ); foreach my $class (@$classes) { - $class->rateCheck( $rate, "$self->{_level} class $class->{id}" ); + my $level = "$self->{_level} class $class->{id}"; + $class->rateCheck( $rate, $level ); + $class->valid_leaf( $level ); # find largest class id if ( defined $class->{id} && $class->{id} > $maxid ) { diff --git a/templates/traffic-policy/priority-queue/node.def b/templates/traffic-policy/priority-queue/node.def new file mode 100644 index 0000000..b848108 --- /dev/null +++ b/templates/traffic-policy/priority-queue/node.def @@ -0,0 +1,8 @@ +tag: +type: txt +help: Priority queuing based policy +syntax:expression: pattern $VAR(@) "^[[:alnum:]][-_[:alnum:]]*$" + ; "only alpha-numeric policy name allowed" +create: /opt/vyatta/sbin/vyatta-qos.pl --create-policy $VAR(.) $VAR(@) +delete: /opt/vyatta/sbin/vyatta-qos.pl --delete-policy $VAR(@) +end: /opt/vyatta/sbin/vyatta-qos.pl --apply-policy $VAR(@) diff --git a/templates/traffic-policy/priority-queue/node.tag/class/node.def b/templates/traffic-policy/priority-queue/node.tag/class/node.def new file mode 100644 index 0000000..1e9ae0b --- /dev/null +++ b/templates/traffic-policy/priority-queue/node.tag/class/node.def @@ -0,0 +1,6 @@ +tag: +type: u32 +help: Class handle +syntax:expression: $VAR(@) >= 1 && $VAR(@) <= 4095; \ + "Class identifier must be between 1 and 4095" +val_help: u32:1-4095; Class identifier diff --git a/templates/traffic-policy/priority-queue/node.tag/class/node.tag/description/node.def b/templates/traffic-policy/priority-queue/node.tag/class/node.tag/description/node.def new file mode 100644 index 0000000..9a24868 --- /dev/null +++ b/templates/traffic-policy/priority-queue/node.tag/class/node.tag/description/node.def @@ -0,0 +1,2 @@ +type: txt +help: Description for this traffic class diff --git a/templates/traffic-policy/priority-queue/node.tag/class/node.tag/match/node.def b/templates/traffic-policy/priority-queue/node.tag/class/node.tag/match/node.def new file mode 100644 index 0000000..cde128f --- /dev/null +++ b/templates/traffic-policy/priority-queue/node.tag/class/node.tag/match/node.def @@ -0,0 +1,4 @@ +tag: +type: txt +syntax:expression: pattern $VAR(@) "^[^-]" ; "Match queue name cannot start with \"-\"" +help: Class matching rule name diff --git a/templates/traffic-policy/priority-queue/node.tag/class/node.tag/match/node.tag/description/node.def b/templates/traffic-policy/priority-queue/node.tag/class/node.tag/match/node.tag/description/node.def new file mode 100644 index 0000000..903f260 --- /dev/null +++ b/templates/traffic-policy/priority-queue/node.tag/class/node.tag/match/node.tag/description/node.def @@ -0,0 +1,2 @@ +type: txt +help: Description for this match diff --git a/templates/traffic-policy/priority-queue/node.tag/class/node.tag/match/node.tag/ether/destination/node.def b/templates/traffic-policy/priority-queue/node.tag/class/node.tag/match/node.tag/ether/destination/node.def new file mode 100644 index 0000000..92fb9a9 --- /dev/null +++ b/templates/traffic-policy/priority-queue/node.tag/class/node.tag/match/node.tag/ether/destination/node.def @@ -0,0 +1,2 @@ +type: macaddr +help: Ethernet destination address for this match diff --git a/templates/traffic-policy/priority-queue/node.tag/class/node.tag/match/node.tag/ether/node.def b/templates/traffic-policy/priority-queue/node.tag/class/node.tag/match/node.tag/ether/node.def new file mode 100644 index 0000000..454c1ed --- /dev/null +++ b/templates/traffic-policy/priority-queue/node.tag/class/node.tag/match/node.tag/ether/node.def @@ -0,0 +1 @@ +help: Ethernet header match diff --git a/templates/traffic-policy/priority-queue/node.tag/class/node.tag/match/node.tag/ether/protocol/node.def b/templates/traffic-policy/priority-queue/node.tag/class/node.tag/match/node.tag/ether/protocol/node.def new file mode 100644 index 0000000..9da50a6 --- /dev/null +++ b/templates/traffic-policy/priority-queue/node.tag/class/node.tag/match/node.tag/ether/protocol/node.def @@ -0,0 +1,15 @@ +type: txt +help: Ethernet protocol for this match +allowed: echo \ + all 802.1Q 802_2 802_3 aarp aoe arp atalk \ + dec ip ipv6 ipx lat localtalk rarp snap x25 + +val_help: u32:0-65535; Ethernet protocol number +val_help: txt; Ethernet protocol name +val_help: all; Any protocol +val_help: ip; Internet IP (IPv4) +val_help: _ipv6; Internet IP (IPv6) +val_help: arp; Address Resolution Protocol +val_help: atalk; Appletalk +val_help: ipx; Novell Internet Packet Exchange +val_help: 802.1Q; 802.1Q VLAN tag diff --git a/templates/traffic-policy/priority-queue/node.tag/class/node.tag/match/node.tag/ether/source/node.def b/templates/traffic-policy/priority-queue/node.tag/class/node.tag/match/node.tag/ether/source/node.def new file mode 100644 index 0000000..3094167 --- /dev/null +++ b/templates/traffic-policy/priority-queue/node.tag/class/node.tag/match/node.tag/ether/source/node.def @@ -0,0 +1,2 @@ +type: macaddr +help: Ethernet source address for this match diff --git a/templates/traffic-policy/priority-queue/node.tag/class/node.tag/match/node.tag/interface/node.def b/templates/traffic-policy/priority-queue/node.tag/class/node.tag/match/node.tag/interface/node.def new file mode 100644 index 0000000..f12c59c --- /dev/null +++ b/templates/traffic-policy/priority-queue/node.tag/class/node.tag/match/node.tag/interface/node.def @@ -0,0 +1,7 @@ +type: txt +help: Interface name for this match +syntax:expression: exec "[ -f /sys/class/net/$VAR(@)/ifindex ]" ; "Interface must already exist" +allowed: local -a array + array=( /sys/class/net/* ) + echo -n ${array[@]##*/} + diff --git a/templates/traffic-policy/priority-queue/node.tag/class/node.tag/match/node.tag/ip/destination/address/node.def b/templates/traffic-policy/priority-queue/node.tag/class/node.tag/match/node.tag/ip/destination/address/node.def new file mode 100644 index 0000000..8d02285 --- /dev/null +++ b/templates/traffic-policy/priority-queue/node.tag/class/node.tag/match/node.tag/ip/destination/address/node.def @@ -0,0 +1,2 @@ +type: ipv4net +help: IP destination address for this match diff --git a/templates/traffic-policy/priority-queue/node.tag/class/node.tag/match/node.tag/ip/destination/node.def b/templates/traffic-policy/priority-queue/node.tag/class/node.tag/match/node.tag/ip/destination/node.def new file mode 100644 index 0000000..54eef5b --- /dev/null +++ b/templates/traffic-policy/priority-queue/node.tag/class/node.tag/match/node.tag/ip/destination/node.def @@ -0,0 +1 @@ +help: Match on destination port or address diff --git a/templates/traffic-policy/priority-queue/node.tag/class/node.tag/match/node.tag/ip/destination/port/node.def b/templates/traffic-policy/priority-queue/node.tag/class/node.tag/match/node.tag/ip/destination/port/node.def new file mode 100644 index 0000000..fc85c5f --- /dev/null +++ b/templates/traffic-policy/priority-queue/node.tag/class/node.tag/match/node.tag/ip/destination/port/node.def @@ -0,0 +1,5 @@ +type: txt +help: TCP (or UDP) destination port for this match + +val_help: u32:1-65535; Numeric IP port +val_help: txt; Assigned TCP (or UDP) port name diff --git a/templates/traffic-policy/priority-queue/node.tag/class/node.tag/match/node.tag/ip/dscp/node.def b/templates/traffic-policy/priority-queue/node.tag/class/node.tag/match/node.tag/ip/dscp/node.def new file mode 100644 index 0000000..224b002 --- /dev/null +++ b/templates/traffic-policy/priority-queue/node.tag/class/node.tag/match/node.tag/ip/dscp/node.def @@ -0,0 +1,18 @@ +type: txt +help: Match on Differentiated Services Codepoint (DSCP) +syntax:expression: exec "/opt/vyatta/sbin/vyatta-qos-util.pl --dscp $VAR(@)" +allowed: awk ' + /^#/ { next } + { printf "%s ", $2 }' = 0 && $VAR(@) <= 4095; \ + "VLAN ID must be between 0 and 4095" +val_help: u32:0-4095; Virtual Local Area Network (VLAN) tag diff --git a/templates/traffic-policy/priority-queue/node.tag/class/node.tag/priority/node.def b/templates/traffic-policy/priority-queue/node.tag/class/node.tag/priority/node.def new file mode 100644 index 0000000..6cacb22 --- /dev/null +++ b/templates/traffic-policy/priority-queue/node.tag/class/node.tag/priority/node.def @@ -0,0 +1,5 @@ +type: u32 +help: Priority for usage of excess bandwidth +syntax:expression: $VAR(@) >= 0 && $VAR(@) <= 7 ;\ + "priority must be between 0 than 7" +val_help: u32:0-7; Priority order for bandwidth pool diff --git a/templates/traffic-policy/priority-queue/node.tag/class/node.tag/queue-limit/node.def b/templates/traffic-policy/priority-queue/node.tag/class/node.tag/queue-limit/node.def new file mode 100644 index 0000000..bf011c2 --- /dev/null +++ b/templates/traffic-policy/priority-queue/node.tag/class/node.tag/queue-limit/node.def @@ -0,0 +1,4 @@ +type: u32 +help: Maximum queue size (packets) +syntax:expression: $VAR(@) > 0 ; "queue limit must be greater than zero" +val_help: u32:1-4294967295; Queue size in packets diff --git a/templates/traffic-policy/priority-queue/node.tag/class/node.tag/queue-type/node.def b/templates/traffic-policy/priority-queue/node.tag/class/node.tag/queue-type/node.def new file mode 100644 index 0000000..6b44648 --- /dev/null +++ b/templates/traffic-policy/priority-queue/node.tag/class/node.tag/queue-type/node.def @@ -0,0 +1,11 @@ +type: txt +default: "fair-queue" +syntax:expression: $VAR(@) in "fair-queue", "priority", "drop-tail", "random-detect";\ + "Unknown queue-type" +help: Queue type for this class + +val_help: fair-queue; Stochastic Fair Queue (SFQ) +val_help: drop-tail; First-In-First-Out (FIFO) +val_help: priority; Priority queueing based on DSCP +val_help: random-detect; Random Early Detection (RED) + diff --git a/templates/traffic-policy/priority-queue/node.tag/default/node.def b/templates/traffic-policy/priority-queue/node.tag/default/node.def new file mode 100644 index 0000000..142cba3 --- /dev/null +++ b/templates/traffic-policy/priority-queue/node.tag/default/node.def @@ -0,0 +1 @@ +help: Default policy diff --git a/templates/traffic-policy/priority-queue/node.tag/default/priority/node.def b/templates/traffic-policy/priority-queue/node.tag/default/priority/node.def new file mode 100644 index 0000000..c46ee3e --- /dev/null +++ b/templates/traffic-policy/priority-queue/node.tag/default/priority/node.def @@ -0,0 +1,5 @@ +type: u32 +help: Priority for this queue +syntax:expression: $VAR(@) >= 0 && $VAR(@) <= 7 ;\ + "priority must be between 0 than 7" +val_help: u32:0-7; Priority diff --git a/templates/traffic-policy/priority-queue/node.tag/default/queue-limit/node.def b/templates/traffic-policy/priority-queue/node.tag/default/queue-limit/node.def new file mode 100644 index 0000000..7b07913 --- /dev/null +++ b/templates/traffic-policy/priority-queue/node.tag/default/queue-limit/node.def @@ -0,0 +1,4 @@ +type: u32 +help: Maximum queue size (packets) +syntax:expression: $VAR(@) > 0; "Queue limit must be greater than zero" +val_help: u32:1-4294967295; Queue size in packets diff --git a/templates/traffic-policy/priority-queue/node.tag/default/queue-type/node.def b/templates/traffic-policy/priority-queue/node.tag/default/queue-type/node.def new file mode 100644 index 0000000..e4283ab --- /dev/null +++ b/templates/traffic-policy/priority-queue/node.tag/default/queue-type/node.def @@ -0,0 +1,8 @@ +type: txt +default: "fair-queue" +syntax:expression: $VAR(@) in "fair-queue", "priority", "drop-tail", "random-detect";\ + "Unknown queue-type" +help: Queue type for default traffic +val_help: fair-queue; Stochastic Fair Queue (SFQ) +val_help: drop-tail; First-In-First-Out (FIFO) +val_help: random-detect; Random Early Detection (RED) diff --git a/templates/traffic-policy/priority-queue/node.tag/description/node.def b/templates/traffic-policy/priority-queue/node.tag/description/node.def new file mode 100644 index 0000000..1da9e34 --- /dev/null +++ b/templates/traffic-policy/priority-queue/node.tag/description/node.def @@ -0,0 +1,2 @@ +type: txt +help: Description for this queuing policy -- cgit v1.2.3