Skip to content

Commit 51d3550

Browse files
authored
Fix issues in clear_qos (#2122)
- What I did Fix issues in clear_qos 1. Remove tables BUFFER_PORT_INGRESS_PROFILE_LIST and BUFFER_PORT_EGRESS_PROFILE_LIST When clear_qos is executed, all QoS- and buffer-related tables should be removed. Currently, both tables are missed. This is to fix it. 2. Adjust the order in which the buffer and QoS tables are removed Remove the tables whose entries depend on other tables first and then the tables whose entries are referenced by other tables. Any object can be removed from SAI only if there is no object referencing it. There are retrying and dependency-tracking mechanisms to guarantee it in orchagent. If CLI operates the table in an order where the referencing tables removed first before referenced tables, it is possible to reduce the probability to retry theoretically. The order does not guarantee it but adjusting the order is almost zero-cost so we would like to do it. - How I did it - How to verify it Signed-off-by: Stephen Sun [email protected]
1 parent 6d3aa1e commit 51d3550

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

config/main.py

+6-4
Original file line numberDiff line numberDiff line change
@@ -635,21 +635,23 @@ def _clear_cbf():
635635

636636
def _clear_qos():
637637
QOS_TABLE_NAMES = [
638+
'PORT_QOS_MAP',
639+
'QUEUE',
638640
'TC_TO_PRIORITY_GROUP_MAP',
639641
'MAP_PFC_PRIORITY_TO_QUEUE',
640642
'TC_TO_QUEUE_MAP',
641643
'DSCP_TO_TC_MAP',
642644
'MPLS_TC_TO_TC_MAP',
643645
'SCHEDULER',
644646
'PFC_PRIORITY_TO_PRIORITY_GROUP_MAP',
645-
'PORT_QOS_MAP',
646647
'WRED_PROFILE',
647-
'QUEUE',
648648
'CABLE_LENGTH',
649-
'BUFFER_POOL',
650-
'BUFFER_PROFILE',
651649
'BUFFER_PG',
652650
'BUFFER_QUEUE',
651+
'BUFFER_PORT_INGRESS_PROFILE_LIST',
652+
'BUFFER_PORT_EGRESS_PROFILE_LIST',
653+
'BUFFER_PROFILE',
654+
'BUFFER_POOL',
653655
'DEFAULT_LOSSLESS_BUFFER_PARAMETER',
654656
'LOSSLESS_TRAFFIC_PATTERN']
655657

0 commit comments

Comments
 (0)