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
5 changes: 2 additions & 3 deletions src/sonic_ax_impl/mibs/vendor/cisco/ciscoSwitchQosMIB.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,8 @@ def update_stats(self):

# The first half of queue id is for ucast, and second half is for mcast
# To simulate vendor OID, we wrap queues by max priority groups
port_max_queues = Namespace.dbs_get_all(self.db_conn, mibs.STATE_DB,
mibs.buffer_max_parm_table(self.oid_name_map[if_index]))['max_queues']
pq_count = math.ceil(int(port_max_queues) / 2)
pq_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'])

for queue in if_queues:
# Get queue type and statistics
Expand Down
6 changes: 3 additions & 3 deletions tests/mock_tables/asic0/state_db.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@
"state": "Active"
},
"BUFFER_MAX_PARAM_TABLE|Ethernet0": {
"max_queues": "16"
"max_priority_groups": "8"
},
"BUFFER_MAX_PARAM_TABLE|Ethernet4": {
"max_queues": "16"
"max_priority_groups": "8"
},
"BUFFER_MAX_PARAM_TABLE|Ethernet24": {
"max_queues": "16"
"max_priority_groups": "8"
}
}
6 changes: 3 additions & 3 deletions tests/mock_tables/asic1/state_db.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@
"state": "Established"
},
"BUFFER_MAX_PARAM_TABLE|Ethernet8": {
"max_queues": "16"
"max_priority_groups": "8"
},
"BUFFER_MAX_PARAM_TABLE|Ethernet12": {
"max_queues": "16"
"max_priority_groups": "8"
},
"BUFFER_MAX_PARAM_TABLE|Ethernet32": {
"max_queues": "16"
"max_priority_groups": "8"
}
}
6 changes: 3 additions & 3 deletions tests/mock_tables/asic2/state_db.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
"state": "Established"
},
"BUFFER_MAX_PARAM_TABLE|Ethernet-BP16": {
"max_queues": "16"
"max_priority_groups": "8"
},
"BUFFER_MAX_PARAM_TABLE|Ethernet-BP20": {
"max_queues": "16"
"max_priority_groups": "8"
},
"BUFFER_MAX_PARAM_TABLE|Ethernet40": {
"max_queues": "16"
"max_priority_groups": "8"
}
}
12 changes: 6 additions & 6 deletions tests/mock_tables/state_db.json
Original file line number Diff line number Diff line change
Expand Up @@ -197,21 +197,21 @@
"state" : "Deleted"
},
"BUFFER_MAX_PARAM_TABLE|Ethernet0": {
"max_queues": "16"
"max_priority_groups": "8"
},
"BUFFER_MAX_PARAM_TABLE|Ethernet4": {
"max_queues": "16"
"max_priority_groups": "8"
},
"BUFFER_MAX_PARAM_TABLE|Ethernet8": {
"max_queues": "16"
"max_priority_groups": "8"
},
"BUFFER_MAX_PARAM_TABLE|Ethernet16": {
"max_queues": "16"
"max_priority_groups": "8"
},
"BUFFER_MAX_PARAM_TABLE|Ethernet24": {
"max_queues": "16"
"max_priority_groups": "8"
},
"BUFFER_MAX_PARAM_TABLE|Ethernet32": {
"max_queues": "16"
"max_priority_groups": "8"
}
}
Loading