summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
diff options
context:
space:
mode:
authorTariq Toukan2018-02-11 10:58:30 +0100
committerSaeed Mahameed2018-03-28 02:17:27 +0200
commit291f445eab9b2b11c8dd05ae1a0943c328cb9b6b (patch)
tree345dcfe69119f0433e1532acd02526af1849877d /drivers/net/ethernet/mellanox/mlx5/core/en_main.c
parentnet/mlx5e: Unify slow PCI heuristic (diff)
downloadkernel-qcow2-linux-291f445eab9b2b11c8dd05ae1a0943c328cb9b6b.tar.gz
kernel-qcow2-linux-291f445eab9b2b11c8dd05ae1a0943c328cb9b6b.tar.xz
kernel-qcow2-linux-291f445eab9b2b11c8dd05ae1a0943c328cb9b6b.zip
net/mlx5e: Disable Striding RQ when PCI is slower than link
We turn the feature off for servers with PCI BW bounded by a threshold (16G) and lower than MAX LINK BW. This improves the effectiveness of CQE compression feature, that is defaulted to ON for the same case. Signed-off-by: Tariq Toukan <tariqt@mellanox.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx5/core/en_main.c')
-rw-r--r--drivers/net/ethernet/mellanox/mlx5/core/en_main.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
index 46707826f27e..d4dd00089eb1 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
@@ -113,13 +113,16 @@ void mlx5e_init_rq_type_params(struct mlx5_core_dev *mdev,
MLX5E_GET_PFLAG(params, MLX5E_PFLAG_RX_CQE_COMPRESS));
}
+static bool slow_pci_heuristic(struct mlx5_core_dev *mdev);
+
static void mlx5e_set_rq_params(struct mlx5_core_dev *mdev,
struct mlx5e_params *params)
{
u8 rq_type = mlx5e_check_fragmented_striding_rq_cap(mdev) &&
- !params->xdp_prog && !MLX5_IPSEC_DEV(mdev) ?
- MLX5_WQ_TYPE_LINKED_LIST_STRIDING_RQ :
- MLX5_WQ_TYPE_LINKED_LIST;
+ !slow_pci_heuristic(mdev) &&
+ !params->xdp_prog && !MLX5_IPSEC_DEV(mdev) ?
+ MLX5_WQ_TYPE_LINKED_LIST_STRIDING_RQ :
+ MLX5_WQ_TYPE_LINKED_LIST;
mlx5e_init_rq_type_params(mdev, params, rq_type);
}