From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A081CCD3424 for ; Fri, 1 May 2026 09:57:27 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 56A9D61769; Fri, 1 May 2026 09:57:27 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id P18ZxBUrXna8; Fri, 1 May 2026 09:57:26 +0000 (UTC) X-Comment: SPF check N/A for local connections - client-ip=140.211.166.142; helo=lists1.osuosl.org; envelope-from=intel-wired-lan-bounces@osuosl.org; receiver= DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org 8BB0C61B28 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org; s=default; t=1777629446; bh=1xTN6OsAVuW3jnezW6FjJSAEG6gFeBXpHPEFbG0OKV4=; h=From:To:Cc:Date:Subject:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From; b=gjjABjBsXLv2b1JF1mLh4UATGPI1dzE9HTGPUicQ+6Wl5NtymEjJLCnKKOwmCxIsC Zdu7qi/c5/+3aFbhln8xrqXNukeevQjQR5zUBN8VekAdO1a+RewoTDVD8UGW0q8GWC rAb2RCRG2mMidfnSKWbZWeL+Bm6GmWXysWAFtQNBB2fF41MjIhrYZZwSsY4ocHiTDO 0dXwvqHjoIlf3HtwgJOGyTk00RzuNOonGzKfJJxpGZJEVj/0FuSSaCaFVuRPwHXICv Lg08I3PJhOo7u6ONzqCyTA0omNgwX0fBRR1HP8EE+WGTYuq3IiC9Kpsdg2opZGxyIa CmiDAO8ETXbrA== Received: from lists1.osuosl.org (lists1.osuosl.org [140.211.166.142]) by smtp3.osuosl.org (Postfix) with ESMTP id 8BB0C61B28; Fri, 1 May 2026 09:57:26 +0000 (UTC) Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by lists1.osuosl.org (Postfix) with ESMTP id 5A3CC127 for ; Fri, 1 May 2026 09:57:25 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 3F6B161B28 for ; Fri, 1 May 2026 09:57:25 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id qsJ_kV1qoXDz for ; Fri, 1 May 2026 09:57:24 +0000 (UTC) Received-SPF: None (mailfrom) identity=mailfrom; client-ip=2a00:1450:4864:20::332; helo=mail-wm1-x332.google.com; envelope-from=matt@readmodwrite.com; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp3.osuosl.org A374561769 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org A374561769 Received: from mail-wm1-x332.google.com (mail-wm1-x332.google.com [IPv6:2a00:1450:4864:20::332]) by smtp3.osuosl.org (Postfix) with ESMTPS id A374561769 for ; Fri, 1 May 2026 09:57:23 +0000 (UTC) Received: by mail-wm1-x332.google.com with SMTP id 5b1f17b1804b1-483487335c2so19320335e9.2 for ; Fri, 01 May 2026 02:57:23 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1777629441; x=1778234241; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=1xTN6OsAVuW3jnezW6FjJSAEG6gFeBXpHPEFbG0OKV4=; b=T3GOzc4FTZ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8FMYf0KZHqKFa3bhLSor X-Received: by 2002:a05:600c:154d:b0:485:39b2:a47c with SMTP id 5b1f17b1804b1-48a8452db0fmr108898045e9.25.1777629441256; Fri, 01 May 2026 02:57:21 -0700 (PDT) Received: from matt-Precision-5490.. ([2a09:bac6:37a8:26d2::3de:68]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-48a8eb3427fsm73837315e9.0.2026.05.01.02.57.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 May 2026 02:57:20 -0700 (PDT) From: Matt Fleming To: Tony Nguyen Cc: Aleksandr Loktionov , kernel-team@cloudflare.com, Matt Fleming , stable@vger.kernel.org, Simon Horman , Przemek Kitszel , Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Eric Joyner , Paul Greenwalt , Alice Michael , intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Date: Fri, 1 May 2026 10:57:17 +0100 Message-ID: <20260501095717.1032151-1-matt@readmodwrite.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=readmodwrite-com.20251104.gappssmtp.com; s=20251104; t=1777629441; x=1778234241; darn=lists.osuosl.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=1xTN6OsAVuW3jnezW6FjJSAEG6gFeBXpHPEFbG0OKV4=; b=HxRtlYZJqF+BgSgNXo4plj7uNnwuQ6ORUvYuLiI25R38OLd6rJ5YGabrUV3XtT9kCP d5b/uryap/MrSIfs96YFpJkkIp9x/fTPlOrC3sA9riqVPtOdtBJC0kS2/Ej/MfjaBDxg Qre4m42VqihqKJL4k9Q+uPd+SwRKQZx+gXAkNqhoduVIbVQyKFpmpFh70oHdw9OSHF9M 8b+Io/6M3kaq/SuaHsT6J1LhdIACRcGzXROSwmFUjbZVwg9pxhh51mHSU83V0iwVmU/T XpyQNQ/RFzYbXVZMsCd9ZYJWpAEXxpev6uZhf7ewuSevkhmxVkpWfIB+GBhKvMaY2HVA gp3g== X-Mailman-Original-Authentication-Results: smtp3.osuosl.org; dmarc=none (p=none dis=none) header.from=readmodwrite.com X-Mailman-Original-Authentication-Results: smtp3.osuosl.org; dkim=pass (2048-bit key, unprotected) header.d=readmodwrite-com.20251104.gappssmtp.com header.i=@readmodwrite-com.20251104.gappssmtp.com header.a=rsa-sha256 header.s=20251104 header.b=HxRtlYZJ Subject: [Intel-wired-lan] [PATCH net v2] ice: Fix missing 1's complement negation in GCS raw checksum X-BeenThere: intel-wired-lan@osuosl.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Intel Wired Ethernet Linux Kernel Driver Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-wired-lan-bounces@osuosl.org Sender: "Intel-wired-lan" From: Matt Fleming Commit 905d1a220e8d ("ice: Add E830 checksum offload support") added Generic Checksum (GCS) support for E830 NICs but omitted the 1's complement negation (~) when converting the hardware raw_csum to skb->csum for CHECKSUM_COMPLETE. Without the negation, every CHECKSUM_COMPLETE packet fails the fast-path validation in nf_ip_checksum() and falls through to software checksumming via __skb_checksum_complete(), which triggers the rate-limited "hw csum failure" warning. Packets are still accepted (the software recheck passes) but hardware checksum offload is effectively disabled and the warning floods dmesg on systems running nf_conntrack on VLAN sub-interfaces. Multiple other drivers (idpf, ehea, iwlwifi, cassini, sunhme, enetc) also apply ~ for CHECKSUM_COMPLETE. The ice driver was the only in-tree user of csum_unfold() for CHECKSUM_COMPLETE that omitted it. Fixes: 905d1a220e8d ("ice: Add E830 checksum offload support") Cc: stable@vger.kernel.org Reviewed-by: Aleksandr Loktionov Reviewed-by: Simon Horman Signed-off-by: Matt Fleming --- v2: - Add Cc: stable@vger.kernel.org (Aleksandr) - Pick up Reviewed-by tags from Aleksandr and Simon - No code changes v1: https://lore.kernel.org/netdev/20260408190214.1287708-1-matt@readmodwrite.com/ drivers/net/ethernet/intel/ice/ice_txrx_lib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/intel/ice/ice_txrx_lib.c b/drivers/net/ethernet/intel/ice/ice_txrx_lib.c index e695a664e53d..c177579e0114 100644 --- a/drivers/net/ethernet/intel/ice/ice_txrx_lib.c +++ b/drivers/net/ethernet/intel/ice/ice_txrx_lib.c @@ -92,7 +92,7 @@ static void ice_rx_gcs(struct sk_buff *skb, desc = (struct ice_32b_rx_flex_desc_nic *)rx_desc; skb->ip_summed = CHECKSUM_COMPLETE; csum = (__force u16)desc->raw_csum; - skb->csum = csum_unfold((__force __sum16)swab16(csum)); + skb->csum = csum_unfold((__force __sum16)~swab16(csum)); } /** -- 2.43.0