Skip to content

[clear_qos] Fix the order of QOS_TABLE_NAMES to unbind QUEUE config using 'config qos clear' #694

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

amaneti
Copy link

@amaneti amaneti commented Oct 4, 2019

- What I did
(a)Unbind SCHEDULER config from QUEUE before removing SCHEDULER profile
(b)Unbind WRED config from QUEUE before removing WRED profile
- Why I did it
SCHEDULER, WRED and QUEUE configurations are not cleanedup by using the command "config qos clear".
- How I did it
Changed the order of QOS_TABLE_NAMES to be unconfigured with 'config qos clear' so that
SCHEDULER and WRED configurations are unbound from QUEUE, and then SCHEDULER and WRED profiles are removed.
- How to verify it
Test 1 Setup:
TgenPort1---Ethernet120--+DUT1+-- Ethernet0
TgenPort2---Ethernet121--+DUT1+
Test 1 Steps:
1a. Send line rate traffic from Ethernet120(Queue4) and Ethernet121(Queue3) towards Ethernet0 and Congestion occurs at the port Ethernet0 and packets dropped as per the default scheduler and queue config.

1b. Apply SCHEDULER config as below:
root@sonic:/home/admin# cat sched.json
{
"SCHEDULER": {
"scheduler.2": {
"type": "DWRR",
"weight": "20"
},
"scheduler.1": {
"type": "DWRR",
"weight": "50"
}
},
"QUEUE": {
"Ethernet0|3": {
"scheduler": "[SCHEDULER|scheduler.2]"
},
"Ethernet0|4": {
"scheduler": "[SCHEDULER|scheduler.1]"
}
}
}
root@sonic:/home/admin# config load sched.json
Load config from the file sched.json? [y/N]: y
Running command: /usr/local/bin/sonic-cfggen -j sched.json --write-to-db

1c. Verify that packets dropped as per the SCHEDULER and QUEUE config of sched.json
1d. Execute the command "config qos clear" to cleanup the config. Ensure that "show runningconfiguration all" doesn't show up any scheduler and queue config.
1e. Verify that packets are dropped as per the default config (as in Step 1a)

Test 2 Setup:
TgenPort1 -------------- Ethernet120 [DUT] Ethernet121 ------------ TgenPort2

Test 2 Steps:
2a. Send line rate traffic from Ethernet120(Queue3) towards Ethernet121. Check there are no WRED drops with default config.
2b. Apply the WRED config as below:
root@sonic:/home/admin# cat wred.json
{
"WRED_PROFILE": {
"AZURE_LOSSLESS" : {
"wred_green_enable" : "true",
"wred_yellow_enable" : "true",
"wred_red_enable" : "true",
"ecn" : "ecn_all",
"green_max_threshold" : "1000",
"green_min_threshold" : "100",
"yellow_max_threshold" : "2097152",
"yellow_min_threshold" : "1048576",
"red_max_threshold" : "2097152",
"red_min_threshold" : "1048576",
"green_drop_probability" : "100",
"yellow_drop_probability": "5",
"red_drop_probability" : "5"
}
},
"QUEUE": {
"Ethernet121|3": {
"wred_profile": "[WRED_PROFILE|AZURE_LOSSLESS]"
}
}
}
root@sonic:/home/admin# config load wred.json
Load config from the file wred.json? [y/N]: y
Running command: /usr/local/bin/sonic-cfggen -j wred.json --write-to-db

2c. Packet drops will be there due to WRED. Verify using 'show queue counters Ethernet121'
2d. Stop the traffic and execute "config qos clear"
2e. Ensure WRED_PROFILE configs are removed from "show runnningconfiguration all"
2f. Repeat the same traffic started in step 2b
2g. Check there are no WRED drops with default config.
-->

(a)Unbind SCHEDULER config from Queue before removing SCHEDULER profile
(a)Unbind WRED config from Queue before removing WREd profile
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant