From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796381265; b=3OuVaaCAmte0ZRk+aWaENS1Yn94KE3sq1yx6bkrT4gQZ43hP8Vrd4MqVryW0La3UO3Pm KBNyli1aEuU8aaBBuPXFcsUSgg96ZNlPZoPI1cjpOYuL/Do4oo9H1kUum0Ptqn8gOLhlq GD31y9nJwMrkMkr2B6zO859YY2lcwfIJPUbm95HFJQYam6OVAV0pHke+DdMRXYFf9L8ng DcYlc0kXkHMvBxvSsx+WxFpk8/vYSp57w97F7DafClW7y7aaRCSFbYX7x7uQ7bttSITz1 zdc7yV/0GrvBa9138Pu1IHqyMoyc27iUpHCi2acllw+wmSfoaKotTHKwvQz0cTfM1EA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796381265; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:User-Agent:X-stable:X-Patchwork-Hint: MIME-Version:Content-Transfer-Encoding; bh=o4QSMOvwCKe3/7NhgrXmTfys09rkWJyVzutzkJ0ZO0w=; b=mcHrspP/yAzk4Bb8Na4L7cHQl6uqkISQvf3DqvR5I6YJfcRZTYQIzk3j+CyLeIzRy/zn 8nQp9zjyL+I8TaJRxL3yRWOt5M8zMoypOWufOeekiQQWUmmRgeYiHoTK1N/Xr4o3MnTQl ZD6ohkwwDtQ8vtTjJ6pahvSnyBXSX9pFCL/UfBxYioba6L960SMFqrigveO9NQX8obIh3 c5CKppgBFcrTyjWy+1gdMlYiXODf1PD15ATfxXIU9yG3/M7t1ABlwpRVZucyL9RaSZz7G MIQFqq5MIRTGuHU7XRpe7y28/DzLS37Pvt+qAzT1I0s1pTxqfTTKHRT470hGS0qWLnQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=f89NZ0rq; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E1E2F606A33D; Fri, 4 Dec 2026 10:47:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=f89NZ0rq Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5E9181F000C2; Fri, 4 Dec 2026 10:47:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796381264; bh=o4QSMOvwCKe3/7NhgrXmTfys09rkWJyVzutzkJ0ZO0w=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=f89NZ0rqBinbhugCVZaKb6fdoi394fChudge4jxeleIv9NOhZ2OPQbsX2goTrO6Jb nEHBI3qCltp1QKOjS/S5OyxooiCstZ5jvs79KlR5N18wXKqBc5bCsSCiAR7vBzUYyV BcsHmxXE9VRbnzaSKeHU5MBzubXNYk/WDdIDnz50= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Christian Schmidbauer , Maxime Chevallier , Paolo Abeni Subject: [PATCH 7.3 631/742] net: stmmac: dwmac1000: stop hardware from dropping checksum-error packets Date: Fri, 4 Dec 2026 19:08:15 +0900 Message-ID: <20261204100651.858665023@linuxfoundation.org> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261204100635.034361255@linuxfoundation.org> References: <20261204100635.034361255@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore X-Mailing-List: stable@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 7.3-stable review patch. If anyone has any objections, please let me know. ------------------ From: Christian Schmidbauer commit 2dd48c4615a67ebb1762c2b0d79801be1949fcfb upstream. When the checksum offload engine (CoE) is enabled, the dwmac1000 MAC silently drops any frame for which the engine detects a checksum error, before the driver sees it. This breaks VXLAN over IPv6 with zero UDP checksums, which RFC 6935 and RFC 6936 allow for tunnels. Set DMA_CONTROL_DT so that such frames are delivered instead of dropped, as commit fe4042797651 ("net: stmmac: dwmac4: stop hardware from dropping checksum-error packets") did for dwmac4. CoE remains enabled, so the driver still sees the error status and marks the skb CHECKSUM_NONE for the stack to verify. Set the bit only with enhanced descriptors. The normal descriptor parser does not report a checksum-only error to the stack, so cores that use it keep dropping such frames in hardware anyway. Tested on an Aruba AP-325 (ipq806x-gmac-dwmac) with Rx checksum offload on. Link: https://lore.kernel.org/all/20250625132117.1b3264e8@kernel.org/ Link: https://github.com/freifunk-gluon/gluon/issues/3783 Fixes: 47dd7a540b8a ("net: add support for STMicroelectronics Ethernet controllers.") Cc: # 6.6.x: ee0aace5f844: net: stmmac: Correctly handle Rx checksum offload errors Cc: # 6.6.x Signed-off-by: Christian Schmidbauer Reviewed-by: Maxime Chevallier Tested-by: Maxime Chevallier Link: https://patch.msgid.link/20261114133640.3285413-4-opensource@grische.xyz Signed-off-by: Paolo Abeni Signed-off-by: Greg Kroah-Hartman --- drivers/net/ethernet/stmicro/stmmac/dwmac1000.h | 2 +- drivers/net/ethernet/stmicro/stmmac/dwmac1000_dma.c | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) --- a/drivers/net/ethernet/stmicro/stmmac/dwmac1000.h +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac1000.h @@ -162,7 +162,7 @@ enum rx_tx_priority_ratio { /* DMA CRS Control and Status Register Mapping */ /* DMA operation mode defines (start/stop tx/rx are placed in common header)*/ -/* Disable Drop TCP/IP csum error */ +#define DMA_CONTROL_DT 0x04000000 /* Disable Drop of TCP/IP csum errors */ #define DMA_CONTROL_RSF 0x02000000 /* Receive Store and Forward */ #define DMA_CONTROL_DFF 0x01000000 /* Disaable flushing */ /* Threshold for Activating the FC */ --- a/drivers/net/ethernet/stmicro/stmmac/dwmac1000_dma.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac1000_dma.c @@ -15,6 +15,7 @@ #include #include "dwmac1000.h" #include "dwmac_dma.h" +#include "stmmac.h" static void dwmac1000_dma_axi(void __iomem *ioaddr, struct stmmac_axi *axi) { @@ -129,6 +130,13 @@ static void dwmac1000_dma_operation_mode { u32 csr6 = readl(ioaddr + DMA_CHAN_CONTROL(channel)); + /* Deliver checksum-error frames only with enhanced + * descriptors, because the normal descriptor parser does not + * report a checksum-only error. + */ + if (priv->plat->enh_desc) + csr6 |= DMA_CONTROL_DT; + if (mode == SF_DMA_MODE) { pr_debug("GMAC: enable RX store and forward mode\n"); csr6 |= DMA_CONTROL_RSF | DMA_CONTROL_DFF;