]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blame - releases/4.14.34/net-mlx5e-fix-traffic-being-dropped-on-vf-representor.patch
Linux 4.14.95
[thirdparty/kernel/stable-queue.git] / releases / 4.14.34 / net-mlx5e-fix-traffic-being-dropped-on-vf-representor.patch
CommitLineData
07ff4eea
GKH
1From foo@baz Tue Apr 10 23:20:08 CEST 2018
2From: Roi Dayan <roid@mellanox.com>
3Date: Wed, 28 Feb 2018 12:56:42 +0200
4Subject: net/mlx5e: Fix traffic being dropped on VF representor
5
6From: Roi Dayan <roid@mellanox.com>
7
8
9[ Upstream commit 4246f698dd58e3c6246fa919ef0b0a1d29a57e4a ]
10
11Increase representor netdev RQ size to avoid dropped packets.
12The current size (two) is just too small to keep up with
13conventional slow path traffic patterns.
14Also match the SQ size to the RQ size.
15
16Fixes: cb67b832921c ("net/mlx5e: Introduce SRIOV VF representors")
17Signed-off-by: Roi Dayan <roid@mellanox.com>
18Reviewed-by: Paul Blakey <paulb@mellanox.com>
19Reviewed-by: Or Gerlitz <ogerlitz@mellanox.com>
20Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
21Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
22---
23 drivers/net/ethernet/mellanox/mlx5/core/en_rep.c | 9 +++++++--
24 1 file changed, 7 insertions(+), 2 deletions(-)
25
26--- a/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c
27+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c
28@@ -43,6 +43,11 @@
29 #include "en_tc.h"
30 #include "fs_core.h"
31
32+#define MLX5E_REP_PARAMS_LOG_SQ_SIZE \
33+ max(0x6, MLX5E_PARAMS_MINIMUM_LOG_SQ_SIZE)
34+#define MLX5E_REP_PARAMS_LOG_RQ_SIZE \
35+ max(0x6, MLX5E_PARAMS_MINIMUM_LOG_RQ_SIZE)
36+
37 static const char mlx5e_rep_driver_name[] = "mlx5e_rep";
38
39 static void mlx5e_rep_get_drvinfo(struct net_device *dev,
40@@ -798,9 +803,9 @@ static void mlx5e_build_rep_params(struc
41 MLX5_CQ_PERIOD_MODE_START_FROM_CQE :
42 MLX5_CQ_PERIOD_MODE_START_FROM_EQE;
43
44- params->log_sq_size = MLX5E_PARAMS_MINIMUM_LOG_SQ_SIZE;
45+ params->log_sq_size = MLX5E_REP_PARAMS_LOG_SQ_SIZE;
46 params->rq_wq_type = MLX5_WQ_TYPE_LINKED_LIST;
47- params->log_rq_size = MLX5E_PARAMS_MINIMUM_LOG_RQ_SIZE;
48+ params->log_rq_size = MLX5E_REP_PARAMS_LOG_RQ_SIZE;
49
50 params->rx_am_enabled = MLX5_CAP_GEN(mdev, cq_moderation);
51 mlx5e_set_rx_cq_mode_params(params, cq_period_mode);