Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp859648yba; Wed, 24 Apr 2019 10:45:50 -0700 (PDT) X-Google-Smtp-Source: APXvYqw+9S9B2uUqWZ5aXZIkJ/7HXCBJ6TaCXp1Ih0Lx7cG0mtX8JUCtLo8qVM8qXgVaC0uVuler X-Received: by 2002:a63:fa46:: with SMTP id g6mr32337641pgk.382.1556127950287; Wed, 24 Apr 2019 10:45:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556127950; cv=none; d=google.com; s=arc-20160816; b=WIU0oLerv3WHvbFKOE07MZ7/AJa/rglAoVa1RW89LbAF/hOemm+LfP2wd9s8+Sjgro HS+Fg6Pr/qG9YJCHhGdrbvksGO32TaKTZSfC3as6+iaWp0C57tzwc4T3oRmLozBVgi9o 18hMvm6XRyv06HNyzrfFYZ/ekMMl49cNlMu3T2A5mwDGlcZXP+yuqucPYpmQ7aGmNbCT VZYI6JcoOMb+HjZ028F8GjTpD23HnSIT/gBZrxsVC0gr1WPYeP3gR+lyQWYixrEWxRxb FEWKU8T7vTOxBCsIZcnO6duv3RQetGUTeCyuGZL3t1ldSyL0KVcldjLYixKKZ9Wo6+dc 1EDA== 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=+uVJTfM9Q3MZPzWrXwwOEOcdyWuckEuDX5ngWHOQ9QI=; b=VJRCD1y//X8fLBhRZskTtKXDVa5jFXK/QaPYFL3ZFckpr+xrbWn2+NsCa++KNf6yBe Ra/02u1sFRMvNI5hRDP3RnQcscQ/M2Ye7VO+FDc4kQwzqqAdOqYTQuun/yEkvS84X1Eq WjhT3EfQG+vQDv0WYS9SZvz644WJN2GO/4lKQWm0eqvnWrpp+vd9pJ5HAmuw6/3nq9e5 gen0VD8EaSripPHIvePoZvb0OPRfJurzduJU3jo3HaZNPDk86Wj10iyhpUrPBpbHyR9p XJyFcXpLq74xc4iz1h50WbHrwrtdgFbjH8UXbNTzhCk6QW+ZpMROvkTFPxZeMC6HJart 6OCg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=pnI7hYTx; 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 l10si11356061pgg.536.2019.04.24.10.45.34; Wed, 24 Apr 2019 10:45:50 -0700 (PDT) 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=pnI7hYTx; 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 S2390660AbfDXRej (ORCPT + 99 others); Wed, 24 Apr 2019 13:34:39 -0400 Received: from mail.kernel.org ([198.145.29.99]:33416 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390550AbfDXRee (ORCPT ); Wed, 24 Apr 2019 13:34:34 -0400 Received: from localhost (62-193-50-229.as16211.net [62.193.50.229]) (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 6F8FA2054F; Wed, 24 Apr 2019 17:34:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1556127273; bh=z981xmIv5GFseVieToUS3RoWgludgzJjPyZ6c/6qReE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=pnI7hYTx8jMQbrfe0WSn08w8u4camP2bPYyQ/zQ6jmn9gEHHX9EM4y546Ne6ptC2G LK+44WVphzygTtrMeIoFrcP+98H2bjAcbXXDkQp9y8z56Pe9YDUyuXBz9dHMqx0TAz SCbFasC/lV02MU764/k9PP2k3Ti/1maymvEBiEUk= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Or Gerlitz , Avi Urman , Tariq Toukan , Saeed Mahameed Subject: [PATCH 5.0 032/115] Revert "net/mlx5e: Enable reporting checksum unnecessary also for L3 packets" Date: Wed, 24 Apr 2019 19:09:28 +0200 Message-Id: <20190424170926.932672175@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190424170924.797924502@linuxfoundation.org> References: <20190424170924.797924502@linuxfoundation.org> User-Agent: quilt/0.66 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 From: Or Gerlitz [ Upstream commit 8c8811d46d00d119ffbe039a6e52a0b504df1c2c ] This reverts commit b820e6fb0978f9c2ac438c199d2bb2f35950e9c9. Prior the commit we are reverting, checksum unnecessary was only set when both the L3 OK and L4 OK bits are set on the CQE. This caused packets of IP protocols such as SCTP which are not dealt by the current HW L4 parser (hence the L4 OK bit is not set, but the L4 header type none bit is set) to go through the checksum none code, where currently we wrongly report checksum unnecessary for them, a regression. Fix this by a revert. Note that on our usual track we report checksum complete, so the revert isn't expected to have any notable performance impact. Also, when we are not on the checksum complete track, the L4 protocols for which we report checksum none are not high performance ones, we will still report checksum unnecessary for UDP/TCP. Fixes: b820e6fb0978 ("net/mlx5e: Enable reporting checksum unnecessary also for L3 packets") Signed-off-by: Or Gerlitz Reported-by: Avi Urman Reviewed-by: Tariq Toukan Signed-off-by: Saeed Mahameed Signed-off-by: Greg Kroah-Hartman --- drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) --- a/drivers/net/ethernet/mellanox/mlx5/core/en_rx.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_rx.c @@ -848,8 +848,7 @@ static inline void mlx5e_handle_csum(str csum_unnecessary: if (likely((cqe->hds_ip_ext & CQE_L3_OK) && - ((cqe->hds_ip_ext & CQE_L4_OK) || - (get_cqe_l4_hdr_type(cqe) == CQE_L4_HDR_TYPE_NONE)))) { + (cqe->hds_ip_ext & CQE_L4_OK))) { skb->ip_summed = CHECKSUM_UNNECESSARY; if (cqe_is_tunneled(cqe)) { skb->csum_level = 1;