From 4c771d01eb9df95260fb2106e9992cd4c125884f Mon Sep 17 00:00:00 2001 From: Iris Hsu Date: Mon, 17 Jun 2019 23:52:42 +0800 Subject: [PATCH] add incCrmAclUsedCounter and decCrmAclUsedCounter for SAI_ACL_BIND_POINT_TYPE_SWITCH case. (#899) --- orchagent/aclorch.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/orchagent/aclorch.cpp b/orchagent/aclorch.cpp index ac2eeca089eb..419af238abc0 100644 --- a/orchagent/aclorch.cpp +++ b/orchagent/aclorch.cpp @@ -2811,6 +2811,7 @@ sai_status_t AclOrch::createDTelWatchListTables() return status; } + gCrmOrch->incCrmAclUsedCounter(CrmResourceType::CRM_ACL_TABLE, SAI_ACL_STAGE_INGRESS, SAI_ACL_BIND_POINT_TYPE_SWITCH); m_AclTables[table_oid] = flowWLTable; SWSS_LOG_INFO("Successfully created ACL table %s, oid: %lX", flowWLTable.description.c_str(), table_oid); @@ -2871,6 +2872,7 @@ sai_status_t AclOrch::createDTelWatchListTables() return status; } + gCrmOrch->incCrmAclUsedCounter(CrmResourceType::CRM_ACL_TABLE, SAI_ACL_STAGE_INGRESS, SAI_ACL_BIND_POINT_TYPE_SWITCH); m_AclTables[table_oid] = dropWLTable; SWSS_LOG_INFO("Successfully created ACL table %s, oid: %lX", dropWLTable.description.c_str(), table_oid); @@ -2902,6 +2904,7 @@ sai_status_t AclOrch::deleteDTelWatchListTables() return status; } + gCrmOrch->decCrmAclUsedCounter(CrmResourceType::CRM_ACL_TABLE, SAI_ACL_STAGE_INGRESS, SAI_ACL_BIND_POINT_TYPE_SWITCH, table_oid); m_AclTables.erase(table_oid); table_id = TABLE_TYPE_DTEL_DROP_WATCHLIST; @@ -2921,6 +2924,7 @@ sai_status_t AclOrch::deleteDTelWatchListTables() return status; } + gCrmOrch->decCrmAclUsedCounter(CrmResourceType::CRM_ACL_TABLE, SAI_ACL_STAGE_INGRESS, SAI_ACL_BIND_POINT_TYPE_SWITCH, table_oid); m_AclTables.erase(table_oid); return SAI_STATUS_SUCCESS;