Skip to content

Commit 52fdf1c

Browse files
mickeyspiegellguohan
authored andcommitted
[aclorch]: Allow DTEL drop actions in DTEL flow watchlist (sonic-net#915)
In order to simplify operations, it may be desirable to combine the DTEL flow and drop watchlists into one single watchlist that contains both flow and drop actions. This change adds the drop actions to the flow watchlist, allowing the combination of flow and drop actions in a single ACL table. This change also allows ACTION_DTEL_REPORT_ALL_PACKETS in drop watchlists. Signed-off-by: Mickey Spiegel <[email protected]>
1 parent 9778374 commit 52fdf1c

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

orchagent/aclorch.cpp

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1586,7 +1586,9 @@ bool AclRuleDTelFlowWatchListEntry::validateAddAction(string attr_name, string a
15861586
(attr_name != ACTION_DTEL_FLOW_OP &&
15871587
attr_name != ACTION_DTEL_INT_SESSION &&
15881588
attr_name != ACTION_DTEL_FLOW_SAMPLE_PERCENT &&
1589-
attr_name != ACTION_DTEL_REPORT_ALL_PACKETS))
1589+
attr_name != ACTION_DTEL_REPORT_ALL_PACKETS &&
1590+
attr_name != ACTION_DTEL_DROP_REPORT_ENABLE &&
1591+
attr_name != ACTION_DTEL_TAIL_DROP_REPORT_ENABLE))
15901592
{
15911593
return false;
15921594
}
@@ -1643,7 +1645,9 @@ bool AclRuleDTelFlowWatchListEntry::validateAddAction(string attr_name, string a
16431645

16441646
value.aclaction.enable = true;
16451647

1646-
if (attr_name == ACTION_DTEL_REPORT_ALL_PACKETS)
1648+
if (attr_name == ACTION_DTEL_REPORT_ALL_PACKETS ||
1649+
attr_name == ACTION_DTEL_DROP_REPORT_ENABLE ||
1650+
attr_name == ACTION_DTEL_TAIL_DROP_REPORT_ENABLE)
16471651
{
16481652
value.aclaction.parameter.booldata = (attr_value == DTEL_ENABLED) ? true : false;
16491653
value.aclaction.enable = (attr_value == DTEL_ENABLED) ? true : false;
@@ -1798,7 +1802,8 @@ bool AclRuleDTelDropWatchListEntry::validateAddAction(string attr_name, string a
17981802
string attr_value = to_upper(attr_val);
17991803

18001804
if (attr_name != ACTION_DTEL_DROP_REPORT_ENABLE &&
1801-
attr_name != ACTION_DTEL_TAIL_DROP_REPORT_ENABLE)
1805+
attr_name != ACTION_DTEL_TAIL_DROP_REPORT_ENABLE &&
1806+
attr_name != ACTION_DTEL_REPORT_ALL_PACKETS)
18021807
{
18031808
return false;
18041809
}

0 commit comments

Comments
 (0)