summaryrefslogtreecommitdiff
path: root/interface-definitions
diff options
context:
space:
mode:
authorRoman Khramshin <HollyGurza@users.noreply.github.com>2024-05-31 16:04:42 +0700
committerGitHub <noreply@github.com>2024-05-31 12:04:42 +0300
commit5563bcd9eaef5d5d8a020b92d43a86028e3c26c1 (patch)
treef580a6cfd3afc0f45de784f646d76fb96867241b /interface-definitions
parenta9fb0ac0ca5644db7bf9d75951b3cd97c3598c60 (diff)
downloadvyos-1x-5563bcd9eaef5d5d8a020b92d43a86028e3c26c1.tar.gz
vyos-1x-5563bcd9eaef5d5d8a020b92d43a86028e3c26c1.zip
T5307: QoS - traffic-class-map services (#3492)
added new syntax to work with class match filters in QoS policy
Diffstat (limited to 'interface-definitions')
-rw-r--r--interface-definitions/include/qos/class-match-group.xml.i15
-rw-r--r--interface-definitions/include/qos/class-match-ipv4.xml.i31
-rw-r--r--interface-definitions/include/qos/class-match-ipv6.xml.i31
-rw-r--r--interface-definitions/include/qos/class-match-mark.xml.i14
-rw-r--r--interface-definitions/include/qos/class-match-vif.xml.i15
-rw-r--r--interface-definitions/include/qos/class-match.xml.i89
-rw-r--r--interface-definitions/qos.xml.in39
7 files changed, 150 insertions, 84 deletions
diff --git a/interface-definitions/include/qos/class-match-group.xml.i b/interface-definitions/include/qos/class-match-group.xml.i
new file mode 100644
index 000000000..40e3b7259
--- /dev/null
+++ b/interface-definitions/include/qos/class-match-group.xml.i
@@ -0,0 +1,15 @@
+<!-- include start from qos/class-match-group.xml.i -->
+<leafNode name="match-group">
+ <properties>
+ <help>Filter group for QoS policy</help>
+ <valueHelp>
+ <format>txt</format>
+ <description>Match group name</description>
+ </valueHelp>
+ <completionHelp>
+ <script>${vyos_completion_dir}/qos/list_traffic_match_group.py</script>
+ </completionHelp>
+ <multi/>
+ </properties>
+</leafNode>
+<!-- include end -->
diff --git a/interface-definitions/include/qos/class-match-ipv4.xml.i b/interface-definitions/include/qos/class-match-ipv4.xml.i
new file mode 100644
index 000000000..dc44d32d5
--- /dev/null
+++ b/interface-definitions/include/qos/class-match-ipv4.xml.i
@@ -0,0 +1,31 @@
+<!-- include start from qos/class-match-ipv4.xml.i -->
+<node name="ip">
+ <properties>
+ <help>Match IP protocol header</help>
+ </properties>
+ <children>
+ <node name="destination">
+ <properties>
+ <help>Match on destination port or address</help>
+ </properties>
+ <children>
+ #include <include/qos/class-match-ipv4-address.xml.i>
+ #include <include/port-number.xml.i>
+ </children>
+ </node>
+ #include <include/qos/match-dscp.xml.i>
+ #include <include/qos/max-length.xml.i>
+ #include <include/ip-protocol.xml.i>
+ <node name="source">
+ <properties>
+ <help>Match on source port or address</help>
+ </properties>
+ <children>
+ #include <include/qos/class-match-ipv4-address.xml.i>
+ #include <include/port-number.xml.i>
+ </children>
+ </node>
+ #include <include/qos/tcp-flags.xml.i>
+ </children>
+</node>
+<!-- include end -->
diff --git a/interface-definitions/include/qos/class-match-ipv6.xml.i b/interface-definitions/include/qos/class-match-ipv6.xml.i
new file mode 100644
index 000000000..ed7aceff9
--- /dev/null
+++ b/interface-definitions/include/qos/class-match-ipv6.xml.i
@@ -0,0 +1,31 @@
+<!-- include start from qos/class-match-ipv6.xml.i -->
+<node name="ipv6">
+ <properties>
+ <help>Match IPv6 protocol header</help>
+ </properties>
+ <children>
+ <node name="destination">
+ <properties>
+ <help>Match on destination port or address</help>
+ </properties>
+ <children>
+ #include <include/qos/class-match-ipv6-address.xml.i>
+ #include <include/port-number.xml.i>
+ </children>
+ </node>
+ #include <include/qos/match-dscp.xml.i>
+ #include <include/qos/max-length.xml.i>
+ #include <include/ip-protocol.xml.i>
+ <node name="source">
+ <properties>
+ <help>Match on source port or address</help>
+ </properties>
+ <children>
+ #include <include/qos/class-match-ipv6-address.xml.i>
+ #include <include/port-number.xml.i>
+ </children>
+ </node>
+ #include <include/qos/tcp-flags.xml.i>
+ </children>
+</node>
+<!-- include end -->
diff --git a/interface-definitions/include/qos/class-match-mark.xml.i b/interface-definitions/include/qos/class-match-mark.xml.i
new file mode 100644
index 000000000..a7481c6aa
--- /dev/null
+++ b/interface-definitions/include/qos/class-match-mark.xml.i
@@ -0,0 +1,14 @@
+<!-- include start from qos/class-match-mark.xml.i -->
+<leafNode name="mark">
+ <properties>
+ <help>Match on mark applied by firewall</help>
+ <valueHelp>
+ <format>u32</format>
+ <description>FW mark to match</description>
+ </valueHelp>
+ <constraint>
+ <validator name="numeric" argument="--range 0-4294967295"/>
+ </constraint>
+ </properties>
+</leafNode>
+<!-- include end -->
diff --git a/interface-definitions/include/qos/class-match-vif.xml.i b/interface-definitions/include/qos/class-match-vif.xml.i
new file mode 100644
index 000000000..ec58db606
--- /dev/null
+++ b/interface-definitions/include/qos/class-match-vif.xml.i
@@ -0,0 +1,15 @@
+<!-- include start from qos/class-match-vif.xml.i -->
+<leafNode name="vif">
+ <properties>
+ <help>Virtual Local Area Network (VLAN) ID for this match</help>
+ <valueHelp>
+ <format>u32:0-4095</format>
+ <description>Virtual Local Area Network (VLAN) tag </description>
+ </valueHelp>
+ <constraint>
+ <validator name="numeric" argument="--range 0-4095"/>
+ </constraint>
+ <constraintErrorMessage>VLAN ID must be between 0 and 4095</constraintErrorMessage>
+ </properties>
+</leafNode>
+<!-- include end -->
diff --git a/interface-definitions/include/qos/class-match.xml.i b/interface-definitions/include/qos/class-match.xml.i
index 4ba12f8f7..77d1933a3 100644
--- a/interface-definitions/include/qos/class-match.xml.i
+++ b/interface-definitions/include/qos/class-match.xml.i
@@ -5,7 +5,7 @@
<constraint>
<regex>[^-].*</regex>
</constraint>
- <constraintErrorMessage>Match queue name cannot start with hyphen (-)</constraintErrorMessage>
+ <constraintErrorMessage>Match queue name cannot start with hyphen</constraintErrorMessage>
</properties>
<children>
#include <include/generic-description.xml.i>
@@ -89,89 +89,10 @@
</children>
</node>
#include <include/generic-interface.xml.i>
- <node name="ip">
- <properties>
- <help>Match IP protocol header</help>
- </properties>
- <children>
- <node name="destination">
- <properties>
- <help>Match on destination port or address</help>
- </properties>
- <children>
- #include <include/qos/class-match-ipv4-address.xml.i>
- #include <include/port-number.xml.i>
- </children>
- </node>
- #include <include/qos/match-dscp.xml.i>
- #include <include/qos/max-length.xml.i>
- #include <include/ip-protocol.xml.i>
- <node name="source">
- <properties>
- <help>Match on source port or address</help>
- </properties>
- <children>
- #include <include/qos/class-match-ipv4-address.xml.i>
- #include <include/port-number.xml.i>
- </children>
- </node>
- #include <include/qos/tcp-flags.xml.i>
- </children>
- </node>
- <node name="ipv6">
- <properties>
- <help>Match IPv6 protocol header</help>
- </properties>
- <children>
- <node name="destination">
- <properties>
- <help>Match on destination port or address</help>
- </properties>
- <children>
- #include <include/qos/class-match-ipv6-address.xml.i>
- #include <include/port-number.xml.i>
- </children>
- </node>
- #include <include/qos/match-dscp.xml.i>
- #include <include/qos/max-length.xml.i>
- #include <include/ip-protocol.xml.i>
- <node name="source">
- <properties>
- <help>Match on source port or address</help>
- </properties>
- <children>
- #include <include/qos/class-match-ipv6-address.xml.i>
- #include <include/port-number.xml.i>
- </children>
- </node>
- #include <include/qos/tcp-flags.xml.i>
- </children>
- </node>
- <leafNode name="mark">
- <properties>
- <help>Match on mark applied by firewall</help>
- <valueHelp>
- <format>u32</format>
- <description>FW mark to match</description>
- </valueHelp>
- <constraint>
- <validator name="numeric" argument="--range 0-4294967295"/>
- </constraint>
- </properties>
- </leafNode>
- <leafNode name="vif">
- <properties>
- <help>Virtual Local Area Network (VLAN) ID for this match</help>
- <valueHelp>
- <format>u32:0-4095</format>
- <description>Virtual Local Area Network (VLAN) tag </description>
- </valueHelp>
- <constraint>
- <validator name="numeric" argument="--range 0-4095"/>
- </constraint>
- <constraintErrorMessage>VLAN ID must be between 0 and 4095</constraintErrorMessage>
- </properties>
- </leafNode>
+ #include <include/qos/class-match-ipv4.xml.i>
+ #include <include/qos/class-match-ipv6.xml.i>
+ #include <include/qos/class-match-mark.xml.i>
+ #include <include/qos/class-match-vif.xml.i>
</children>
</tagNode>
<!-- include end -->
diff --git a/interface-definitions/qos.xml.in b/interface-definitions/qos.xml.in
index 8f9ae3fa6..927594c11 100644
--- a/interface-definitions/qos.xml.in
+++ b/interface-definitions/qos.xml.in
@@ -281,6 +281,7 @@
#include <include/qos/mtu.xml.i>
#include <include/qos/class-police-exceed.xml.i>
#include <include/qos/class-match.xml.i>
+ #include <include/qos/class-match-group.xml.i>
#include <include/qos/class-priority.xml.i>
<leafNode name="priority">
<defaultValue>20</defaultValue>
@@ -415,6 +416,7 @@
#include <include/qos/flows.xml.i>
#include <include/qos/interval.xml.i>
#include <include/qos/class-match.xml.i>
+ #include <include/qos/class-match-group.xml.i>
#include <include/qos/queue-limit-1-4294967295.xml.i>
#include <include/qos/queue-type.xml.i>
<leafNode name="queue-type">
@@ -542,6 +544,8 @@
#include <include/qos/flows.xml.i>
#include <include/qos/interval.xml.i>
#include <include/qos/class-match.xml.i>
+ #include <include/qos/class-match-group.xml.i>
+
<leafNode name="quantum">
<properties>
<help>Packet scheduling quantum</help>
@@ -645,6 +649,7 @@
#include <include/qos/flows.xml.i>
#include <include/qos/interval.xml.i>
#include <include/qos/class-match.xml.i>
+ #include <include/qos/class-match-group.xml.i>
#include <include/qos/class-priority.xml.i>
#include <include/qos/queue-average-packet.xml.i>
#include <include/qos/queue-maximum-threshold.xml.i>
@@ -767,6 +772,7 @@
</children>
</node>
#include <include/qos/class-match.xml.i>
+ #include <include/qos/class-match-group.xml.i>
<node name="realtime">
<properties>
<help>Realtime class settings</help>
@@ -830,6 +836,39 @@
</tagNode>
</children>
</node>
+ <tagNode name="traffic-match-group">
+ <properties>
+ <help>Filter group for QoS policy</help>
+ <valueHelp>
+ <format>txt</format>
+ <description>Match group name</description>
+ </valueHelp>
+ <constraint>
+ <regex>[^-].*</regex>
+ </constraint>
+ <constraintErrorMessage>Match group name cannot start with hyphen</constraintErrorMessage>
+ </properties>
+ <children>
+ #include <include/generic-description.xml.i>
+ <tagNode name="match">
+ <properties>
+ <help>Class matching rule name</help>
+ <constraint>
+ <regex>[^-].*</regex>
+ </constraint>
+ <constraintErrorMessage>Match queue name cannot start with hyphen</constraintErrorMessage>
+ </properties>
+ <children>
+ #include <include/generic-description.xml.i>
+ #include <include/qos/class-match-ipv4.xml.i>
+ #include <include/qos/class-match-ipv6.xml.i>
+ #include <include/qos/class-match-mark.xml.i>
+ #include <include/qos/class-match-vif.xml.i>
+ </children>
+ </tagNode>
+ #include <include/qos/class-match-group.xml.i>
+ </children>
+ </tagNode>
</children>
</node>
</interfaceDefinition>