Skip to content

Commit

Permalink
Revert "[acl] Add IN_PORTS qualifier for L3 table (sonic-net#3078)" (s…
Browse files Browse the repository at this point in the history
…onic-net#3092)

This reverts commit 9d4a3ad.
*Revert "[acl] Add IN_PORTS qualifier for L3 table"
  • Loading branch information
neethajohn authored and mssonicbld committed Apr 5, 2024
1 parent f83a0ba commit 92204f9
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 44 deletions.
2 changes: 0 additions & 2 deletions orchagent/aclorch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3222,7 +3222,6 @@ void AclOrch::initDefaultTableTypes()
.withMatch(make_shared<AclTableMatch>(SAI_ACL_TABLE_ATTR_FIELD_L4_SRC_PORT))
.withMatch(make_shared<AclTableMatch>(SAI_ACL_TABLE_ATTR_FIELD_L4_DST_PORT))
.withMatch(make_shared<AclTableMatch>(SAI_ACL_TABLE_ATTR_FIELD_TCP_FLAGS))
.withMatch(make_shared<AclTableMatch>(SAI_ACL_TABLE_ATTR_FIELD_IN_PORTS))
.build()
);

Expand All @@ -3240,7 +3239,6 @@ void AclOrch::initDefaultTableTypes()
.withMatch(make_shared<AclTableMatch>(SAI_ACL_TABLE_ATTR_FIELD_L4_SRC_PORT))
.withMatch(make_shared<AclTableMatch>(SAI_ACL_TABLE_ATTR_FIELD_L4_DST_PORT))
.withMatch(make_shared<AclTableMatch>(SAI_ACL_TABLE_ATTR_FIELD_TCP_FLAGS))
.withMatch(make_shared<AclTableMatch>(SAI_ACL_TABLE_ATTR_FIELD_IN_PORTS))
.build()
);

Expand Down
42 changes: 0 additions & 42 deletions tests/test_acl.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,29 +243,6 @@ def test_AclRuleInPorts(self, dvs_acl, mirror_acl_table):
dvs_acl.verify_acl_rule_status(MIRROR_TABLE_NAME, MIRROR_RULE_NAME, None)
dvs_acl.verify_no_acl_rules()

def test_AclRuleInPortsL3(self, dvs_acl, l3_acl_table):
"""
Verify IN_PORTS matches on ACL rule.
Using L3 table type for IN_PORTS matches.
"""
config_qualifiers = {
"IN_PORTS": "Ethernet8,Ethernet12",
}

expected_sai_qualifiers = {
"SAI_ACL_ENTRY_ATTR_FIELD_IN_PORTS": dvs_acl.get_port_list_comparator(["Ethernet8", "Ethernet12"])
}

dvs_acl.create_acl_rule(L3_TABLE_NAME, L3_RULE_NAME, config_qualifiers)
# Verify status is written into STATE_DB
dvs_acl.verify_acl_rule_status(L3_TABLE_NAME, L3_RULE_NAME, "Active")
dvs_acl.verify_acl_rule(expected_sai_qualifiers)

dvs_acl.remove_acl_rule(L3_TABLE_NAME, L3_RULE_NAME)
# Verify the STATE_DB entry is removed
dvs_acl.verify_acl_rule_status(L3_TABLE_NAME, L3_RULE_NAME, None)
dvs_acl.verify_no_acl_rules()

def test_AclRuleOutPorts(self, dvs_acl, mclag_acl_table):
"""
Verify OUT_PORTS matches on ACL rule.
Expand Down Expand Up @@ -569,25 +546,6 @@ def test_V6AclRuleVlanId(self, dvs_acl, l3v6_acl_table):
dvs_acl.verify_acl_rule_status(L3V6_TABLE_NAME, L3V6_RULE_NAME, None)
dvs_acl.verify_no_acl_rules()

def test_v6AclRuleInPorts(self, dvs_acl, l3v6_acl_table):
config_qualifiers = {
"IN_PORTS": "Ethernet8,Ethernet12",
}

expected_sai_qualifiers = {
"SAI_ACL_ENTRY_ATTR_FIELD_IN_PORTS": dvs_acl.get_port_list_comparator(["Ethernet8", "Ethernet12"])
}

dvs_acl.create_acl_rule(L3V6_TABLE_NAME, L3V6_RULE_NAME, config_qualifiers)
dvs_acl.verify_acl_rule(expected_sai_qualifiers)
# Verify status is written into STATE_DB
dvs_acl.verify_acl_rule_status(L3V6_TABLE_NAME, L3V6_RULE_NAME, "Active")

dvs_acl.remove_acl_rule(L3V6_TABLE_NAME, L3V6_RULE_NAME)
# Verify the STATE_DB entry is removed
dvs_acl.verify_acl_rule_status(L3V6_TABLE_NAME, L3V6_RULE_NAME, None)
dvs_acl.verify_no_acl_rules()

def test_InsertAclRuleBetweenPriorities(self, dvs_acl, l3_acl_table):
rule_priorities = ["10", "20", "30", "40"]

Expand Down

0 comments on commit 92204f9

Please sign in to comment.