Skip to content

Commit

Permalink
net/mlx5e: Properly disable vlan strip on non-UL reps
Browse files Browse the repository at this point in the history
[ Upstream commit f37044f ]

When querying mlx5 non-uplink representors capabilities with ethtool
rx-vlan-offload is marked as "off [fixed]". However, it is actually always
enabled because mlx5e_params->vlan_strip_disable is 0 by default when
initializing struct mlx5e_params instance. Fix the issue by explicitly
setting the vlan_strip_disable to 'true' for non-uplink representors.

Fixes: cb67b83 ("net/mlx5e: Introduce SRIOV VF representors")
Signed-off-by: Vlad Buslov <vladbu@nvidia.com>
Reviewed-by: Roi Dayan <roid@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
w1ldptr authored and gregkh committed Aug 31, 2022
1 parent fe76b3e commit 0782959
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/net/ethernet/mellanox/mlx5/core/en_rep.c
Expand Up @@ -618,6 +618,8 @@ static void mlx5e_build_rep_params(struct net_device *netdev)

params->mqprio.num_tc = 1;
params->tunneled_offload_en = false;
if (rep->vport != MLX5_VPORT_UPLINK)
params->vlan_strip_disable = true;

/* Set an initial non-zero value, so that mlx5e_select_queue won't
* divide by zero if called before first activating channels.
Expand Down

0 comments on commit 0782959

Please sign in to comment.