From 8106d38a6ed57ba72c3ebd77d96093e7eab3170c Mon Sep 17 00:00:00 2001 From: Volodymyr Samotiy Date: Thu, 29 Dec 2022 11:46:29 +0200 Subject: [PATCH] [202205_1_rc] [202205] [ACL] dereg acl-rule counters during acl-table del (#2574) --- orchagent/aclorch.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/orchagent/aclorch.cpp b/orchagent/aclorch.cpp index 2f456b7924..3422b77269 100644 --- a/orchagent/aclorch.cpp +++ b/orchagent/aclorch.cpp @@ -2525,6 +2525,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) {