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

[cherry-pick][202012] Update db_migrator to support pfcwd_sw_enable #2160

Merged
merged 2 commits into from
Jun 2, 2022

Conversation

bingwang-ms
Copy link
Contributor

Signed-off-by: bingwang wang.bing@microsoft.com

What I did

This PR is to cherry-pick changes in PR #2087 to 202012 branch after resolving conflicts.
This PR is to update db_migrator to support pfcwd_sw_enable.
Currently, table pfc_enable is to specify on which queue to enable PFC and pfc watchdog. As we are going to add two extra lossless queues on which on watchdog is enable(HLD sonic-net/SONiC#950), a new table is required to specify on which queue to enable PFC watchdog. That is pfcwd_sw_enable.

Table Description
pfc_enable Specify on which queues to enable PFC
pfcwd_sw_enable Specify on which queues to enable software PFC watchdog

HLD DSCP remapping

Change in orchagent Update orchagent to support new field pfcwd_sw_enable

How I did it

Update db_migrator.

How to verify it

  1. Verified by UT
python3 setup.py test --addopts tests/db_migrator_test.py 

===================================================================================================================== test session starts ======================================================================================================================
platform linux -- Python 3.7.3, pytest-3.10.1, py-1.7.0, pluggy-0.8.0
rootdir: /sonic/src/sonic-utilities/tests, inifile: pytest.ini
plugins: cov-2.6.0
collected 75 items                                                                                                                                                                                                                                             

tests/db_migrator_test.py ...........................................................................                                                                                                                                                    [100%]

================================================================================================================== 75 passed in 16.75 seconds ==================================================================================================================
  1. Verified by copying the updated db_migrator.py to a SONiC box and run db_migrator.py -o migrate

Previous command output (if the output of a command-line utility has changed)

New command output (if the output of a command-line utility has changed)

Signed-off-by: bingwang <wang.bing@microsoft.com>
@neethajohn neethajohn requested a review from stephenxs May 31, 2022 19:42
scripts/db_migrator.py Outdated Show resolved Hide resolved
scripts/db_migrator.py Outdated Show resolved Hide resolved
tests/db_migrator_input/config_db/qos_map_table_input.json Outdated Show resolved Hide resolved
Signed-off-by: bingwang <wang.bing@microsoft.com>
@bingwang-ms bingwang-ms force-pushed the pfc_enable_table_202012 branch from fc326b9 to a7cea85 Compare June 1, 2022 10:21
@bingwang-ms bingwang-ms merged commit 74bf951 into sonic-net:202012 Jun 2, 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