Skip to content

Commit

Permalink
[ACL]Avoid incrementing crm count when ACL rule create fails (sonic-n…
Browse files Browse the repository at this point in the history
…et#2238)

* [ACL]Avoid incrementing crm count when ACL rule create fails
  • Loading branch information
dgsudharsan committed May 4, 2022
1 parent 7377901 commit 614711c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion orchagent/aclorch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -566,7 +566,10 @@ bool AclRule::create()
decreaseNextHopRefCount();
}

gCrmOrch->incCrmAclTableUsedCounter(CrmResourceType::CRM_ACL_ENTRY, m_tableOid);
if (status == SAI_STATUS_SUCCESS)
{
gCrmOrch->incCrmAclTableUsedCounter(CrmResourceType::CRM_ACL_ENTRY, m_tableOid);
}

return (status == SAI_STATUS_SUCCESS);
}
Expand Down

0 comments on commit 614711c

Please sign in to comment.