Skip to content
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

[202012] [cherry-pick] Apply DSCP_TO_TC_MAP from PORT_QOS_MAP|global to switch level #2328

Merged

Conversation

bingwang-ms
Copy link
Contributor

What I did
This PR is to cherry-pick #2314 to 202012 branch after resolving conflicts.

This PR is to update the code for applying switch level DSCP_TO_TC_MAP.
After PR sonic-net/sonic-buildimage#10565, there will be two DSCP_TO_TC_MAP

  • DSCP_TO_TC_MAP|AZURE is the default map, which is used at port level and switch level
  • DSCP_TO_TC_MAP|AZURE_TUNNEL is used to remap the priority of tunnel traffic in dualtor deployment

To address the issue, an entry PORT_QOS_MAP|global will be added into config_db

"PORT_QOS_MAP": {
        "global": {
            "dscp_to_tc_map": "[DSCP_TO_TC_MAP|AZURE]"
        }
}

The entry will be consumed by qosorch, and the specified map will be applied to switch.

Why I did it
This change is to ensure the correct DSCP_TO_TC_MAP is applied to switch level.

How I verified it
Verified by a new test case test_dscp_to_tc_map_applied_to_switch

collected 2 items                                                                                                                                                                                     

test_qos_map.py::TestDscpToTcMap::test_dscp_to_tc_map_applied_to_switch PASSED                                                                                                                  [ 50%]
test_qos_map.py::test_nonflaky_dummy PASSED                                                                                                                                                     [100%]

Details if related

Signed-off-by: bingwang <wang.bing@microsoft.com>
tests/test_qos_map.py Outdated Show resolved Hide resolved
orchagent/qosorch.cpp Show resolved Hide resolved
tests/test_qos_map.py Outdated Show resolved Hide resolved
@bingwang-ms bingwang-ms merged commit 475ae19 into sonic-net:202012 Jun 27, 2022
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.

2 participants