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: 5bef709d76a2 ("net/mlx5: Enable host PF HCA after eswitch is initialized") Signed-off-by: Parav Pandit <parav@nvidia.com> Signed-off-by: Daniel Jurgens <danielj@nvidia.com> Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
This commit is contained in:
parent
37beabe9a8
commit
9a92fe1db9
@ -313,7 +313,6 @@ struct mlx5e_params {
|
||||
} channel;
|
||||
} mqprio;
|
||||
bool rx_cqe_compress_def;
|
||||
bool tunneled_offload_en;
|
||||
struct dim_cq_moder rx_cq_moderation;
|
||||
struct dim_cq_moder tx_cq_moderation;
|
||||
struct mlx5e_packet_merge_param packet_merge;
|
||||
|
@ -4979,8 +4979,6 @@ void mlx5e_build_nic_params(struct mlx5e_priv *priv, struct mlx5e_xsk *xsk, u16
|
||||
/* TX inline */
|
||||
mlx5_query_min_inline(mdev, ¶ms->tx_min_inline_mode);
|
||||
|
||||
params->tunneled_offload_en = mlx5_tunnel_inner_ft_supported(mdev);
|
||||
|
||||
/* AF_XDP */
|
||||
params->xsk = xsk;
|
||||
|
||||
@ -5285,7 +5283,7 @@ static int mlx5e_init_nic_rx(struct mlx5e_priv *priv)
|
||||
}
|
||||
|
||||
features = MLX5E_RX_RES_FEATURE_PTP;
|
||||
if (priv->channels.params.tunneled_offload_en)
|
||||
if (mlx5_tunnel_inner_ft_supported(mdev))
|
||||
features |= MLX5E_RX_RES_FEATURE_INNER_FT;
|
||||
err = mlx5e_rx_res_init(priv->rx_res, priv->mdev, features,
|
||||
priv->max_nch, priv->drop_rq.rqn,
|
||||
|
@ -755,7 +755,6 @@ static void mlx5e_build_rep_params(struct net_device *netdev)
|
||||
mlx5e_set_rx_cq_mode_params(params, cq_period_mode);
|
||||
|
||||
params->mqprio.num_tc = 1;
|
||||
params->tunneled_offload_en = false;
|
||||
if (rep->vport != MLX5_VPORT_UPLINK)
|
||||
params->vlan_strip_disable = true;
|
||||
|
||||
|
@ -70,7 +70,6 @@ static void mlx5i_build_nic_params(struct mlx5_core_dev *mdev,
|
||||
|
||||
params->packet_merge.type = MLX5E_PACKET_MERGE_NONE;
|
||||
params->hard_mtu = MLX5_IB_GRH_BYTES + MLX5_IPOIB_HARD_LEN;
|
||||
params->tunneled_offload_en = false;
|
||||
|
||||
/* CQE compression is not supported for IPoIB */
|
||||
params->rx_cqe_compress_def = false;
|
||||
|
Loading…
x
Reference in New Issue
Block a user