-
Notifications
You must be signed in to change notification settings - Fork 350
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
T5307: QoS - traffic-class-map services #3492
Conversation
What happens if you use both (old/new) syntaxes that overlap? |
All matches from No matter whether use both or only one syntax, validating and applying matches will work the same as if they were created through the old syntax |
Conflicting files |
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
Conflicts have been resolved. A maintainer will review the pull request shortly. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've tested it in my lab ,it seems to be correct . we can add multiple `match-group' and combine them with the old syntax , here there is an example adding a new match-group :
set qos policy shaper VyOS-HTB class 10 bandwidth '30%'
set qos policy shaper VyOS-HTB class 10 description 'dscp_EF_ipprec_5_GETS'
set qos policy shaper VyOS-HTB class 10 match CS4 ip dscp 'CS4'
set qos policy shaper VyOS-HTB class 10 match-group 'Streaming-Video'
set qos policy shaper VyOS-HTB class 10 priority '1'
set qos policy shaper VyOS-HTB class 10 queue-type 'fair-queue'
set qos policy shaper VyOS-HTB class 20 bandwidth '30%'
set qos policy shaper VyOS-HTB class 20 description 'dscp_AF4x_ipprec_4'
set qos policy shaper VyOS-HTB class 20 match ef ip dscp 'EF'
set qos policy shaper VyOS-HTB class 20 priority '2'
set qos policy shaper VyOS-HTB class 20 queue-type 'fair-queue'
set qos policy shaper VyOS-HTB class 30 bandwidth '10%'
set qos policy shaper VyOS-HTB class 30 description 'MC'
set qos policy shaper VyOS-HTB class 30 match-group 'Mission-Critical'
set qos policy shaper VyOS-HTB class 30 priority '3'
set qos policy shaper VyOS-HTB class 30 queue-type 'fair-queue'
set qos policy shaper VyOS-HTB default bandwidth '20%'
set qos policy shaper VyOS-HTB default queue-type 'fq-codel'
set qos traffic-match-group Mission-Critical match AF31 ip dscp 'AF31'
set qos traffic-match-group Mission-Critical match AF32 ip dscp 'AF42'
set qos traffic-match-group Mission-Critical match CS3 ip dscp 'CS3'
set qos traffic-match-group Streaming-Video match AF11 ip dscp 'AF11'
set qos traffic-match-group Streaming-Video match AF41 ip dscp 'AF41'
set qos traffic-match-group Streaming-Video match AF43 ip dscp 'AF43'
they are applied on tc-filter when we check it :
vyos@vyos# sudo tc filter show dev eth0
filter parent 1: protocol all pref 1 u32 chain 0
filter parent 1: protocol all pref 1 u32 chain 0 fh 800: ht divisor 1
filter parent 1: protocol all pref 1 u32 chain 0 fh 800::800 order 2048 key ht 800 bkt 0 flowid 1:a not_in_hw
match 00800000/00ff0000 at 0
filter parent 1: protocol all pref 1 u32 chain 0 fh 800::801 order 2049 key ht 800 bkt 0 flowid 1:a not_in_hw
match 00280000/00ff0000 at 0
filter parent 1: protocol all pref 1 u32 chain 0 fh 800::802 order 2050 key ht 800 bkt 0 flowid 1:a not_in_hw
match 00880000/00ff0000 at 0
filter parent 1: protocol all pref 1 u32 chain 0 fh 800::803 order 2051 key ht 800 bkt 0 flowid 1:a not_in_hw
match 00980000/00ff0000 at 0
filter parent 1: protocol all pref 1 u32 chain 0 fh 800::804 order 2052 key ht 800 bkt 0 flowid 1:a not_in_hw
match 00980000/00ff0000 at 0
action order 1: police 0x1 rate 300Mbit burst 15300b mtu 2Kb action reclassify overhead 0b
ref 1 bind 1
filter parent 1: protocol all pref 2 u32 chain 0
filter parent 1: protocol all pref 2 u32 chain 0 fh 801: ht divisor 1
filter parent 1: protocol all pref 2 u32 chain 0 fh 801::800 order 2048 key ht 801 bkt 0 flowid 1:14 not_in_hw
match 00b80000/00ff0000 at 0
filter parent 1: protocol all pref 2 u32 chain 0 fh 801::801 order 2049 key ht 801 bkt 0 flowid 1:14 not_in_hw
match 00b80000/00ff0000 at 0
action order 1: police 0x2 rate 300Mbit burst 15300b mtu 2Kb action reclassify overhead 0b
ref 1 bind 1
filter parent 1: protocol all pref 3 u32 chain 0
filter parent 1: protocol all pref 3 u32 chain 0 fh 802: ht divisor 1
filter parent 1: protocol all pref 3 u32 chain 0 fh 802::800 order 2048 key ht 802 bkt 0 flowid 1:1e not_in_hw
match 00680000/00ff0000 at 0
filter parent 1: protocol all pref 3 u32 chain 0 fh 802::801 order 2049 key ht 802 bkt 0 flowid 1:1e not_in_hw
match 00900000/00ff0000 at 0
filter parent 1: protocol all pref 3 u32 chain 0 fh 802::802 order 2050 key ht 802 bkt 0 flowid 1:1e not_in_hw
match 00600000/00ff0000 at 0
filter parent 1: protocol all pref 3 u32 chain 0 fh 802::803 order 2051 key ht 802 bkt 0 flowid 1:1e not_in_hw
match 00600000/00ff0000 at 0
action order 1: police 0x3 rate 100Mbit burst 15337b mtu 2Kb action reclassify overhead 0b
ref 1 bind 1
I would like to suggest to merge it only 1.5, so, users can feel comfortable with this new structure and wait for proper documentation.
interface-definitions/qos.xml.in
Outdated
<constraint> | ||
<regex>[^-].*</regex> | ||
</constraint> | ||
<constraintErrorMessage>Match group name cannot start with hyphen (-)</constraintErrorMessage> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need (-)
at the end?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
interface-definitions/qos.xml.in
Outdated
<constraint> | ||
<regex>[^-].*</regex> | ||
</constraint> | ||
<constraintErrorMessage>Match queue name cannot start with hyphen (-)</constraintErrorMessage> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need (-)
at the end?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I got this message from original match
node and just keep it structure
<constraintErrorMessage>Match queue name cannot start with hyphen (-)</constraintErrorMessage> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
added new syntax to work with class match filters in QoS policy
added new syntax to work with class match filters in QoS policy
Change Summary
Types of changes
Related Task(s)
Related PR(s)
Component(s) name
QoS
Proposed changes
Implemented the ability to create named match group and use this in QoS policy classes
Old match syntax is kept and tc filters from the
match
node are created first then tc filters from thematch-group
nodenew syntax to work with group:
Every policy class or traffic match group can contain several groups
Every group can contain several matches
Match in the group configured the same as match in the class excluded nodes
ether
interface
How to test
Create policy using old syntax:
delete existing policy
create same policy using new syntax
compare tc filters after old and new syntax
new:
old:
Smoketest result
Checklist: