Skip to content

Commit

Permalink
dereg acl-rule counters during acl-table del (#2574)
Browse files Browse the repository at this point in the history
*Deleting ACL Tables deletes all the associated Rules but it doesn't delete the associated counters.
  • Loading branch information
vivekrnv authored and StormLiangMS committed Feb 10, 2023
1 parent ae68054 commit 5209c42
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions orchagent/aclorch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2514,6 +2514,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)
{
Expand Down

0 comments on commit 5209c42

Please sign in to comment.