mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-27 12:57:53 +00:00
net/mlx5e: Disable TX MPWQE in kdump mode
Under kdump environment we want to use the smallest possible amount of resources, that includes setting SQ size to minimum. However, when running on a device that supports TX MPWQE, then the SQ stop room becomes larger than with non-capable device and requires increasing the SQ size. Since TX MPWQE offload is not necessary in kdump mode, disable it to reduce the memory requirements for capable devices. With this change, the needed SQ stop room size drops by 31. Signed-off-by: Alaa Hleihel <alaa@nvidia.com> Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
This commit is contained in:
parent
8ec5d438a3
commit
040ee6172e
3 changed files with 10 additions and 5 deletions
|
@ -1162,6 +1162,13 @@ mlx5e_calc_max_nch(struct mlx5e_priv *priv, const struct mlx5e_profile *profile)
|
|||
return priv->netdev->num_rx_queues / max_t(u8, profile->rq_groups, 1);
|
||||
}
|
||||
|
||||
static inline bool
|
||||
mlx5e_tx_mpwqe_supported(struct mlx5_core_dev *mdev)
|
||||
{
|
||||
return !is_kdump_kernel() &&
|
||||
MLX5_CAP_ETH(mdev, enhanced_multi_pkt_send_wqe);
|
||||
}
|
||||
|
||||
int mlx5e_priv_init(struct mlx5e_priv *priv,
|
||||
struct net_device *netdev,
|
||||
struct mlx5_core_dev *mdev);
|
||||
|
|
|
@ -1984,7 +1984,7 @@ static int set_pflag_tx_mpwqe_common(struct net_device *netdev, u32 flag, bool e
|
|||
struct mlx5_core_dev *mdev = priv->mdev;
|
||||
struct mlx5e_params new_params;
|
||||
|
||||
if (enable && !MLX5_CAP_ETH(mdev, enhanced_multi_pkt_send_wqe))
|
||||
if (enable && !mlx5e_tx_mpwqe_supported(mdev))
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
new_params = priv->channels.params;
|
||||
|
|
|
@ -4620,12 +4620,10 @@ void mlx5e_build_nic_params(struct mlx5e_priv *priv, struct mlx5e_xsk *xsk, u16
|
|||
params->log_sq_size = is_kdump_kernel() ?
|
||||
MLX5E_PARAMS_MINIMUM_LOG_SQ_SIZE :
|
||||
MLX5E_PARAMS_DEFAULT_LOG_SQ_SIZE;
|
||||
MLX5E_SET_PFLAG(params, MLX5E_PFLAG_SKB_TX_MPWQE,
|
||||
MLX5_CAP_ETH(mdev, enhanced_multi_pkt_send_wqe));
|
||||
MLX5E_SET_PFLAG(params, MLX5E_PFLAG_SKB_TX_MPWQE, mlx5e_tx_mpwqe_supported(mdev));
|
||||
|
||||
/* XDP SQ */
|
||||
MLX5E_SET_PFLAG(params, MLX5E_PFLAG_XDP_TX_MPWQE,
|
||||
MLX5_CAP_ETH(mdev, enhanced_multi_pkt_send_wqe));
|
||||
MLX5E_SET_PFLAG(params, MLX5E_PFLAG_XDP_TX_MPWQE, mlx5e_tx_mpwqe_supported(mdev));
|
||||
|
||||
/* set CQE compression */
|
||||
params->rx_cqe_compress_def = false;
|
||||
|
|
Loading…
Reference in a new issue