From: Tariq Toukan Date: Thu, 2 Jan 2020 14:17:41 +0000 (+0200) Subject: net/mlx5e: Add missing LRO cap check X-Git-Tag: v5.7-rc1~146^2~315^2~14 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=02377e6edf135289ebdf6ff4b40a422db4b780ff;p=thirdparty%2Fkernel%2Flinux.git net/mlx5e: Add missing LRO cap check The LRO boolean state in params->lro_en must not be set in case the NIC is not capable. Enforce this check and remove the TODO comment. Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed --- diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c index 966983674663f..a4d3e1b6ab20f 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c @@ -4770,9 +4770,8 @@ void mlx5e_build_nic_params(struct mlx5e_priv *priv, mlx5e_build_rq_params(mdev, params); /* HW LRO */ - - /* TODO: && MLX5_CAP_ETH(mdev, lro_cap) */ - if (params->rq_wq_type == MLX5_WQ_TYPE_LINKED_LIST_STRIDING_RQ) { + if (MLX5_CAP_ETH(mdev, lro_cap) && + params->rq_wq_type == MLX5_WQ_TYPE_LINKED_LIST_STRIDING_RQ) { /* No XSK params: checking the availability of striding RQ in general. */ if (!mlx5e_rx_mpwqe_is_linear_skb(mdev, params, NULL)) params->lro_en = !slow_pci_heuristic(mdev);