-
Notifications
You must be signed in to change notification settings - Fork 665
[action] [PR:3982] [DPB]: Fix stale queue counter maps in COUNTERS_DB after port breakout #4109
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
Merged
Conversation
This file contains hidden or 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
Fixes sonic-net#3983 **What I did** Added cleanup of COUNTERS_*_NAME_MAP entries for a port during its deinit phase, and regenerated the NAME_MAP tables with fresh OIDs during port init when queue flex counters are already enabled. **Why I did it** After dynamic port breakout of a port, queue name map tables in the COUNTERS_DB table are not regenerated leaving stale entries resulting in CLI crash **How I verified it** ```bash # show queue counters Ethernet0 For namespace : Port TxQ Counter/pkts Counter/bytes Drop/pkts Drop/bytes --------- ----- -------------- --------------- ----------- ------------ Ethernet0 UC0 0 0 0 0 Ethernet0 UC1 0 0 0 0 Ethernet0 UC2 0 0 0 0 Ethernet0 UC3 0 0 0 0 Ethernet0 UC4 0 0 0 0 Ethernet0 UC5 0 0 0 0 Ethernet0 UC6 0 0 0 0 Ethernet0 UC7 0 0 0 0 root@sonic:~# redis-dump -d 2 -k "COUNTERS_PORT_NAME_MAP*" | jq | grep Ethernet448 "Ethernet448": "oid:0x100000000085c", root@sonic:~# redis-dump -d 2 -k "COUNTERS_QUEUE_PORT_MAP*" | jq | grep 0x100000000085c "oid:0x15000000000860": "oid:0x100000000085c", "oid:0x15000000000861": "oid:0x100000000085c", "oid:0x15000000000862": "oid:0x100000000085c", "oid:0x15000000000863": "oid:0x100000000085c", "oid:0x15000000000864": "oid:0x100000000085c", "oid:0x1500000000085d": "oid:0x100000000085c", "oid:0x1500000000085f": "oid:0x100000000085c", "oid:0x1500000000085e": "oid:0x100000000085c", root@sonic:~# redis-dump -d 2 -k "COUNTERS_QUEUE_NAME_MAP*" | jq | grep -E "0x15000000000860|0x15000000000861|0x15000000000862|0x15000000000863|0x15000000000864|0x1500000000085d|0x1500000000085f|0x1500000000085e" "Ethernet448:6": "oid:0x15000000000863", "Ethernet448:2": "oid:0x1500000000085f", "Ethernet448:4": "oid:0x15000000000861", "Ethernet448:7": "oid:0x15000000000864", "Ethernet448:3": "oid:0x15000000000860", "Ethernet448:0": "oid:0x1500000000085d", "Ethernet448:5": "oid:0x15000000000862", "Ethernet448:1": "oid:0x1500000000085e", root@sonic:~# redis-dump -d 2 -k "COUNTERS_QUEUE_INDEX_MAP*" | jq | grep -E "0x15000000000860|0x15000000000861|0x15000000000862|0x15000000000863|0x15000000000864|0x1500000000085d|0x1500000000085f|0x1500000000085e" "oid:0x15000000000860": "3", "oid:0x15000000000861": "4", "oid:0x15000000000862": "5", "oid:0x15000000000863": "6", "oid:0x15000000000864": "7", "oid:0x1500000000085d": "0", "oid:0x1500000000085f": "2", "oid:0x1500000000085e": "1", root@sonic:~# redis-dump -d 2 -k "COUNTERS_QUEUE_TYPE_MAP*" | jq | grep -E "0x15000000000860|0x15000000000861|0x15000000000862|0x15000000000863|0x15000000000864|0x1500000000085d|0x1500000000085f|0x1500000000085e" "oid:0x15000000000860": "SAI_QUEUE_TYPE_UNICAST", "oid:0x15000000000861": "SAI_QUEUE_TYPE_UNICAST", "oid:0x15000000000862": "SAI_QUEUE_TYPE_UNICAST", "oid:0x15000000000863": "SAI_QUEUE_TYPE_UNICAST", "oid:0x15000000000864": "SAI_QUEUE_TYPE_UNICAST", "oid:0x1500000000085d": "SAI_QUEUE_TYPE_UNICAST", "oid:0x1500000000085f": "SAI_QUEUE_TYPE_UNICAST", "oid:0x1500000000085e": "SAI_QUEUE_TYPE_UNICAST", ``` **Details if related**
Collaborator
Author
|
Original PR: #3982 |
Collaborator
Author
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Contributor
|
/azp run |
Contributor
|
@rajkumar1-arista, could you check the PR failure? |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #3983
What I did
Added cleanup of COUNTERS_*_NAME_MAP entries for a port during its deinit phase, and regenerated the NAME_MAP tables with fresh OIDs during port init when queue flex counters are already enabled.
Why I did it
After dynamic port breakout of a port, queue name map tables in the COUNTERS_DB table are not regenerated leaving stale entries resulting in CLI crash
How I verified it
Details if related