diff --git a/orchagent/aclorch.cpp b/orchagent/aclorch.cpp index 955f136393..2f456b7924 100644 --- a/orchagent/aclorch.cpp +++ b/orchagent/aclorch.cpp @@ -3089,6 +3089,7 @@ void AclOrch::initDefaultTableTypes() builder.withName(TABLE_TYPE_DROP) .withBindPointType(SAI_ACL_BIND_POINT_TYPE_PORT) .withMatch(make_shared(SAI_ACL_TABLE_ATTR_FIELD_TC)) + .withMatch(make_shared(SAI_ACL_TABLE_ATTR_FIELD_IN_PORTS)) .build() ); diff --git a/orchagent/aclorch.h b/orchagent/aclorch.h index 3a71fa7f6c..af9e948a3b 100644 --- a/orchagent/aclorch.h +++ b/orchagent/aclorch.h @@ -93,6 +93,7 @@ #define MLNX_MAX_RANGES_COUNT 16 #define INGRESS_TABLE_DROP "IngressTableDrop" +#define EGRESS_TABLE_DROP "EgressTableDrop" #define RULE_OPER_ADD 0 #define RULE_OPER_DELETE 1 diff --git a/orchagent/muxorch.cpp b/orchagent/muxorch.cpp index 623fd6342d..828a0f44a3 100644 --- a/orchagent/muxorch.cpp +++ b/orchagent/muxorch.cpp @@ -49,6 +49,13 @@ extern sai_router_interface_api_t* sai_router_intfs_api; #define MUX_HW_STATE_UNKNOWN "unknown" #define MUX_HW_STATE_ERROR "error" + +static inline bool isIngressAcl() +{ + string platform = getenv("platform") ? getenv("platform") : ""; + return platform != MLNX_PLATFORM_SUBSTRING; +} + const map, MuxStateChange> muxStateTransition = { { { MuxState::MUX_STATE_INIT, MuxState::MUX_STATE_ACTIVE}, MuxStateChange::MUX_STATE_INIT_ACTIVE @@ -767,7 +774,7 @@ MuxAclHandler::MuxAclHandler(sai_object_id_t port, string alias) SWSS_LOG_ENTER(); // There is one handler instance per MUX port - string table_name = MUX_ACL_TABLE_NAME; + string table_name = isIngressAcl() ? MUX_ACL_TABLE_NAME : EGRESS_TABLE_DROP; string rule_name = MUX_ACL_RULE_NAME; port_ = port; @@ -805,7 +812,7 @@ MuxAclHandler::MuxAclHandler(sai_object_id_t port, string alias) MuxAclHandler::~MuxAclHandler(void) { SWSS_LOG_ENTER(); - string table_name = MUX_ACL_TABLE_NAME; + string table_name = isIngressAcl() ? MUX_ACL_TABLE_NAME : EGRESS_TABLE_DROP; string rule_name = MUX_ACL_RULE_NAME; SWSS_LOG_NOTICE("Un-Binding port %" PRIx64 "", port_); @@ -851,7 +858,7 @@ void MuxAclHandler::createMuxAclTable(sai_object_id_t port, string strTable) auto dropType = gAclOrch->getAclTableType(TABLE_TYPE_DROP); assert(dropType); acl_table.validateAddType(*dropType); - acl_table.stage = ACL_STAGE_INGRESS; + acl_table.stage = isIngressAcl() ? ACL_STAGE_INGRESS : ACL_STAGE_EGRESS; gAclOrch->addAclTable(acl_table); bindAllPorts(acl_table); }