Skip to content

Commit 6185324

Browse files
authored
dereg acl-rule counters during acl-table del (sonic-net#2574)
*Deleting ACL Tables deletes all the associated Rules but it doesn't delete the associated counters.
1 parent b865352 commit 6185324

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

orchagent/aclorch.cpp

+6
Original file line numberDiff line numberDiff line change
@@ -2588,6 +2588,12 @@ bool AclTable::clear()
25882588
for (auto& rulepair: rules)
25892589
{
25902590
auto& rule = *rulepair.second;
2591+
2592+
if (rule.hasCounter())
2593+
{
2594+
m_pAclOrch->deregisterFlexCounter(rule);
2595+
}
2596+
25912597
bool suc = rule.remove();
25922598
if (!suc)
25932599
{

0 commit comments

Comments
 (0)