]>
Commit | Line | Data |
---|---|---|
07ff4eea GKH |
1 | From foo@baz Tue Apr 10 23:20:08 CEST 2018 |
2 | From: Roi Dayan <roid@mellanox.com> | |
3 | Date: Wed, 28 Feb 2018 12:56:42 +0200 | |
4 | Subject: net/mlx5e: Fix traffic being dropped on VF representor | |
5 | ||
6 | From: Roi Dayan <roid@mellanox.com> | |
7 | ||
8 | ||
9 | [ Upstream commit 4246f698dd58e3c6246fa919ef0b0a1d29a57e4a ] | |
10 | ||
11 | Increase representor netdev RQ size to avoid dropped packets. | |
12 | The current size (two) is just too small to keep up with | |
13 | conventional slow path traffic patterns. | |
14 | Also match the SQ size to the RQ size. | |
15 | ||
16 | Fixes: cb67b832921c ("net/mlx5e: Introduce SRIOV VF representors") | |
17 | Signed-off-by: Roi Dayan <roid@mellanox.com> | |
18 | Reviewed-by: Paul Blakey <paulb@mellanox.com> | |
19 | Reviewed-by: Or Gerlitz <ogerlitz@mellanox.com> | |
20 | Signed-off-by: Saeed Mahameed <saeedm@mellanox.com> | |
21 | Signed-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); |