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 +- interface-definitions/qos.xml.in | 425 ++++++++++++--------- 17 files changed, 778 insertions(+), 630 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') 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 @@ - + diff --git a/interface-definitions/qos.xml.in b/interface-definitions/qos.xml.in index 546c138c6..c243ad8fe 100644 --- a/interface-definitions/qos.xml.in +++ b/interface-definitions/qos.xml.in @@ -3,6 +3,7 @@ Quality of Service (QoS) + 900 @@ -24,17 +25,7 @@ Interface ingress traffic policy - qos policy drop-tail - qos policy fair-queue - qos policy fq-codel qos policy limiter - qos policy network-emulator - qos policy priority-queue - qos policy random-detect - qos policy rate-control - qos policy round-robin - qos policy shaper - qos policy shaper-hfsc txt @@ -46,10 +37,10 @@ Interface egress traffic policy + qos policy cake qos policy drop-tail qos policy fair-queue qos policy fq-codel - qos policy limiter qos policy network-emulator qos policy priority-queue qos policy random-detect @@ -66,12 +57,97 @@ - + Service Policy definitions - 900 + + + Common Applications Kept Enhanced (CAKE) + + txt + Policy name + + + [[:alnum:]][-_[:alnum:]]* + + Only alpha-numeric policy name allowed + + + #include + #include + + + Flow isolation settings + + + + + Disables flow isolation, all traffic passes through a single queue + + + + + + Flows are defined only by source address + + + + + + Flows are defined only by destination address + + + + + + Flows are defined by source-destination host pairs + + + + + + Flows are defined by the entire 5-tuple + + + + + + Flows are defined by the 5-tuple, and fairness is applied first over source addresses, then over individual flows + + + + + + Flows are defined by the 5-tuple, and fairness is applied first over destination addresses, then over individual flows + + + + + + Perform NAT lookup before applying flow-isolation rules + + + + + + + + Round-Trip-Time for Active Queue Management (AQM) + + u32:1-3600000 + RTT in ms + + + + + RTT must be in range 1 to 3600000 milli-seconds + + 100 + + + Packet limited First In, First Out queue @@ -171,6 +247,7 @@ Only alpha-numeric policy name allowed + #include Class ID @@ -184,23 +261,13 @@ Class identifier must be between 1 and 4090 + #include #include #include - #include - #include - #include + #include + #include + #include - - Priority for rule evaluation - - u32:0-20 - Priority for match rule evaluation - - - - - Priority must be between 0 and 20 - 20 @@ -212,10 +279,9 @@ #include #include - #include + #include - #include @@ -231,10 +297,9 @@ Only alpha-numeric policy name allowed - #include - #include #include - + #include + Adds delay to packets outgoing to chosen network interface @@ -247,7 +312,7 @@ Priority must be between 0 and 65535 - + Introducing error in a random position for chosen percent of packets @@ -260,9 +325,9 @@ Priority must be between 0 and 100 - + - Add independent loss probability to the packets outgoing to chosen network interface + Cosen percent of packets is duplicated before queuing them <number> Percentage of packets affected @@ -270,10 +335,10 @@ - Must be between 0 and 100 + Priority must be between 0 and 100 - + Add independent loss probability to the packets outgoing to chosen network interface @@ -286,9 +351,9 @@ Must be between 0 and 100 - + - Packet reordering percentage + Emulated packet reordering percentage <number> Percentage of packets affected @@ -315,6 +380,7 @@ Only alpha-numeric policy name allowed + #include Class Handle @@ -332,10 +398,13 @@ #include #include #include - #include - #include - #include + #include + #include #include + + drop-tail + + #include @@ -343,16 +412,17 @@ Default policy - #include #include #include #include - #include - #include + #include #include + + drop-tail + + #include - #include @@ -368,11 +438,8 @@ Only alpha-numeric policy name allowed - #include - - auto - #include + #include IP precedence @@ -413,6 +480,7 @@ Mark probability must be greater than 0 + 10 @@ -426,6 +494,7 @@ Threshold must be between 0 and 4096 + 18 @@ -457,8 +526,8 @@ Only alpha-numeric policy name allowed - #include #include + #include #include @@ -478,7 +547,7 @@ - Round-Robin based policy + Deficit Round Robin Scheduler txt Policy name @@ -503,11 +572,11 @@ Class identifier must be between 1 and 4095 - #include #include + #include #include #include - #include + #include Packet scheduling quantum @@ -523,111 +592,26 @@ #include #include + + drop-tail + #include - - - - - Hierarchical Fair Service Curve's policy - - txt - Policy name - - - [[:alnum:]][-_[:alnum:]]* - - Only alpha-numeric policy name allowed - - - #include - - auto - - #include - - - Class ID - - u32:1-4095 - Class Identifier - - - - - Class identifier must be between 1 and 4095 - - - #include - - - Linkshare class settings - - - #include - #include - #include - - - #include - - - Realtime class settings - - - #include - #include - #include - - - - - Upperlimit class settings - - - #include - #include - #include - - - - Default policy - - - Linkshare class settings - - - #include - #include - #include - - - - - Realtime class settings - - - #include - #include - #include - - - - - Upperlimit class settings - - - #include - #include - #include - - + #include + #include + #include + #include + #include + + fair-queue + + #include @@ -645,10 +629,8 @@ Only alpha-numeric policy name allowed - #include - - auto - + #include + #include Class ID @@ -662,10 +644,8 @@ Class identifier must be between 2 and 4095 - #include - - 100% - + #include + #include #include @@ -697,31 +677,19 @@ #include - #include #include #include - #include - - - Priority for usage of excess bandwidth - - u32:0-7 - Priority order for bandwidth pool - - - - - Priority must be between 0 and 7 - - 20 - + #include + #include #include #include + + fair-queue + #include #include - #include Default policy @@ -759,7 +727,6 @@ #include - #include #include #include @@ -778,12 +745,116 @@ #include #include + + fair-queue + #include #include + + + Hierarchical Fair Service Curve's policy + + txt + Policy name + + + [[:alnum:]][-_[:alnum:]]* + + Only alpha-numeric policy name allowed + + + #include + #include + + + Class ID + + u32:1-4095 + Class Identifier + + + + + Class identifier must be between 1 and 4095 + + + #include + + + Linkshare class settings + + + #include + #include + #include + + + #include + + + Realtime class settings + + + #include + #include + #include + + + + + Upperlimit class settings + + + #include + #include + #include + + + + + + + Default policy + + + + + Linkshare class settings + + + #include + #include + #include + + + + + Realtime class settings + + + #include + #include + #include + + + + + Upperlimit class settings + + + #include + #include + #include + + + + + + -- cgit v1.2.3