From f89a6806d90fd11e0e1e5e922ef95332ad8bfeb8 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Thu, 16 Jun 2022 21:20:39 +0200 Subject: qos: T4284: first implementation introducing a new vyos.qos module --- .../include/interface/mirror.xml.i | 18 +- .../include/interface/redirect.xml.i | 4 +- .../include/qos/bandwidth-auto.xml.i | 43 ++++ interface-definitions/include/qos/bandwidth.xml.i | 28 ++- .../include/qos/class-match-ipv4-address.xml.i | 19 ++ .../include/qos/class-match-ipv6-address.xml.i | 14 ++ .../include/qos/class-match.xml.i | 177 +++++++++++++++++ .../include/qos/class-police-exceed.xml.i | 66 ++++++ .../include/qos/class-priority.xml.i | 15 ++ interface-definitions/include/qos/dscp.xml.i | 143 ------------- .../include/qos/limiter-actions.xml.i | 66 ------ interface-definitions/include/qos/match-dscp.xml.i | 142 +++++++++++++ interface-definitions/include/qos/match.xml.i | 221 --------------------- interface-definitions/include/qos/max-length.xml.i | 8 +- interface-definitions/include/qos/queue-type.xml.i | 17 +- .../include/version/qos-version.xml.i | 2 +- 16 files changed, 530 insertions(+), 453 deletions(-) create mode 100644 interface-definitions/include/qos/bandwidth-auto.xml.i create mode 100644 interface-definitions/include/qos/class-match-ipv4-address.xml.i create mode 100644 interface-definitions/include/qos/class-match-ipv6-address.xml.i create mode 100644 interface-definitions/include/qos/class-match.xml.i create mode 100644 interface-definitions/include/qos/class-police-exceed.xml.i create mode 100644 interface-definitions/include/qos/class-priority.xml.i delete mode 100644 interface-definitions/include/qos/dscp.xml.i delete mode 100644 interface-definitions/include/qos/limiter-actions.xml.i create mode 100644 interface-definitions/include/qos/match-dscp.xml.i delete mode 100644 interface-definitions/include/qos/match.xml.i (limited to 'interface-definitions/include') diff --git a/interface-definitions/include/interface/mirror.xml.i b/interface-definitions/include/interface/mirror.xml.i index 2959551f0..74a172b50 100644 --- a/interface-definitions/include/interface/mirror.xml.i +++ b/interface-definitions/include/interface/mirror.xml.i @@ -1,23 +1,31 @@ - Incoming/outgoing packet mirroring destination + Mirror ingress/egress packets - Mirror the ingress traffic of the interface to the destination interface + Mirror ingress traffic to destination interface - + + + txt + Destination interface name + - Mirror the egress traffic of the interface to the destination interface + Mirror egress traffic to destination interface - + + + txt + Destination interface name + diff --git a/interface-definitions/include/interface/redirect.xml.i b/interface-definitions/include/interface/redirect.xml.i index 8df8957ac..b01e486ce 100644 --- a/interface-definitions/include/interface/redirect.xml.i +++ b/interface-definitions/include/interface/redirect.xml.i @@ -1,13 +1,13 @@ - Incoming packet redirection destination + Redirect incoming packet to destination txt - Interface name + Destination interface name #include diff --git a/interface-definitions/include/qos/bandwidth-auto.xml.i b/interface-definitions/include/qos/bandwidth-auto.xml.i new file mode 100644 index 000000000..3780b7444 --- /dev/null +++ b/interface-definitions/include/qos/bandwidth-auto.xml.i @@ -0,0 +1,43 @@ + + + + Available bandwidth for this policy + + auto + + + auto + Rate matches interface speed + + + <number> + Bits per second + + + <number>bit + Bits per second + + + <number>kbit + Kilobits per second + + + <number>mbit + Megabits per second + + + <number>gbit + Gigabits per second + + + <number>tbit + Terabits per second + + + + \d+(bit|kbit|mbit|gbit|tbit) + + + auto + + diff --git a/interface-definitions/include/qos/bandwidth.xml.i b/interface-definitions/include/qos/bandwidth.xml.i index 82af22f42..62ea93b67 100644 --- a/interface-definitions/include/qos/bandwidth.xml.i +++ b/interface-definitions/include/qos/bandwidth.xml.i @@ -1,15 +1,35 @@ - Traffic-limit used for this class + Available bandwidth for this policy <number> - Rate in kbit (kilobit per second) + Bits per second - <number><suffix> - Rate with scaling suffix (mbit, mbps, ...) + <number>bit + Bits per second + + <number>kbit + Kilobits per second + + + <number>mbit + Megabits per second + + + <number>gbit + Gigabits per second + + + <number>tbit + Terabits per second + + + + \d+(bit|kbit|mbit|gbit|tbit) + diff --git a/interface-definitions/include/qos/class-match-ipv4-address.xml.i b/interface-definitions/include/qos/class-match-ipv4-address.xml.i new file mode 100644 index 000000000..8e84c988a --- /dev/null +++ b/interface-definitions/include/qos/class-match-ipv4-address.xml.i @@ -0,0 +1,19 @@ + + + + IPv4 destination address for this match + + ipv4 + IPv4 address + + + ipv4net + IPv4 prefix + + + + + + + + diff --git a/interface-definitions/include/qos/class-match-ipv6-address.xml.i b/interface-definitions/include/qos/class-match-ipv6-address.xml.i new file mode 100644 index 000000000..fd7388127 --- /dev/null +++ b/interface-definitions/include/qos/class-match-ipv6-address.xml.i @@ -0,0 +1,14 @@ + + + + IPv6 destination address for this match + + ipv6net + IPv6 address and prefix length + + + + + + + diff --git a/interface-definitions/include/qos/class-match.xml.i b/interface-definitions/include/qos/class-match.xml.i new file mode 100644 index 000000000..d9c35731d --- /dev/null +++ b/interface-definitions/include/qos/class-match.xml.i @@ -0,0 +1,177 @@ + + + + Class matching rule name + + [^-].* + + Match queue name cannot start with hyphen (-) + + + #include + + + Ethernet header match + + + + + Ethernet destination address for this match + + macaddr + MAC address to match + + + + + + + + + Ethernet protocol for this match + + + all 802.1Q 802_2 802_3 aarp aoe arp atalk dec ip ipv6 ipx lat localtalk rarp snap x25 + + + u32:0-65535 + Ethernet protocol number + + + txt + Ethernet protocol name + + + all + Any protocol + + + ip + Internet IP (IPv4) + + + ipv6 + Internet IP (IPv6) + + + arp + Address Resolution Protocol + + + atalk + Appletalk + + + ipx + Novell Internet Packet Exchange + + + 802.1Q + 802.1Q VLAN tag + + + + + + + + + Ethernet source address for this match + + macaddr + MAC address to match + + + + + + + + + #include + + + Match IP protocol header + + + + + Match on destination port or address + + + #include + #include + + + #include + #include + #include + + + Match on source port or address + + + #include + #include + + + #include + + + + + Match IPv6 protocol header + + + + + Match on destination port or address + + + #include + #include + + + #include + #include + #include + + + Match on source port or address + + + #include + #include + + + #include + + + + + Match on mark applied by firewall + + txt + FW mark to match + + + + + + + + + Virtual Local Area Network (VLAN) ID for this match + + u32:0-4095 + Virtual Local Area Network (VLAN) tag + + + + + VLAN ID must be between 0 and 4095 + + + + + diff --git a/interface-definitions/include/qos/class-police-exceed.xml.i b/interface-definitions/include/qos/class-police-exceed.xml.i new file mode 100644 index 000000000..ee2ce16a8 --- /dev/null +++ b/interface-definitions/include/qos/class-police-exceed.xml.i @@ -0,0 +1,66 @@ + + + + Default action for packets exceeding the limiter + + continue drop ok reclassify pipe + + + continue + Do not do anything, just continue with the next action in line + + + drop + Drop the packet immediately + + + ok + Accept the packet + + + reclassify + Treat the packet as non-matching to the filter this action is attached to and continue with the next filter in line (if any) + + + pipe + Pass the packet to the next action in line + + + (continue|drop|ok|reclassify|pipe) + + + drop + + + + Default action for packets not exceeding the limiter + + continue drop ok reclassify pipe + + + continue + Do not do anything, just continue with the next action in line + + + drop + Drop the packet immediately + + + ok + Accept the packet + + + reclassify + Treat the packet as non-matching to the filter this action is attached to and continue with the next filter in line (if any) + + + pipe + Pass the packet to the next action in line + + + (continue|drop|ok|reclassify|pipe) + + + ok + + diff --git a/interface-definitions/include/qos/class-priority.xml.i b/interface-definitions/include/qos/class-priority.xml.i new file mode 100644 index 000000000..3fd848c93 --- /dev/null +++ b/interface-definitions/include/qos/class-priority.xml.i @@ -0,0 +1,15 @@ + + + + Priority for rule evaluation + + u32:0-20 + Priority for match rule evaluation + + + + + Priority must be between 0 and 20 + + + diff --git a/interface-definitions/include/qos/dscp.xml.i b/interface-definitions/include/qos/dscp.xml.i deleted file mode 100644 index bb90850ac..000000000 --- a/interface-definitions/include/qos/dscp.xml.i +++ /dev/null @@ -1,143 +0,0 @@ - - - - Match on Differentiated Services Codepoint (DSCP) - - default reliability throughput lowdelay priority immediate flash flash-override critical internet network AF11 AF12 AF13 AF21 AF22 AF23 AF31 AF32 AF33 AF41 AF42 AF43 CS1 CS2 CS3 CS4 CS5 CS6 CS7 EF - - - u32:0-63 - Differentiated Services Codepoint (DSCP) value - - - default - match DSCP (000000) - - - reliability - match DSCP (000001) - - - throughput - match DSCP (000010) - - - lowdelay - match DSCP (000100) - - - priority - match DSCP (001000) - - - immediate - match DSCP (010000) - - - flash - match DSCP (011000) - - - flash-override - match DSCP (100000) - - - critical - match DSCP (101000) - - - internet - match DSCP (110000) - - - network - match DSCP (111000) - - - AF11 - High-throughput data - - - AF12 - High-throughput data - - - AF13 - High-throughput data - - - AF21 - Low-latency data - - - AF22 - Low-latency data - - - AF23 - Low-latency data - - - AF31 - Multimedia streaming - - - AF32 - Multimedia streaming - - - AF33 - Multimedia streaming - - - AF41 - Multimedia conferencing - - - AF42 - Multimedia conferencing - - - AF43 - Multimedia conferencing - - - CS1 - Low-priority data - - - CS2 - OAM - - - CS3 - Broadcast video - - - CS4 - Real-time interactive - - - CS5 - Signaling - - - CS6 - Network control - - - CS7 - - - - EF - Expedited Forwarding - - - - (default|reliability|throughput|lowdelay|priority|immediate|flash|flash-override|critical|internet|network|AF11|AF12|AF13|AF21|AF22|AF23|AF31|AF32|AF33|AF41|AF42|AF43|CS1|CS2|CS3|CS4|CS5|CS6|CS7|EF) - - Priority must be between 0 and 63 - - - diff --git a/interface-definitions/include/qos/limiter-actions.xml.i b/interface-definitions/include/qos/limiter-actions.xml.i deleted file mode 100644 index a993423aa..000000000 --- a/interface-definitions/include/qos/limiter-actions.xml.i +++ /dev/null @@ -1,66 +0,0 @@ - - - - Default action for packets exceeding the limiter (default: drop) - - continue drop ok reclassify pipe - - - continue - Don't do anything, just continue with the next action in line - - - drop - Drop the packet immediately - - - ok - Accept the packet - - - reclassify - Treat the packet as non-matching to the filter this action is attached to and continue with the next filter in line (if any) - - - pipe - Pass the packet to the next action in line - - - (continue|drop|ok|reclassify|pipe) - - - drop - - - - Default action for packets not exceeding the limiter (default: ok) - - continue drop ok reclassify pipe - - - continue - Don't do anything, just continue with the next action in line - - - drop - Drop the packet immediately - - - ok - Accept the packet - - - reclassify - Treat the packet as non-matching to the filter this action is attached to and continue with the next filter in line (if any) - - - pipe - Pass the packet to the next action in line - - - (continue|drop|ok|reclassify|pipe) - - - ok - - diff --git a/interface-definitions/include/qos/match-dscp.xml.i b/interface-definitions/include/qos/match-dscp.xml.i new file mode 100644 index 000000000..1323fc033 --- /dev/null +++ b/interface-definitions/include/qos/match-dscp.xml.i @@ -0,0 +1,142 @@ + + + + Match on Differentiated Services Codepoint (DSCP) + + default reliability throughput lowdelay priority immediate flash flash-override critical internet network af11 af12 af13 af21 af22 af23 af31 af32 af33 af41 af42 af43 cs1 cs2 cs3 cs4 cs5 cs6 cs7 ef + + + u32:0-63 + Differentiated Services Codepoint (DSCP) value + + + default + match DSCP (000000) + + + reliability + match DSCP (000001) + + + throughput + match DSCP (000010) + + + lowdelay + match DSCP (000100) + + + priority + match DSCP (001000) + + + immediate + match DSCP (010000) + + + flash + match DSCP (011000) + + + flash-override + match DSCP (100000) + + + critical + match DSCP (101000) + + + internet + match DSCP (110000) + + + network + match DSCP (111000) + + + af11 + High-throughput data + + + af12 + High-throughput data + + + af13 + High-throughput data + + + af21 + Low-latency data + + + af22 + Low-latency data + + + af23 + Low-latency data + + + af31 + Multimedia streaming + + + af32 + Multimedia streaming + + + af33 + Multimedia streaming + + + af41 + Multimedia conferencing + + + af42 + Multimedia conferencing + + + af43 + Multimedia conferencing + + + cs1 + Low-priority data + + + cs2 + OAM + + + cs3 + Broadcast video + + + cs4 + Real-time interactive + + + cs5 + Signaling + + + cs6 + Network control + + + cs7 + + + + ef + Expedited Forwarding + + + + (default|reliability|throughput|lowdelay|priority|immediate|flash|flash-override|critical|internet|network|af11|af12|af13|af21|af22|af23|af31|af32|af33|af41|af42|af43|cs1|cs2|cs3|cs4|cs5|cs6|cs7|ef) + + + + diff --git a/interface-definitions/include/qos/match.xml.i b/interface-definitions/include/qos/match.xml.i deleted file mode 100644 index 7d89e4460..000000000 --- a/interface-definitions/include/qos/match.xml.i +++ /dev/null @@ -1,221 +0,0 @@ - - - - Class matching rule name - - [^-].* - - Match queue name cannot start with hyphen (-) - - - #include - - - Ethernet header match - - - - - Ethernet destination address for this match - - macaddr - MAC address to match - - - - - - - - - Ethernet protocol for this match - - - all 802.1Q 802_2 802_3 aarp aoe arp atalk dec ip ipv6 ipx lat localtalk rarp snap x25 - - - u32:0-65535 - Ethernet protocol number - - - txt - Ethernet protocol name - - - all - Any protocol - - - ip - Internet IP (IPv4) - - - ipv6 - Internet IP (IPv6) - - - arp - Address Resolution Protocol - - - atalk - Appletalk - - - ipx - Novell Internet Packet Exchange - - - 802.1Q - 802.1Q VLAN tag - - - - - - - - - Ethernet source address for this match - - macaddr - MAC address to match - - - - - - - - - #include - - - Match IP protocol header - - - - - Match on destination port or address - - - - - IPv4 destination address for this match - - ipv4net - IPv4 address and prefix length - - - - - - - #include - - - #include - #include - #include - - - Match on source port or address - - - - - IPv4 source address for this match - - ipv4net - IPv4 address and prefix length - - - - - - - #include - - - #include - - - - - Match IPv6 protocol header - - - - - Match on destination port or address - - - - - IPv6 destination address for this match - - ipv6net - IPv6 address and prefix length - - - - - - - #include - - - #include - #include - #include - - - Match on source port or address - - - - - IPv6 source address for this match - - ipv6net - IPv6 address and prefix length - - - - - - - #include - - - #include - - - - - Match on mark applied by firewall - - txt - FW mark to match - - - - - - - - - Virtual Local Area Network (VLAN) ID for this match - - u32:0-4095 - Virtual Local Area Network (VLAN) tag - - - - - VLAN ID must be between 0 and 4095 - - - - - diff --git a/interface-definitions/include/qos/max-length.xml.i b/interface-definitions/include/qos/max-length.xml.i index 4cc20f8c4..64cdd02ec 100644 --- a/interface-definitions/include/qos/max-length.xml.i +++ b/interface-definitions/include/qos/max-length.xml.i @@ -1,15 +1,15 @@ - Maximum packet length (ipv4) + Maximum packet length - u32:0-65535 + u32:1-65535 Maximum packet/payload length - + - Maximum IPv4 total packet length is 65535 + Maximum packet length is 65535 diff --git a/interface-definitions/include/qos/queue-type.xml.i b/interface-definitions/include/qos/queue-type.xml.i index 634f61024..c7d4cde82 100644 --- a/interface-definitions/include/qos/queue-type.xml.i +++ b/interface-definitions/include/qos/queue-type.xml.i @@ -3,28 +3,31 @@ Queue type for default traffic - fq-codel fair-queue drop-tail random-detect + drop-tail fair-queue fq-codel priority random-detect - fq-codel - Fair Queue Codel + drop-tail + First-In-First-Out (FIFO) fair-queue Stochastic Fair Queue (SFQ) - drop-tail - First-In-First-Out (FIFO) + fq-codel + Fair Queue Codel + + + priority + Priority queuing random-detect Random Early Detection (RED) - (fq-codel|fair-queue|drop-tail|random-detect) + (drop-tail|fair-queue|fq-codel|priority|random-detect) - drop-tail diff --git a/interface-definitions/include/version/qos-version.xml.i b/interface-definitions/include/version/qos-version.xml.i index e4d139349..c67e61e91 100644 --- a/interface-definitions/include/version/qos-version.xml.i +++ b/interface-definitions/include/version/qos-version.xml.i @@ -1,3 +1,3 @@ - + -- cgit v1.2.3