Skip to content

Commit 291f445

Browse files
Tariq ToukanSaeed Mahameed
authored andcommitted
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 <[email protected]> Signed-off-by: Saeed Mahameed <[email protected]>
1 parent 0608d4d commit 291f445

File tree

1 file changed

+6
-3
lines changed
  • drivers/net/ethernet/mellanox/mlx5/core

1 file changed

+6
-3
lines changed

drivers/net/ethernet/mellanox/mlx5/core/en_main.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,13 +113,16 @@ void mlx5e_init_rq_type_params(struct mlx5_core_dev *mdev,
113113
MLX5E_GET_PFLAG(params, MLX5E_PFLAG_RX_CQE_COMPRESS));
114114
}
115115

116+
static bool slow_pci_heuristic(struct mlx5_core_dev *mdev);
117+
116118
static void mlx5e_set_rq_params(struct mlx5_core_dev *mdev,
117119
struct mlx5e_params *params)
118120
{
119121
u8 rq_type = mlx5e_check_fragmented_striding_rq_cap(mdev) &&
120-
!params->xdp_prog && !MLX5_IPSEC_DEV(mdev) ?
121-
MLX5_WQ_TYPE_LINKED_LIST_STRIDING_RQ :
122-
MLX5_WQ_TYPE_LINKED_LIST;
122+
!slow_pci_heuristic(mdev) &&
123+
!params->xdp_prog && !MLX5_IPSEC_DEV(mdev) ?
124+
MLX5_WQ_TYPE_LINKED_LIST_STRIDING_RQ :
125+
MLX5_WQ_TYPE_LINKED_LIST;
123126
mlx5e_init_rq_type_params(mdev, params, rq_type);
124127
}
125128

0 commit comments

Comments
 (0)