From 7019a19ee92de27a502b7bdd734f39ca893759fb Mon Sep 17 00:00:00 2001 From: tomeri Date: Mon, 2 Aug 2021 14:47:25 +0000 Subject: [PATCH] [PORTSORCH] Remove buffer drop counter when port is removed Signed-off-by: tomeri --- orchagent/portsorch.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/orchagent/portsorch.cpp b/orchagent/portsorch.cpp index b586704515..23b72dd061 100755 --- a/orchagent/portsorch.cpp +++ b/orchagent/portsorch.cpp @@ -2423,6 +2423,13 @@ void PortsOrch::deInitPort(string alias, sai_object_id_t port_id) { port_stat_manager.clearCounterIdList(p.m_port_id); } + + if (flex_counters_orch->getPortBufferDropCountersState()) + { + port_buffer_drop_stat_manager.clearCounterIdList(p.m_port_id); + } + + /* remove port name map from counter table */ m_counter_db->hdel(COUNTERS_PORT_NAME_MAP, alias);