diff --git a/src/sonic_ax_impl/mibs/vendor/cisco/ciscoSwitchQosMIB.py b/src/sonic_ax_impl/mibs/vendor/cisco/ciscoSwitchQosMIB.py index 7e5988ad3..a3d50379f 100644 --- a/src/sonic_ax_impl/mibs/vendor/cisco/ciscoSwitchQosMIB.py +++ b/src/sonic_ax_impl/mibs/vendor/cisco/ciscoSwitchQosMIB.py @@ -139,7 +139,7 @@ def update_stats(self): # To simulate vendor OID, we wrap queues by max priority groups port_max_queues = self.statedb.get_all(self.statedb.STATE_DB, mibs.buffer_max_parm_table(self.oid_name_map[if_index]))['max_queues'] - pq_count = math.ceil((port_max_queues + 1) / 2) + pq_count = math.ceil(int(port_max_queues) / 2) for queue in if_queues: # Get queue type and statistics diff --git a/tests/mock_tables/global_db/state_db.json b/tests/mock_tables/global_db/state_db.json index 0674d83ab..ed5387890 100644 --- a/tests/mock_tables/global_db/state_db.json +++ b/tests/mock_tables/global_db/state_db.json @@ -123,5 +123,23 @@ "TEMPERATURE_INFO|thermal1": { "temperature": "20.5", "is_replaceable": "False" + }, + "BUFFER_MAX_PARAM_TABLE|Ethernet0": { + "max_queues": "16" + }, + "BUFFER_MAX_PARAM_TABLE|Ethernet4": { + "max_queues": "16" + }, + "BUFFER_MAX_PARAM_TABLE|Ethernet8": { + "max_queues": "16" + }, + "BUFFER_MAX_PARAM_TABLE|Ethernet12": { + "max_queues": "16" + }, + "BUFFER_MAX_PARAM_TABLE|Ethernet-BP16": { + "max_queues": "16" + }, + "BUFFER_MAX_PARAM_TABLE|Ethernet-BP20": { + "max_queues": "16" } } diff --git a/tests/mock_tables/state_db.json b/tests/mock_tables/state_db.json index 49519a64c..1235c9815 100644 --- a/tests/mock_tables/state_db.json +++ b/tests/mock_tables/state_db.json @@ -198,5 +198,11 @@ }, "BUFFER_MAX_PARAM_TABLE|Ethernet0": { "max_queues": "16" + }, + "BUFFER_MAX_PARAM_TABLE|Ethernet4": { + "max_queues": "16" + }, + "BUFFER_MAX_PARAM_TABLE|Ethernet8": { + "max_queues": "16" } }