Skip to content

Commit 2f5d2d9

Browse files
authored
[acl] Remove Ethertype from L3V6 qualifiers (sonic-net#1433)
This change was already done for MIRRORV6 tables a while back. ETHER_TYPE is unnecessary for V6 tables as the ethertype should always be the same (86DD) for IPv6 traffic. Additionally, this qualifier breaks IPv6 support on some platforms (e.g. Mellanox). Signed-off-by: Danny Allen <daall@microsoft.com>
1 parent f7b974f commit 2f5d2d9

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

orchagent/aclorch.cpp

+7-1
Original file line numberDiff line numberDiff line change
@@ -1036,6 +1036,12 @@ bool AclRuleL3V6::validateAddMatch(string attr_name, string attr_value)
10361036
return false;
10371037
}
10381038

1039+
if (attr_name == MATCH_ETHER_TYPE)
1040+
{
1041+
SWSS_LOG_ERROR("Ethertype match is not supported for table type L3V6");
1042+
return false;
1043+
}
1044+
10391045
return AclRule::validateAddMatch(attr_name, attr_value);
10401046
}
10411047

@@ -1356,7 +1362,7 @@ bool AclTable::create()
13561362
return status == SAI_STATUS_SUCCESS;
13571363
}
13581364

1359-
if (type != ACL_TABLE_MIRRORV6)
1365+
if (type != ACL_TABLE_MIRRORV6 && type != ACL_TABLE_L3V6)
13601366
{
13611367
attr.id = SAI_ACL_TABLE_ATTR_FIELD_ETHER_TYPE;
13621368
attr.value.booldata = true;

tests/mock_tests/aclorch_ut.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,6 @@ namespace aclorch_test
388388
vector<swss::FieldValueTuple> fields;
389389

390390
fields.push_back({ "SAI_ACL_TABLE_ATTR_ACL_BIND_POINT_TYPE_LIST", "2:SAI_ACL_BIND_POINT_TYPE_PORT,SAI_ACL_BIND_POINT_TYPE_LAG" });
391-
fields.push_back({ "SAI_ACL_TABLE_ATTR_FIELD_ETHER_TYPE", "true" });
392391
fields.push_back({ "SAI_ACL_TABLE_ATTR_FIELD_ACL_IP_TYPE", "true" });
393392
fields.push_back({ "SAI_ACL_TABLE_ATTR_FIELD_IP_PROTOCOL", "true" });
394393

@@ -400,6 +399,7 @@ namespace aclorch_test
400399
switch (acl_table.type)
401400
{
402401
case ACL_TABLE_L3:
402+
fields.push_back({ "SAI_ACL_TABLE_ATTR_FIELD_ETHER_TYPE", "true" });
403403
fields.push_back({ "SAI_ACL_TABLE_ATTR_FIELD_SRC_IP", "true" });
404404
fields.push_back({ "SAI_ACL_TABLE_ATTR_FIELD_DST_IP", "true" });
405405
break;
@@ -898,7 +898,7 @@ namespace aclorch_test
898898
//
899899
// Using fixed ports = {"1,2"} for now.
900900
// The bind operations will be another separately test cases.
901-
TEST_F(AclOrchTest, ACL_Creation_and_Destorying)
901+
TEST_F(AclOrchTest, ACL_Creation_and_Destruction)
902902
{
903903
auto orch = createAclOrch();
904904

0 commit comments

Comments
 (0)