Skip to content

Commit 0faf02b

Browse files
author
Shuotian Cheng
authored
[aclorch]: Move ACL stage check to validate() function (sonic-net#542)
if (stage == ACL_STAGE_UNKNOWN) return false; This logic should be part of the AclTable validate() function instead of in the create() function. Signed-off-by: Shu0T1an ChenG <[email protected]>
1 parent 6030177 commit 0faf02b

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

orchagent/aclorch.cpp

+1-6
Original file line numberDiff line numberDiff line change
@@ -1011,6 +1011,7 @@ bool AclTable::validate()
10111011
{
10121012
// Control plane ACLs are handled by a separate process
10131013
if (type == ACL_TABLE_UNKNOWN || type == ACL_TABLE_CTRLPLANE) return false;
1014+
if (stage == ACL_STAGE_UNKNOWN) return false;
10141015
if (portSet.empty()) return false;
10151016
return true;
10161017
}
@@ -1019,12 +1020,6 @@ bool AclTable::create()
10191020
{
10201021
SWSS_LOG_ENTER();
10211022

1022-
if (stage == ACL_STAGE_UNKNOWN)
1023-
{
1024-
SWSS_LOG_ERROR("Unknown ACL stage for ACL table %s", id.c_str());
1025-
return false;
1026-
}
1027-
10281023
sai_attribute_t attr;
10291024
vector<sai_attribute_t> table_attrs;
10301025
vector<int32_t> bpoint_list = { SAI_ACL_BIND_POINT_TYPE_PORT, SAI_ACL_BIND_POINT_TYPE_LAG };

0 commit comments

Comments
 (0)