From 6185324fe7aeb2d6568b6c1162aa64dac586a759 Mon Sep 17 00:00:00 2001 From: Vivek Date: Fri, 16 Dec 2022 14:12:21 -0800 Subject: [PATCH] dereg acl-rule counters during acl-table del (#2574) *Deleting ACL Tables deletes all the associated Rules but it doesn't delete the associated counters. --- orchagent/aclorch.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/orchagent/aclorch.cpp b/orchagent/aclorch.cpp index 9d2fb1de2e46..7efae768cddf 100644 --- a/orchagent/aclorch.cpp +++ b/orchagent/aclorch.cpp @@ -2588,6 +2588,12 @@ bool AclTable::clear() for (auto& rulepair: rules) { auto& rule = *rulepair.second; + + if (rule.hasCounter()) + { + m_pAclOrch->deregisterFlexCounter(rule); + } + bool suc = rule.remove(); if (!suc) {