From 216b27c681dfacba194c9f001eec6287008a750c Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Wed, 14 May 2008 11:40:18 -0700 Subject: new qos-policy type rate-limit Add new QoS policy type "rate-limit" which is a wrapper around the the Token Bucket Filter (TBF) qdisc. Rate limit provides a simple way to do basic bandwidth limitation without the complexity of the doing multiple classes in the traffic shaper policy. --- templates/qos-policy/rate-limit/node.def | 8 ++++++++ templates/qos-policy/rate-limit/node.tag/bandwidth/node.def | 9 +++++++++ templates/qos-policy/rate-limit/node.tag/burst/node.def | 7 +++++++ templates/qos-policy/rate-limit/node.tag/description/node.def | 2 ++ templates/qos-policy/rate-limit/node.tag/latency/node.def | 7 +++++++ 5 files changed, 33 insertions(+) create mode 100644 templates/qos-policy/rate-limit/node.def create mode 100644 templates/qos-policy/rate-limit/node.tag/bandwidth/node.def create mode 100644 templates/qos-policy/rate-limit/node.tag/burst/node.def create mode 100644 templates/qos-policy/rate-limit/node.tag/description/node.def create mode 100644 templates/qos-policy/rate-limit/node.tag/latency/node.def (limited to 'templates') diff --git a/templates/qos-policy/rate-limit/node.def b/templates/qos-policy/rate-limit/node.def new file mode 100644 index 0000000..55728a7 --- /dev/null +++ b/templates/qos-policy/rate-limit/node.def @@ -0,0 +1,8 @@ +tag: +type: txt +help: Set rate limiting 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(@)" +update: /opt/vyatta/sbin/vyatta-qos.pl --update-policy "$VAR(.)" "$VAR(@)" diff --git a/templates/qos-policy/rate-limit/node.tag/bandwidth/node.def b/templates/qos-policy/rate-limit/node.tag/bandwidth/node.def new file mode 100644 index 0000000..3e48fd3 --- /dev/null +++ b/templates/qos-policy/rate-limit/node.tag/bandwidth/node.def @@ -0,0 +1,9 @@ +type: txt +help: Set the bandwidth limit +syntax:expression: exec "/opt/vyatta/sbin/vyatta-qos-util.pl --rate \"$VAR(@)\"" +comp_help: Allowed values: + Bandwidth in Kbps per second + Value with scaling suffix + bits per sec (kbit, mbit, gbit) + bytes per sec (kbps, mbps, gbps) + diff --git a/templates/qos-policy/rate-limit/node.tag/burst/node.def b/templates/qos-policy/rate-limit/node.tag/burst/node.def new file mode 100644 index 0000000..56174bb --- /dev/null +++ b/templates/qos-policy/rate-limit/node.tag/burst/node.def @@ -0,0 +1,7 @@ +type: txt +help: Set the burst size +default: "15k" +syntax:expression: exec "/opt/vyatta/sbin/vyatta-qos-util.pl --burst \"$VAR(@)\"" +comp_help: Allowed values: + Burst size in bytes + Size with scaling suffix (kb, mb, gb) diff --git a/templates/qos-policy/rate-limit/node.tag/description/node.def b/templates/qos-policy/rate-limit/node.tag/description/node.def new file mode 100644 index 0000000..1e8e64f --- /dev/null +++ b/templates/qos-policy/rate-limit/node.tag/description/node.def @@ -0,0 +1,2 @@ +type: txt +help: Set description for this queuing policy diff --git a/templates/qos-policy/rate-limit/node.tag/latency/node.def b/templates/qos-policy/rate-limit/node.tag/latency/node.def new file mode 100644 index 0000000..486bfa3 --- /dev/null +++ b/templates/qos-policy/rate-limit/node.tag/latency/node.def @@ -0,0 +1,7 @@ +type: txt +syntax:expression: exec "/opt/vyatta/sbin/vyatta-qos-util.pl --time \"$VAR(@)\"" +default: "50ms" +help: Set maximum latency +comp_help: Limit on the queue size based on latency + Latency in milliseconds + Time with suffx (secs, ms, us) -- cgit v1.2.3