Skip to content

Commit 09c91dd

Browse files
ogerlitzdavem330
authored andcommitted
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: 8b32580 ('net/mlx5e: Add TC vlan action for SRIOV offloads') Signed-off-by: Or Gerlitz <[email protected]> Reported-by: Petr Machata <[email protected]> Reviewed-by: Jiri Pirko <[email protected]> Signed-off-by: Saeed Mahameed <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 375f51e commit 09c91dd

File tree

1 file changed

+4
-2
lines changed
  • drivers/net/ethernet/mellanox/mlx5/core

1 file changed

+4
-2
lines changed

drivers/net/ethernet/mellanox/mlx5/core/en_tc.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1131,14 +1131,16 @@ static int parse_tc_fdb_actions(struct mlx5e_priv *priv, struct tcf_exts *exts,
11311131
}
11321132

11331133
if (is_tcf_vlan(a)) {
1134-
if (tcf_vlan_action(a) == VLAN_F_POP) {
1134+
if (tcf_vlan_action(a) == TCA_VLAN_ACT_POP) {
11351135
attr->action |= MLX5_FLOW_CONTEXT_ACTION_VLAN_POP;
1136-
} else if (tcf_vlan_action(a) == VLAN_F_PUSH) {
1136+
} else if (tcf_vlan_action(a) == TCA_VLAN_ACT_PUSH) {
11371137
if (tcf_vlan_push_proto(a) != htons(ETH_P_8021Q))
11381138
return -EOPNOTSUPP;
11391139

11401140
attr->action |= MLX5_FLOW_CONTEXT_ACTION_VLAN_PUSH;
11411141
attr->vlan = tcf_vlan_push_vid(a);
1142+
} else { /* action is TCA_VLAN_ACT_MODIFY */
1143+
return -EOPNOTSUPP;
11421144
}
11431145
continue;
11441146
}

0 commit comments

Comments
 (0)