Skip to content

Commit 5c72824

Browse files
daallabdosi
authored andcommitted
[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 <[email protected]>
1 parent 40ff871 commit 5c72824

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
@@ -1029,6 +1029,12 @@ bool AclRuleL3V6::validateAddMatch(string attr_name, string attr_value)
10291029
return false;
10301030
}
10311031

1032+
if (attr_name == MATCH_ETHER_TYPE)
1033+
{
1034+
SWSS_LOG_ERROR("Ethertype match is not supported for table type L3V6");
1035+
return false;
1036+
}
1037+
10321038
return AclRule::validateAddMatch(attr_name, attr_value);
10331039
}
10341040

@@ -1325,7 +1331,7 @@ bool AclTable::create()
13251331
return status == SAI_STATUS_SUCCESS;
13261332
}
13271333

1328-
if (type != ACL_TABLE_MIRRORV6)
1334+
if (type != ACL_TABLE_MIRRORV6 && type != ACL_TABLE_L3V6)
13291335
{
13301336
attr.id = SAI_ACL_TABLE_ATTR_FIELD_ETHER_TYPE;
13311337
attr.value.booldata = true;

tests/mock_tests/aclorch_ut.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,6 @@ namespace aclorch_test
437437
vector<swss::FieldValueTuple> fields;
438438

439439
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" });
440-
fields.push_back({ "SAI_ACL_TABLE_ATTR_FIELD_ETHER_TYPE", "true" });
441440
fields.push_back({ "SAI_ACL_TABLE_ATTR_FIELD_ACL_IP_TYPE", "true" });
442441
fields.push_back({ "SAI_ACL_TABLE_ATTR_FIELD_IP_PROTOCOL", "true" });
443442

@@ -449,6 +448,7 @@ namespace aclorch_test
449448
switch (acl_table.type)
450449
{
451450
case ACL_TABLE_L3:
451+
fields.push_back({ "SAI_ACL_TABLE_ATTR_FIELD_ETHER_TYPE", "true" });
452452
fields.push_back({ "SAI_ACL_TABLE_ATTR_FIELD_SRC_IP", "true" });
453453
fields.push_back({ "SAI_ACL_TABLE_ATTR_FIELD_DST_IP", "true" });
454454
break;
@@ -892,7 +892,7 @@ namespace aclorch_test
892892
//
893893
// Using fixed ports = {"1,2"} for now.
894894
// The bind operations will be another separately test cases.
895-
TEST_F(AclOrchTest, ACL_Creation_and_Destorying)
895+
TEST_F(AclOrchTest, ACL_Creation_and_Destruction)
896896
{
897897
auto orch = createAclOrch();
898898

0 commit comments

Comments
 (0)