Fix missing queues in SNMP MIB when create_only_db_buffers=true (test_snmp_queue_counters.py)#340
Open
dgodwin-nokia wants to merge 1 commit into
Open
Conversation
This will fix current failure in test_snmp_queue_counters.py on platforms which have a different number of unicast and multicast queue (example Tomahawk4 with 8 unicast and 4 multicast queues configured) What I did: Added some additional logic on top of changes made in sonic-net#330 to also check for "max_priority_groups" in buffer_parms, and use it to loop through queues if it is greater than max_queues/2 (only 6 on TH4 platform which is what was fixed in sonic-net#330) and greater than the count of UNICAST queues in the DB. How I verified: Logic should not break other platforms. Verified on Nokia H4-64D. Reran all SNMP tests in mgmt and they pass including test_snmp_queue_counters.py
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
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.
- What I did
This will fix current failure in test_snmp_queue_counters.py on platforms which have a different number of unicast and multicast queue (example Tomahawk4 with 8 unicast and 4 multicast queues configured)
- How I did it
Without these changes, when create_only_db_buffers=true and some intermediary interface queues are removed, SNMP MIB will be missing queues that are configured.
The test failure specifically sees queues 1-7 on Ethernet0, then removes queues 3-4 on Ethernet0. Subsequent MIB polling returns only queues 1,2,5,6 (Missing queue 7).
Added some additional logic on top of changes made in #330 to also check for "max_priority_groups" in buffer_parms, and use it to loop through queues if it is greater than max_queues/2 (only 6 on TH4 platform which is what was fixed in #330) and greater than the count of UNICAST queues in the DB.
- How to verify it
Logic should not break other platforms. Verified on Nokia H4-64D. Reran all SNMP tests in mgmt and they pass including
test_snmp_queue_counters.py
- Description for the changelog
Fix missing queues in SNMP MIB when create_only_db_buffers=true