Skip to content

Commit

Permalink
net/mlx5: VLAN push on RX, pop on TX
Browse files Browse the repository at this point in the history
Some older NIC hardware isn't capable of doing VLAN push on RX and pop
on TX.

A workaround has been added in software to support it, but it has a
performance penalty since it requires a hairpin + loopback.

There's no such limitation with the newer NICs, so no need to pay the
price of the w/a. With this change the software w/a is disabled for
certain HW versions and steering modes that support it.

Signed-off-by: Dima Chumak <dchumak@nvidia.com>
Reviewed-by: Oz Shlomo <ozsh@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
  • Loading branch information
Dima Chumak authored and Saeed Mahameed committed Jan 27, 2022
1 parent 8348b71 commit 60dc0ef
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,9 @@ mlx5_eswitch_termtbl_required(struct mlx5_eswitch *esw,
return false;

/* push vlan on RX */
if (flow_act->action & MLX5_FLOW_CONTEXT_ACTION_VLAN_PUSH)
if (flow_act->action & MLX5_FLOW_CONTEXT_ACTION_VLAN_PUSH &&
!(mlx5_fs_get_capabilities(esw->dev, MLX5_FLOW_NAMESPACE_FDB) &
MLX5_FLOW_STEERING_CAP_VLAN_PUSH_ON_RX))
return true;

/* hairpin */
Expand Down

0 comments on commit 60dc0ef

Please sign in to comment.