From cfcd40c0a0e530cc7ea6aa9d412946c6eb09fdfe Mon Sep 17 00:00:00 2001 From: Rajkumar-Marvell <54936542+rajkumar38@users.noreply.github.com> Date: Mon, 27 Feb 2023 23:54:41 +0530 Subject: [PATCH] [aclorch] Fixed issue #2204.Support IN_PORTS qualifer in MIRRORV6 table. (#2668) What I did Fixed issue #2204 Why I did it Community test case "sonic-mgmt/tests/everflow/everflow/test_everflow_per_interface.py::test_everflow_per_interface[ipv6]" fails for IPV6 traffic with below error. Feb 15 09:06:44.205490 sonic ERR swss#orchagent: :- validateAclRuleMatch: Match SAI_ACL_ENTRY_ATTR_FIELD_IN_PORTS in rule RULE_1 is not supported by table EVERFLOWV6 Feb 15 09:06:44.206501 sonic ERR swss#orchagent: :- doAclRuleTask: Unknown or invalid rule attribute 'IN_PORTS : Ethernet2,Ethernet3,Ethernet8,Ethernet9' Feb 15 09:06:44.207624 sonic ERR swss#orchagent: :- doAclRuleTask: Failed to create ACL rule. Rule configuration is invalid How I verified it Verify the Community Testcase with IPV6 traffic is passing. Signed-off-by: rajkumar38 --- orchagent/aclorch.cpp | 3 ++- tests/test_mirror_ipv6_separate.py | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/orchagent/aclorch.cpp b/orchagent/aclorch.cpp index 5be81efd799b..472ff70def5d 100644 --- a/orchagent/aclorch.cpp +++ b/orchagent/aclorch.cpp @@ -3216,7 +3216,7 @@ void AclOrch::initDefaultTableTypes() * | -----------------------------------------------------------------| * | MATCH_ETHERTYPE | √ | √ | | * |------------------------------------------------------------------| - * | MATCH_IN_PORTS | √ | √ | | + * | MATCH_IN_PORTS | √ | √ | √ | * |------------------------------------------------------------------| */ @@ -3277,6 +3277,7 @@ void AclOrch::initDefaultTableTypes() .withMatch(make_shared(SAI_ACL_TABLE_ATTR_FIELD_L4_SRC_PORT)) .withMatch(make_shared(SAI_ACL_TABLE_ATTR_FIELD_L4_DST_PORT)) .withMatch(make_shared(SAI_ACL_TABLE_ATTR_FIELD_TCP_FLAGS)) + .withMatch(make_shared(SAI_ACL_TABLE_ATTR_FIELD_IN_PORTS)) .withMatch(make_shared(SAI_ACL_TABLE_ATTR_FIELD_DSCP)) .withMatch(make_shared(set{ {SAI_ACL_RANGE_TYPE_L4_SRC_PORT_RANGE, SAI_ACL_RANGE_TYPE_L4_DST_PORT_RANGE}})) diff --git a/tests/test_mirror_ipv6_separate.py b/tests/test_mirror_ipv6_separate.py index 6711c345c5d0..3509619d3804 100644 --- a/tests/test_mirror_ipv6_separate.py +++ b/tests/test_mirror_ipv6_separate.py @@ -237,6 +237,7 @@ def test_MirrorV6TableCreation(self, dvs, testlog): "SAI_ACL_TABLE_ATTR_FIELD_L4_DST_PORT", "SAI_ACL_TABLE_ATTR_FIELD_TCP_FLAGS", "SAI_ACL_TABLE_ATTR_FIELD_DSCP", + "SAI_ACL_TABLE_ATTR_FIELD_IN_PORTS", "SAI_ACL_TABLE_ATTR_FIELD_OUTER_VLAN_ID" ]