net/mlx5e: RX, Always prefer Linear SKB configuration

Prefer the linear SKB configuration of Legacy RQ over the
non-linear one of Striding RQ.

This implies that ConnectX-4 LX now uses legacy RQ by default,
as it does not support the linear configuration of Striding RQ.

Signed-off-by: Tariq Toukan <tariqt@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
This commit is contained in:
Tariq Toukan 2018-02-20 15:17:54 +02:00 committed by Saeed Mahameed
parent 069d11465a
commit 5ffd81943d
1 changed files with 10 additions and 3 deletions

View File

@ -4405,9 +4405,16 @@ void mlx5e_build_nic_params(struct mlx5_core_dev *mdev,
MLX5E_SET_PFLAG(params, MLX5E_PFLAG_RX_CQE_COMPRESS, params->rx_cqe_compress_def); MLX5E_SET_PFLAG(params, MLX5E_PFLAG_RX_CQE_COMPRESS, params->rx_cqe_compress_def);
/* RQ */ /* RQ */
if (mlx5e_striding_rq_possible(mdev, params)) /* Prefer Striding RQ, unless any of the following holds:
MLX5E_SET_PFLAG(params, MLX5E_PFLAG_RX_STRIDING_RQ, * - Striding RQ configuration is not possible/supported.
!slow_pci_heuristic(mdev)); * - Slow PCI heuristic.
* - Legacy RQ would use linear SKB while Striding RQ would use non-linear.
*/
if (!slow_pci_heuristic(mdev) &&
mlx5e_striding_rq_possible(mdev, params) &&
(mlx5e_rx_mpwqe_is_linear_skb(mdev, params) ||
!mlx5e_rx_is_linear_skb(mdev, params)))
MLX5E_SET_PFLAG(params, MLX5E_PFLAG_RX_STRIDING_RQ, true);
mlx5e_set_rq_type(mdev, params); mlx5e_set_rq_type(mdev, params);
mlx5e_init_rq_type_params(mdev, params); mlx5e_init_rq_type_params(mdev, params);