Skip to content

Commit 9a92fe1

Browse files
paravmellanoxSaeed Mahameed
authored andcommitted
net/mlx5e: Don't cache tunnel offloads capability
When mlx5e attaches again after device health recovery, the device capabilities might have changed by the eswitch manager. For example in one flow when ECPF changes the eswitch mode between legacy and switchdev, it updates the flow table tunnel capability. The cached value is only used in one place, so just check the capability there instead. Fixes: 5bef709 ("net/mlx5: Enable host PF HCA after eswitch is initialized") Signed-off-by: Parav Pandit <[email protected]> Signed-off-by: Daniel Jurgens <[email protected]> Signed-off-by: Saeed Mahameed <[email protected]>
1 parent 37beabe commit 9a92fe1

File tree

4 files changed

+1
-6
lines changed

4 files changed

+1
-6
lines changed

drivers/net/ethernet/mellanox/mlx5/core/en.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,6 @@ struct mlx5e_params {
313313
} channel;
314314
} mqprio;
315315
bool rx_cqe_compress_def;
316-
bool tunneled_offload_en;
317316
struct dim_cq_moder rx_cq_moderation;
318317
struct dim_cq_moder tx_cq_moderation;
319318
struct mlx5e_packet_merge_param packet_merge;

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4979,8 +4979,6 @@ void mlx5e_build_nic_params(struct mlx5e_priv *priv, struct mlx5e_xsk *xsk, u16
49794979
/* TX inline */
49804980
mlx5_query_min_inline(mdev, &params->tx_min_inline_mode);
49814981

4982-
params->tunneled_offload_en = mlx5_tunnel_inner_ft_supported(mdev);
4983-
49844982
/* AF_XDP */
49854983
params->xsk = xsk;
49864984

@@ -5285,7 +5283,7 @@ static int mlx5e_init_nic_rx(struct mlx5e_priv *priv)
52855283
}
52865284

52875285
features = MLX5E_RX_RES_FEATURE_PTP;
5288-
if (priv->channels.params.tunneled_offload_en)
5286+
if (mlx5_tunnel_inner_ft_supported(mdev))
52895287
features |= MLX5E_RX_RES_FEATURE_INNER_FT;
52905288
err = mlx5e_rx_res_init(priv->rx_res, priv->mdev, features,
52915289
priv->max_nch, priv->drop_rq.rqn,

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -755,7 +755,6 @@ static void mlx5e_build_rep_params(struct net_device *netdev)
755755
mlx5e_set_rx_cq_mode_params(params, cq_period_mode);
756756

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

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@ static void mlx5i_build_nic_params(struct mlx5_core_dev *mdev,
7070

7171
params->packet_merge.type = MLX5E_PACKET_MERGE_NONE;
7272
params->hard_mtu = MLX5_IB_GRH_BYTES + MLX5_IPOIB_HARD_LEN;
73-
params->tunneled_offload_en = false;
7473

7574
/* CQE compression is not supported for IPoIB */
7675
params->rx_cqe_compress_def = false;

0 commit comments

Comments
 (0)