Changing the VLAN header may be implemented by pop the existing header and push a new one. Translate those operations as VLAN modify. Applicable for use cases such as OVS where the controller translates a vlan modify meta (OF) rule to DP pop+push actions rule.
Unified · Split
| @@ -2664,7 +2664,17 @@ static int parse_tc_fdb_actions(struct mlx5e_priv *priv, · 2663 unmodified lines | ||
| 2664 | 2664 | break; |
| 2665 | 2665 | case FLOW_ACTION_VLAN_PUSH: |
| 2666 | 2666 | case FLOW_ACTION_VLAN_POP: |
| 2667 | − err = parse_tc_vlan_action(priv, act, attr, &action); | |
| 2667 | + if (act->id == FLOW_ACTION_VLAN_PUSH && | |
| 2668 | + (action & MLX5_FLOW_CONTEXT_ACTION_VLAN_POP)) { | |
| 2669 | + /* Replace vlan pop+push with vlan modify */ | |
| 2670 | + action &= ~MLX5_FLOW_CONTEXT_ACTION_VLAN_POP; | |
| 2671 | + err = add_vlan_rewrite_action(priv, | |
| 2672 | + MLX5_FLOW_NAMESPACE_FDB, | |
| 2673 | + act, parse_attr, hdrs, | |
| 2674 | + &action, extack); | |
| 2675 | + } else { | |
| 2676 | + err = parse_tc_vlan_action(priv, act, attr, &action); | |
| 2677 | + } | |
| 2668 | 2678 | if (err) |
| 2669 | 2679 | return err; |
| 2670 | 2680 | |