From 374cd8d8445b23dfc73dceacc0ee9e9212940521 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Tue, 8 Apr 2008 13:18:14 -0500 Subject: allow qos over vlan Test version --- .../interfaces/ethernet/node.tag/vif/node.tag/qos-policy/node.def | 1 + .../ethernet/node.tag/vif/node.tag/qos-policy/out/node.def | 6 ++++++ 2 files changed, 7 insertions(+) create mode 100644 templates/interfaces/ethernet/node.tag/vif/node.tag/qos-policy/node.def create mode 100644 templates/interfaces/ethernet/node.tag/vif/node.tag/qos-policy/out/node.def diff --git a/templates/interfaces/ethernet/node.tag/vif/node.tag/qos-policy/node.def b/templates/interfaces/ethernet/node.tag/vif/node.tag/qos-policy/node.def new file mode 100644 index 0000000..2c0cf7a --- /dev/null +++ b/templates/interfaces/ethernet/node.tag/vif/node.tag/qos-policy/node.def @@ -0,0 +1 @@ +help: Configure qos-policy diff --git a/templates/interfaces/ethernet/node.tag/vif/node.tag/qos-policy/out/node.def b/templates/interfaces/ethernet/node.tag/vif/node.tag/qos-policy/out/node.def new file mode 100644 index 0000000..6cfdfc3 --- /dev/null +++ b/templates/interfaces/ethernet/node.tag/vif/node.tag/qos-policy/out/node.def @@ -0,0 +1,6 @@ +type: txt +help: Set outbound QOS policy +allowed: /opt/vyatta/sbin/vyatta-qos.pl --list-policy +update: sudo ip link set dev $VAR(../../@).$VAR(../@) txqueuelen 100 + /opt/vyatta/sbin/vyatta-qos.pl --update-interface $VAR(../../@).$VAR(../@) $VAR(.) $VAR(@) +delete: /opt/vyatta/sbin/vyatta-qos.pl --delete-interface $VAR(../../@).$VAR(../@) $VAR(.) -- cgit v1.2.3 From e2da1de0e4d30cd713b35b5b3fc6a81e018a64ff Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Tue, 8 Apr 2008 13:18:14 -0500 Subject: Allow qos over vlan Add template and configuration support for QoS policy over vif. This is covers bug 3137 --- .../ethernet/node.tag/vif/node.tag/qos-policy/out/node.def | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/templates/interfaces/ethernet/node.tag/vif/node.tag/qos-policy/out/node.def b/templates/interfaces/ethernet/node.tag/vif/node.tag/qos-policy/out/node.def index 6cfdfc3..ba98afa 100644 --- a/templates/interfaces/ethernet/node.tag/vif/node.tag/qos-policy/out/node.def +++ b/templates/interfaces/ethernet/node.tag/vif/node.tag/qos-policy/out/node.def @@ -1,6 +1,9 @@ type: txt help: Set outbound QOS policy allowed: /opt/vyatta/sbin/vyatta-qos.pl --list-policy -update: sudo ip link set dev $VAR(../../@).$VAR(../@) txqueuelen 100 - /opt/vyatta/sbin/vyatta-qos.pl --update-interface $VAR(../../@).$VAR(../@) $VAR(.) $VAR(@) -delete: /opt/vyatta/sbin/vyatta-qos.pl --delete-interface $VAR(../../@).$VAR(../@) $VAR(.) +create: sudo ip link set dev $VAR(../../../@).$VAR(../../@) txqueuelen 100 + /opt/vyatta/sbin/vyatta-qos.pl \ + --update-interface $VAR(../../../@).$VAR(../../@) $VAR(.) $VAR(@) +delete: /opt/vyatta/sbin/vyatta-qos.pl \ + --delete-interface $VAR(../../../@).$VAR(../../@) $VAR(.) + sudo ip link set dev $VAR(../../../@).$VAR(../../@) txqueuelen 0 -- cgit v1.2.3 From 71f56ba1de7d6537255a6df783cebe4d2b6f0786 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Wed, 9 Apr 2008 15:00:49 -0500 Subject: Fix match rule formatting Internal TC commands use hex for identifiers and one place in perl script forgot to reformat. Bugfix for 3142 from Chris Smith --- scripts/VyattaQosMatch.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/VyattaQosMatch.pm b/scripts/VyattaQosMatch.pm index cfc5ed2..44ece49 100644 --- a/scripts/VyattaQosMatch.pm +++ b/scripts/VyattaQosMatch.pm @@ -88,5 +88,5 @@ sub filter { print {$out} " match meta\(vlan mask 0xfff eq $vif\)" if (defined $vif); } - print {$out} " classid $parent:$id\n"; + printf {$out} " classid $parent:%x\n", $id; } -- cgit v1.2.3 From 0a62ca06260cc0a0f2b053d1d442b4c03b426493 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Thu, 10 Apr 2008 10:47:14 -0500 Subject: fix bug with interpretation of ceiling This fixes problem which causes QoS not to fail on commit if ceiling is a percentage. The ceiling maybe a percentage (not fixed) value so it needs to be interpreted before passing to tc. --- scripts/VyattaQosTrafficShaper.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/VyattaQosTrafficShaper.pm b/scripts/VyattaQosTrafficShaper.pm index ef7bd7b..1d01ed5 100644 --- a/scripts/VyattaQosTrafficShaper.pm +++ b/scripts/VyattaQosTrafficShaper.pm @@ -193,7 +193,7 @@ printf ${out} "class add dev %s parent %x:1 classid %x:%x htb rate %s", $dev, $parent, $parent, $self->{id}, $rate; - print ${out} " ceil $self->{_ceiling}" if ( defined $self->{_ceiling} ); + print ${out} " ceil $ceil" if ( $ceil ); print ${out} " burst $self->{_burst}" if ( defined $self->{_burst} ); print ${out} " prio $self->{_priority}" if ( defined $self->{_priority} ); print {$out} "\n"; -- cgit v1.2.3 From 5d55f49def2ed0fd5740a4a345b756fce1892553 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Thu, 10 Apr 2008 10:54:55 -0500 Subject: fix QoS traffic shaper priority-queue setup Yet another place where id needs to be converted to hex. Should fix bug 3078. --- scripts/VyattaQosTrafficShaper.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/VyattaQosTrafficShaper.pm b/scripts/VyattaQosTrafficShaper.pm index 1d01ed5..4ea494c 100644 --- a/scripts/VyattaQosTrafficShaper.pm +++ b/scripts/VyattaQosTrafficShaper.pm @@ -124,7 +124,7 @@ my $prio_id = 0x4000 + $self->{id}; my $limit = $self->{_limit}; - print {$out} "handle $prio_id: prio\n"; + printf {$out} "handle %x: prio\n", $prio_id; if ($limit) { foreach my $i (qw/1 2 3/) { -- cgit v1.2.3