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 authored Apr 25, 2022
1 parent 841f003 commit 3d3364f
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 @@ -848,7 +848,10 @@ bool AclRule::createRule()
decreaseNextHopRefCount();
}

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

return (status == SAI_STATUS_SUCCESS);
}
Expand Down

0 comments on commit 3d3364f

Please sign in to comment.