Merge branch 'act_police-continue-offload-fix'
Vlad Buslov says: ==================== net: Fix police 'continue' action offload TC act_police with 'continue' action had been supported by mlx5 matchall classifier offload implementation for some time. However, 'continue' was assumed implicitly and recently got broken in multiple places. Fix it in both TC hardware offload validation code and mlx5 driver. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
commit
44d632d5dd
@ -4529,13 +4529,6 @@ static int mlx5e_policer_validate(const struct flow_action *action,
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
|
||||
if (act->police.notexceed.act_id != FLOW_ACTION_PIPE &&
|
||||
act->police.notexceed.act_id != FLOW_ACTION_ACCEPT) {
|
||||
NL_SET_ERR_MSG_MOD(extack,
|
||||
"Offload not supported when conform action is not pipe or ok");
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
|
||||
if (act->police.notexceed.act_id == FLOW_ACTION_ACCEPT &&
|
||||
!flow_action_is_last_entry(action, act)) {
|
||||
NL_SET_ERR_MSG_MOD(extack,
|
||||
@ -4586,6 +4579,12 @@ static int scan_tc_matchall_fdb_actions(struct mlx5e_priv *priv,
|
||||
flow_action_for_each(i, act, flow_action) {
|
||||
switch (act->id) {
|
||||
case FLOW_ACTION_POLICE:
|
||||
if (act->police.notexceed.act_id != FLOW_ACTION_CONTINUE) {
|
||||
NL_SET_ERR_MSG_MOD(extack,
|
||||
"Offload not supported when conform action is not continue");
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
|
||||
err = mlx5e_policer_validate(flow_action, act, extack);
|
||||
if (err)
|
||||
return err;
|
||||
|
@ -152,6 +152,7 @@ enum flow_action_id {
|
||||
FLOW_ACTION_PIPE,
|
||||
FLOW_ACTION_VLAN_PUSH_ETH,
|
||||
FLOW_ACTION_VLAN_POP_ETH,
|
||||
FLOW_ACTION_CONTINUE,
|
||||
NUM_FLOW_ACTIONS,
|
||||
};
|
||||
|
||||
|
@ -442,7 +442,7 @@ static int tcf_police_act_to_flow_act(int tc_act, u32 *extval,
|
||||
act_id = FLOW_ACTION_JUMP;
|
||||
*extval = tc_act & TC_ACT_EXT_VAL_MASK;
|
||||
} else if (tc_act == TC_ACT_UNSPEC) {
|
||||
NL_SET_ERR_MSG_MOD(extack, "Offload not supported when conform/exceed action is \"continue\"");
|
||||
act_id = FLOW_ACTION_CONTINUE;
|
||||
} else {
|
||||
NL_SET_ERR_MSG_MOD(extack, "Unsupported conform/exceed action offload");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user