Skip to content

Commit

Permalink
add incCrmAclUsedCounter and decCrmAclUsedCounter for SAI_ACL_BIND_PO…
Browse files Browse the repository at this point in the history
…INT_TYPE_SWITCH case. (#899)
  • Loading branch information
iris00522 authored and prsunny committed Jun 17, 2019
1 parent 825c0cb commit 4c771d0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions orchagent/aclorch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down Expand Up @@ -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);

Expand Down Expand Up @@ -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;
Expand All @@ -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;
Expand Down

0 comments on commit 4c771d0

Please sign in to comment.