From 37b10013b18c5bc8550f722e5c1f66f763396e6d Mon Sep 17 00:00:00 2001 From: Kebo Liu Date: Thu, 12 Jul 2018 02:43:00 +0800 Subject: [PATCH] [Aclorch] fix Acl bind point type issue (#516) * [aclorch] fix acl bind point type issue * add support for vlan bind point type support * Revert "add support for vlan bind point type support" This reverts commit e026cc1c48a3abd6d6fe9b449af7e5b3d37a461d. --- orchagent/aclorch.cpp | 39 ++------------------------------------- 1 file changed, 2 insertions(+), 37 deletions(-) diff --git a/orchagent/aclorch.cpp b/orchagent/aclorch.cpp index fc9e7738f8c1..f7aa2eb842e5 100644 --- a/orchagent/aclorch.cpp +++ b/orchagent/aclorch.cpp @@ -952,43 +952,7 @@ bool AclTable::create() sai_attribute_t attr; vector table_attrs; - - int32_t range_types_list[] = - { SAI_ACL_RANGE_TYPE_L4_DST_PORT_RANGE, - SAI_ACL_RANGE_TYPE_L4_SRC_PORT_RANGE - }; - - set binds; - for (const auto& portid_pair : ports) - { - Port port; - if (!gPortsOrch->getPort(portid_pair.first, port)) - { - continue; - } - - switch (port.m_type) - { - case Port::PHY: - binds.insert(SAI_ACL_BIND_POINT_TYPE_PORT); - break; - case Port::VLAN: - binds.insert(SAI_ACL_BIND_POINT_TYPE_VLAN); - break; - case Port::LAG: - binds.insert(SAI_ACL_BIND_POINT_TYPE_LAG); - break; - default: - return SAI_STATUS_FAILURE; - } - } - - vector bpoint_list; - for (auto bind : binds) - { - bpoint_list.push_back(bind); - } - + vector bpoint_list = { SAI_ACL_BIND_POINT_TYPE_PORT, SAI_ACL_BIND_POINT_TYPE_LAG }; attr.id = SAI_ACL_TABLE_ATTR_ACL_BIND_POINT_TYPE_LIST; attr.value.s32list.count = static_cast(bpoint_list.size()); attr.value.s32list.list = bpoint_list.data(); @@ -1060,6 +1024,7 @@ bool AclTable::create() if(stage == ACL_STAGE_INGRESS) { + int32_t range_types_list[] = { SAI_ACL_RANGE_TYPE_L4_DST_PORT_RANGE, SAI_ACL_RANGE_TYPE_L4_SRC_PORT_RANGE }; attr.id = SAI_ACL_TABLE_ATTR_FIELD_ACL_RANGE_TYPE; attr.value.s32list.count = (uint32_t)(sizeof(range_types_list) / sizeof(range_types_list[0])); attr.value.s32list.list = range_types_list;