Skip to content

Commit 4912a77

Browse files
authored
Remove buffer drop counter when port is removed (#1860)
- What I did I added the removal of port buffer drop counter on the deinit port flow. it was added to the deInitPort function. - Why I did it the buffer drop counter was never removed when port was deleted. this flex counter was create on the initPort function but it was removed when the port was deleted - How I verified it removed and created a port and check the FLEX_COUNTER redis table FLEX_COUNTER_TABLE:PORT_BUFFER_DROP_STAT table
1 parent f9462c4 commit 4912a77

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

orchagent/portsorch.cpp

+7
Original file line numberDiff line numberDiff line change
@@ -2423,6 +2423,13 @@ void PortsOrch::deInitPort(string alias, sai_object_id_t port_id)
24232423
{
24242424
port_stat_manager.clearCounterIdList(p.m_port_id);
24252425
}
2426+
2427+
if (flex_counters_orch->getPortBufferDropCountersState())
2428+
{
2429+
port_buffer_drop_stat_manager.clearCounterIdList(p.m_port_id);
2430+
}
2431+
2432+
24262433
/* remove port name map from counter table */
24272434
m_counter_db->hdel(COUNTERS_PORT_NAME_MAP, alias);
24282435

0 commit comments

Comments
 (0)