aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/mellanox/mlx5/core/en.h
diff options
context:
space:
mode:
authorAlaa Hleihel <alaa@nvidia.com>2021-05-10 14:17:55 +0300
committerSaeed Mahameed <saeedm@nvidia.com>2021-06-03 13:10:20 -0700
commit040ee6172e77b2366d0c622f75eba26e4e49481f (patch)
tree5371fa0bde96736d09c0daf5bf446d6305155515 /drivers/net/ethernet/mellanox/mlx5/core/en.h
parentnet/mlx5e: RX, Re-place page pool numa node change logic (diff)
downloadlinux-dev-040ee6172e77b2366d0c622f75eba26e4e49481f.tar.xz
linux-dev-040ee6172e77b2366d0c622f75eba26e4e49481f.zip
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>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx5/core/en.h')
-rw-r--r--drivers/net/ethernet/mellanox/mlx5/core/en.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en.h b/drivers/net/ethernet/mellanox/mlx5/core/en.h
index d966d5f40e78..b1b51bbba054 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en.h
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en.h
@@ -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);