From 2acffef1572984d0f62d381352e90297d99dc265 Mon Sep 17 00:00:00 2001 From: Devesh P Pathak Date: Fri, 13 Sep 2024 13:38:19 -0700 Subject: [PATCH] Add support for PACKET_ACTION_COPY --- orchagent/aclorch.cpp | 1 + orchagent/aclorch.h | 1 + tests/mock_tests/aclorch_ut.cpp | 7 +++++++ 3 files changed, 9 insertions(+) diff --git a/orchagent/aclorch.cpp b/orchagent/aclorch.cpp index f8bf775868..b20b382009 100644 --- a/orchagent/aclorch.cpp +++ b/orchagent/aclorch.cpp @@ -122,6 +122,7 @@ static acl_packet_action_lookup_t aclPacketActionLookup = { { PACKET_ACTION_FORWARD, SAI_PACKET_ACTION_FORWARD }, { PACKET_ACTION_DROP, SAI_PACKET_ACTION_DROP }, + { PACKET_ACTION_COPY, SAI_PACKET_ACTION_COPY }, }; static acl_dtel_flow_op_type_lookup_t aclDTelFlowOpTypeLookup = diff --git a/orchagent/aclorch.h b/orchagent/aclorch.h index 5458e970be..be6c1f2af5 100644 --- a/orchagent/aclorch.h +++ b/orchagent/aclorch.h @@ -72,6 +72,7 @@ #define PACKET_ACTION_FORWARD "FORWARD" #define PACKET_ACTION_DROP "DROP" +#define PACKET_ACTION_COPY "COPY" #define PACKET_ACTION_REDIRECT "REDIRECT" #define PACKET_ACTION_DO_NOT_NAT "DO_NOT_NAT" diff --git a/tests/mock_tests/aclorch_ut.cpp b/tests/mock_tests/aclorch_ut.cpp index 4a92d65c80..351d523219 100644 --- a/tests/mock_tests/aclorch_ut.cpp +++ b/tests/mock_tests/aclorch_ut.cpp @@ -889,6 +889,13 @@ namespace aclorch_test return false; } } + else if (attr_value == PACKET_ACTION_COPY) + { + if (it->second.getSaiAttr().value.aclaction.parameter.s32 != SAI_PACKET_ACTION_COPY) + { + return false; + } + } else { // unknown attr_value