Skip to content

Commit

Permalink
dereg acl-rule counters during acl-table del (sonic-net#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 Dec 16, 2022
1 parent b865352 commit 6185324
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 @@ -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)
{
Expand Down

0 comments on commit 6185324

Please sign in to comment.