mirror of
https://github.com/FEX-Emu/linux.git
synced 2025-01-14 05:12:17 +00:00
net/mlx5e: Use the proper UAPI values when offloading TC vlan actions
Currently we use the non UAPI values and we miss erring on the modify action which is not supported, fix that. Fixes: 8b32580df1cb ('net/mlx5e: Add TC vlan action for SRIOV offloads') Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com> Reported-by: Petr Machata <petrm@mellanox.com> Reviewed-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
375f51e2b5
commit
09c91ddf2c
@ -1131,14 +1131,16 @@ static int parse_tc_fdb_actions(struct mlx5e_priv *priv, struct tcf_exts *exts,
|
||||
}
|
||||
|
||||
if (is_tcf_vlan(a)) {
|
||||
if (tcf_vlan_action(a) == VLAN_F_POP) {
|
||||
if (tcf_vlan_action(a) == TCA_VLAN_ACT_POP) {
|
||||
attr->action |= MLX5_FLOW_CONTEXT_ACTION_VLAN_POP;
|
||||
} else if (tcf_vlan_action(a) == VLAN_F_PUSH) {
|
||||
} else if (tcf_vlan_action(a) == TCA_VLAN_ACT_PUSH) {
|
||||
if (tcf_vlan_push_proto(a) != htons(ETH_P_8021Q))
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
attr->action |= MLX5_FLOW_CONTEXT_ACTION_VLAN_PUSH;
|
||||
attr->vlan = tcf_vlan_push_vid(a);
|
||||
} else { /* action is TCA_VLAN_ACT_MODIFY */
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user