Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp50663imu; Thu, 8 Nov 2018 14:35:41 -0800 (PST) X-Google-Smtp-Source: AJdET5eNCa0V2pw9hokvOp6XZRxQSNxfuveDrRhQsgXkMrQkW5mJ1PP3KX/9oTZUJqiLU+btsvXe X-Received: by 2002:a17:902:4d46:: with SMTP id o6-v6mr6435847plh.104.1541716541244; Thu, 08 Nov 2018 14:35:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541716541; cv=none; d=google.com; s=arc-20160816; b=rFVVRK87aXQi/BzSEX7EfA+NISlxuK/j2LTIlaNnjhCP+GrhOweG4YIhEOFDsmiJ9F cmYkGT/bvmSnd6Lme2cSiT6Hx0+A5jjJtpq3AB4TW4Ck2az6s8nb5yIKj8DWK6lH8ZgZ b9wU1EA+uQbBwP4/JYhskzEhqmWjuGrhPbll7Rx7DaCphBOJ3qLbmMMvTe/kRVLR7kb1 8XxBk7Mc5Hal4EaRscNfTzApD9nlmqz1AYDkAi5WCkLI0gdBVblNhX1sZEhiMyL7U3t2 arz2wcwMObbOzRtPd7so1mJEzlBejyUWwuby4qoCx7yfZYXd32otzCZeCNzmVum+0+Zb TEGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=26+IPqtrRZfGys6k5bfLPp6HpCGFXpnBlEW5nT01De4=; b=0/Uird/mPbE7YF2eu3JseF89xHmwmZVQ9ua7bYWtE1GDbTa0/GN8Fub8axDotaHn4s myI+NmE0lVwTKBsbUHR28lmZkVBcVloGXcCCBIlph+nn3Ds05a4+AADrmuqABWwqoC/I 6/lKUiuWLXVEhDygzQ2PTb43kcr8OOPFyXwwxIcMPutgS1Hb4AalfmnVGg7KKGUENEd1 biX5BBtgh59l2lj9rIQuVDhdjPl10GCSwLpEILgK/84iRVYHZW6SLuhjfBzvPQkamRWt WIrhDJAjUQj/F6eP5MAicTSEDH0FFsZaE5hZl04tp1SvpiRKZRdU2SHo95c6Uag94xmI RTZw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=RaZeAR+K; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l68-v6si6046142pfl.56.2018.11.08.14.35.25; Thu, 08 Nov 2018 14:35:41 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=RaZeAR+K; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730207AbeKIHhV (ORCPT + 99 others); Fri, 9 Nov 2018 02:37:21 -0500 Received: from mail.kernel.org ([198.145.29.99]:55182 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730201AbeKIHhT (ORCPT ); Fri, 9 Nov 2018 02:37:19 -0500 Received: from localhost (unknown [208.72.13.198]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 25B192146E; Thu, 8 Nov 2018 21:59:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1541714391; bh=XxOfmgCzmOkJ0Urq4aL12+m9+6VvRGsZhZynZUEKqM4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RaZeAR+K5XDlvRN0Kt9sfrP8ozN9YL+kWBCPgbDQQ6vaI63XN6vI9QRdMGBTzvg5J 2UmZrxDH49YFCFvbt9RdEThOUkszjMTZO27dGLi+jCxo7HcaHsXD8WrdoRn3wCNi+x E4ei+KfGH5SBshBTK+434nXS6QoTyJFQbGXoOyv0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Tariq Toukan , Saeed Mahameed , "David S. Miller" , Sasha Levin Subject: [PATCH 4.4 055/114] net/mlx5e: Fix LRO modify Date: Thu, 8 Nov 2018 13:51:10 -0800 Message-Id: <20181108215106.095773567@linuxfoundation.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181108215059.051093652@linuxfoundation.org> References: <20181108215059.051093652@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.4-stable review patch. If anyone has any objections, please let me know. ------------------ [ Upstream commit ab0394fe2c258fdb5086c51a251b28f8ee7ab35c ] Ethtool LRO enable/disable is broken, as of today we only modify TCP TIRs in order to apply the requested configuration. Hardware requires that all TIRs pointing to the same RQ should share the same LRO configuration. For that all other TIRs' LRO fields must be modified as well. Fixes: 5c50368f3831 ('net/mlx5e: Light-weight netdev open/stop') Signed-off-by: Tariq Toukan Signed-off-by: Saeed Mahameed Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c index 90e876ecc720..765b069d6a90 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c @@ -1304,7 +1304,7 @@ static void mlx5e_build_tir_ctx_lro(void *tirc, struct mlx5e_priv *priv) lro_timer_supported_periods[2])); } -static int mlx5e_modify_tir_lro(struct mlx5e_priv *priv, int tt) +static int mlx5e_modify_tirs_lro(struct mlx5e_priv *priv) { struct mlx5_core_dev *mdev = priv->mdev; @@ -1312,6 +1312,7 @@ static int mlx5e_modify_tir_lro(struct mlx5e_priv *priv, int tt) void *tirc; int inlen; int err; + int tt; inlen = MLX5_ST_SZ_BYTES(modify_tir_in); in = mlx5_vzalloc(inlen); @@ -1323,7 +1324,11 @@ static int mlx5e_modify_tir_lro(struct mlx5e_priv *priv, int tt) mlx5e_build_tir_ctx_lro(tirc, priv); - err = mlx5_core_modify_tir(mdev, priv->tirn[tt], in, inlen); + for (tt = 0; tt < MLX5E_NUM_TT; tt++) { + err = mlx5_core_modify_tir(mdev, priv->tirn[tt], in, inlen); + if (err) + break; + } kvfree(in); @@ -1870,8 +1875,10 @@ static int mlx5e_set_features(struct net_device *netdev, mlx5e_close_locked(priv->netdev); priv->params.lro_en = !!(features & NETIF_F_LRO); - mlx5e_modify_tir_lro(priv, MLX5E_TT_IPV4_TCP); - mlx5e_modify_tir_lro(priv, MLX5E_TT_IPV6_TCP); + err = mlx5e_modify_tirs_lro(priv); + if (err) + mlx5_core_warn(priv->mdev, "lro modify failed, %d\n", + err); if (was_opened) err = mlx5e_open_locked(priv->netdev); -- 2.17.1