diff --git a/orchagent/aclorch.cpp b/orchagent/aclorch.cpp index fc9e7738f8..f7aa2eb842 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;