-
Notifications
You must be signed in to change notification settings - Fork 664
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update db_migrator to support
pfcwd_sw_enable
(#2087)
Signed-off-by: bingwang bingwang@microsoft.com What I did 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 field is required to specify on which queue to enable PFC watchdog. That is pfcwd_sw_enable. Field 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 Verified by UT Verified by copying the updated db_migrator.py to a SONiC box and run db_migrator.py -o migrate
- Loading branch information
1 parent
4010bd0
commit 9e2fbf4
Showing
4 changed files
with
115 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
tests/db_migrator_input/config_db/qos_map_table_expected.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
{ | ||
"VERSIONS|DATABASE": { | ||
"VERSION": "version_2_0_5" | ||
}, | ||
"PORT_QOS_MAP": { | ||
"Ethernet0": { | ||
"dscp_to_tc_map": "[DSCP_TO_TC_MAP|AZURE]", | ||
"pfc_enable": "3,4", | ||
"pfcwd_sw_enable": "3,4", | ||
"pfc_to_queue_map": "[MAP_PFC_PRIORITY_TO_QUEUE|AZURE]", | ||
"tc_to_pg_map": "[TC_TO_PRIORITY_GROUP_MAP|AZURE]", | ||
"tc_to_queue_map": "[TC_TO_QUEUE_MAP|AZURE]" | ||
}, | ||
"Ethernet100": { | ||
"dscp_to_tc_map": "[DSCP_TO_TC_MAP|AZURE]", | ||
"pfc_enable": "3,4", | ||
"pfcwd_sw_enable": "3,4", | ||
"pfc_to_queue_map": "[MAP_PFC_PRIORITY_TO_QUEUE|AZURE]", | ||
"tc_to_pg_map": "[TC_TO_PRIORITY_GROUP_MAP|AZURE]", | ||
"tc_to_queue_map": "[TC_TO_QUEUE_MAP|AZURE]" | ||
}, | ||
"Ethernet92": { | ||
"dscp_to_tc_map": "[DSCP_TO_TC_MAP|AZURE]", | ||
"pfc_to_queue_map": "[MAP_PFC_PRIORITY_TO_QUEUE|AZURE]", | ||
"tc_to_pg_map": "[TC_TO_PRIORITY_GROUP_MAP|AZURE]", | ||
"tc_to_queue_map": "[TC_TO_QUEUE_MAP|AZURE]" | ||
}, | ||
"Ethernet96": { | ||
"dscp_to_tc_map": "[DSCP_TO_TC_MAP|AZURE]", | ||
"pfc_to_queue_map": "[MAP_PFC_PRIORITY_TO_QUEUE|AZURE]", | ||
"tc_to_pg_map": "[TC_TO_PRIORITY_GROUP_MAP|AZURE]", | ||
"tc_to_queue_map": "[TC_TO_QUEUE_MAP|AZURE]" | ||
} | ||
} | ||
} | ||
|
34 changes: 34 additions & 0 deletions
34
tests/db_migrator_input/config_db/qos_map_table_input.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
{ | ||
"VERSIONS|DATABASE": { | ||
"VERSION": "version_2_0_4" | ||
}, | ||
"PORT_QOS_MAP": { | ||
"Ethernet0": { | ||
"dscp_to_tc_map": "[DSCP_TO_TC_MAP|AZURE]", | ||
"pfc_enable": "3,4", | ||
"pfc_to_queue_map": "[MAP_PFC_PRIORITY_TO_QUEUE|AZURE]", | ||
"tc_to_pg_map": "[TC_TO_PRIORITY_GROUP_MAP|AZURE]", | ||
"tc_to_queue_map": "[TC_TO_QUEUE_MAP|AZURE]" | ||
}, | ||
"Ethernet100": { | ||
"dscp_to_tc_map": "[DSCP_TO_TC_MAP|AZURE]", | ||
"pfc_enable": "3,4", | ||
"pfc_to_queue_map": "[MAP_PFC_PRIORITY_TO_QUEUE|AZURE]", | ||
"tc_to_pg_map": "[TC_TO_PRIORITY_GROUP_MAP|AZURE]", | ||
"tc_to_queue_map": "[TC_TO_QUEUE_MAP|AZURE]" | ||
}, | ||
"Ethernet92": { | ||
"dscp_to_tc_map": "[DSCP_TO_TC_MAP|AZURE]", | ||
"pfc_to_queue_map": "[MAP_PFC_PRIORITY_TO_QUEUE|AZURE]", | ||
"tc_to_pg_map": "[TC_TO_PRIORITY_GROUP_MAP|AZURE]", | ||
"tc_to_queue_map": "[TC_TO_QUEUE_MAP|AZURE]" | ||
}, | ||
"Ethernet96": { | ||
"dscp_to_tc_map": "[DSCP_TO_TC_MAP|AZURE]", | ||
"pfc_to_queue_map": "[MAP_PFC_PRIORITY_TO_QUEUE|AZURE]", | ||
"tc_to_pg_map": "[TC_TO_PRIORITY_GROUP_MAP|AZURE]", | ||
"tc_to_queue_map": "[TC_TO_QUEUE_MAP|AZURE]" | ||
} | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters