History

net/mlx5e: Replace TC VLAN pop and push actions with VLAN modify

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.

Eli Britstein committed 7 years ago

Commit 76b496b1 parent bdc837e1 file · +11 −1Browse files

Unified · Split

drivers/net/ethernet/mellanox/mlx5/core/en_tc.c+11−1
@@ -2664,7 +2664,17 @@ static int parse_tc_fdb_actions(struct mlx5e_priv *priv, · 2663 unmodified lines
26642664 break;
26652665 case FLOW_ACTION_VLAN_PUSH:
26662666 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+ }
26682678 if (err)
26692679 return err;
26702680

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t