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

Fix SNMP QoS MIB only shows queues 1-6 on platform with 8 ucast/4 mcast queues #329

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/sonic_ax_impl/mibs/vendor/cisco/ciscoSwitchQosMIB.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,13 @@ def update_stats(self):
if pq_count < max_queues_half:
pq_count = max_queues_half

# If there is a max_priority_group param in statedb, use that if it is greater
priority_group_count = int(Namespace.dbs_get_all(self.db_conn, mibs.STATE_DB,
mibs.buffer_max_parm_table(self.oid_name_map[if_index]))['max_priority_groups'])

if(pq_count < priority_group_count):
pq_count = priority_group_count

for queue in if_queues:
# Get queue type and statistics
queue_sai_oid = self.port_queues_map[mibs.queue_key(if_index, queue)]
Expand Down
3 changes: 3 additions & 0 deletions tests/mock_tables/asic0/state_db.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,15 @@
"state": "Active"
},
"BUFFER_MAX_PARAM_TABLE|Ethernet0": {
"max_priority_groups": "8",
"max_queues": "16"
},
"BUFFER_MAX_PARAM_TABLE|Ethernet4": {
"max_priority_groups": "8",
"max_queues": "16"
},
"BUFFER_MAX_PARAM_TABLE|Ethernet24": {
"max_priority_groups": "8",
"max_queues": "16"
}
}
3 changes: 3 additions & 0 deletions tests/mock_tables/asic1/state_db.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,15 @@
"state": "Established"
},
"BUFFER_MAX_PARAM_TABLE|Ethernet8": {
"max_priority_groups": "8",
"max_queues": "16"
},
"BUFFER_MAX_PARAM_TABLE|Ethernet12": {
"max_priority_groups": "8",
"max_queues": "16"
},
"BUFFER_MAX_PARAM_TABLE|Ethernet32": {
"max_priority_groups": "8",
"max_queues": "16"
}
}
3 changes: 3 additions & 0 deletions tests/mock_tables/asic2/state_db.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,15 @@
"state": "Established"
},
"BUFFER_MAX_PARAM_TABLE|Ethernet-BP16": {
"max_priority_groups": "8",
"max_queues": "16"
},
"BUFFER_MAX_PARAM_TABLE|Ethernet-BP20": {
"max_priority_groups": "8",
"max_queues": "16"
},
"BUFFER_MAX_PARAM_TABLE|Ethernet40": {
"max_priority_groups": "8",
"max_queues": "16"
}
}
17 changes: 12 additions & 5 deletions tests/mock_tables/state_db.json
Original file line number Diff line number Diff line change
Expand Up @@ -197,24 +197,31 @@
"state" : "Deleted"
},
"BUFFER_MAX_PARAM_TABLE|Ethernet0": {
"max_queues": "16"
"max_queues": "16",
"max_priority_groups": "8"
},
"BUFFER_MAX_PARAM_TABLE|Ethernet4": {
"max_queues": "16"
"max_queues": "16",
"max_priority_groups": "8"
},
"BUFFER_MAX_PARAM_TABLE|Ethernet8": {
"max_queues": "16"
"max_queues": "16",
"max_priority_groups": "8"
},
"BUFFER_MAX_PARAM_TABLE|Ethernet16": {
"max_queues": "16"
"max_queues": "16",
"max_priority_groups": "8"
},
"BUFFER_MAX_PARAM_TABLE|Ethernet24": {
"max_queues": "16"
"max_queues": "16",
"max_priority_groups": "8"
},
"BUFFER_MAX_PARAM_TABLE|Ethernet32": {
"max_priority_groups": "8",
"max_queues": "16"
},
"BUFFER_MAX_PARAM_TABLE|Ethernet78": {
"max_priority_groups": "8",
"max_queues": "16"
}
}
Loading