From: Thomas Bogendoerfer <tbogendoerfer@suse.de>
Subject: S390: Fix mlx5 throughput degradtion
References: jsc#SLE-22496
Patch-mainline: never, interim patch until real cause/fix is found
mlx5 driver checks PCIe bandwidth to decide whether striding should be
enabled. On S390 this check reports a slow pci heuristic, so striding
is disabled. Tests from IBM showed that turning on striding increases
RoCE performance by 25%. As it's not yet clear why S390 PCI is detected
as slow, this interim patch always enables striding for S390.
Signed-off-by: Thomas Bogendoerfer <tbogendoerfer@suse.de>
---
drivers/net/ethernet/mellanox/mlx5/core/en/params.c | 7 +++++++
1 file changed, 7 insertions(+)
--- a/drivers/net/ethernet/mellanox/mlx5/core/en/params.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en/params.c
@@ -293,6 +293,12 @@ void mlx5e_set_rx_cq_mode_params(struct
MLX5_CQ_PERIOD_MODE_START_FROM_CQE);
}
+#ifdef CONFIG_S390
+bool slow_pci_heuristic(struct mlx5_core_dev *mdev)
+{
+ return false;
+}
+#else
bool slow_pci_heuristic(struct mlx5_core_dev *mdev)
{
u32 link_speed = 0;
@@ -308,6 +314,7 @@ bool slow_pci_heuristic(struct mlx5_core
return link_speed && pci_bw &&
link_speed > MLX5E_SLOW_PCI_RATIO * pci_bw;
}
+#endif
bool mlx5e_striding_rq_possible(struct mlx5_core_dev *mdev,
struct mlx5e_params *params)