Skip to content

Commit 052f744

Browse files
w1ldptrdavem330
authored andcommitted
net/sched: act_police: allow 'continue' action offload
Offloading police with action TC_ACT_UNSPEC was erroneously disabled even though it was supported by mlx5 matchall offload implementation, which didn't verify the action type but instead assumed that any single police action attached to matchall classifier is a 'continue' action. Lack of action type check made it non-obvious what mlx5 matchall implementation actually supports and caused implementers and reviewers of referenced commits to disallow it as a part of improved validation code. Fixes: b8cd583 ("net: flow_offload: add tc police action parameters") Fixes: b50e462 ("net/sched: act_police: Add extack messages for offload failure") Signed-off-by: Vlad Buslov <[email protected]> Reviewed-by: Ido Schimmel <[email protected]> Tested-by: Ido Schimmel <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent e6fa930 commit 052f744

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

include/net/flow_offload.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,7 @@ enum flow_action_id {
152152
FLOW_ACTION_PIPE,
153153
FLOW_ACTION_VLAN_PUSH_ETH,
154154
FLOW_ACTION_VLAN_POP_ETH,
155+
FLOW_ACTION_CONTINUE,
155156
NUM_FLOW_ACTIONS,
156157
};
157158

net/sched/act_police.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -442,7 +442,7 @@ static int tcf_police_act_to_flow_act(int tc_act, u32 *extval,
442442
act_id = FLOW_ACTION_JUMP;
443443
*extval = tc_act & TC_ACT_EXT_VAL_MASK;
444444
} else if (tc_act == TC_ACT_UNSPEC) {
445-
NL_SET_ERR_MSG_MOD(extack, "Offload not supported when conform/exceed action is \"continue\"");
445+
act_id = FLOW_ACTION_CONTINUE;
446446
} else {
447447
NL_SET_ERR_MSG_MOD(extack, "Unsupported conform/exceed action offload");
448448
}

0 commit comments

Comments
 (0)