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=1796381267; b=eXBYxAnU5USHwaJTw2m+WVN9Zyn7iJQ04E2XypiuAMnLoJxJ5kRXkVOW4q0xU7SOgmhD kw/Kz8zlsthy1GcgK8p/AxxLg+8U5Hudyk+8XB1Kb2S28/0lkpqSG/yNB6Lk1X6RKNA0i EimuxSlmsWid0j7oZNxaFDkbGwpziYXRVyGGYQ8k8BKAo9uXWTdKFlpu00MOcMroJSNPh 2Rt5GsmMALcsg/5Om5YNrTVMsH/fn4FZ6VvkfKAmarxt4gi1JXSZsjRn74lb/roJ6QH1h pX+nfrUY4ot6NufTgfDxF3X5EhrjZ+4Tdx/DNCVX+QFaCTM7S1jdVJxc6vF7BP4z7Fw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796381267; 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=QaUbXjkhKmKzPi6EHcW4+0wLKI3JPks1puBOpH92wA8=; b=s6Eaj2gTnu7ULeNtG+sgI2ySbvd8mXk7Emm2c6MH/RR6L6sWo7GoJxgT9pjR3pB0GbGU 54PBwhh/lI/7Kn6QbI0xYjVBwRkQ7lze6qdgyIiMVHVE0eITFxS8lHA06Gb81RRZip5yj 5gUfvkHo65ce8YffmPGlOtJnEXC6nPjAqYqd4LcIunj+bl2sz/evNR7QVf7AjS7/z0PRT d8JjpCZujQhSawccxxY+lvjupCuMsy9DxnVwtf/L5kzMDGz1eyzuvjxOQ9mCYM0eb9isZ l/GwhQ+/dbQkcjXkTuS8VZKtmFaDU5f721/txN772FHvzkLvufVpl6ugCNLGdrkI0UA== 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=uo9H4jXB; 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 9F032606A337; Fri, 4 Dec 2026 10:47:47 +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=uo9H4jXB Received: by smtp.kernel.org (Postfix) with ESMTPSA id A6A601F00897; Fri, 4 Dec 2026 10:47:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796381267; bh=QaUbXjkhKmKzPi6EHcW4+0wLKI3JPks1puBOpH92wA8=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=uo9H4jXBI8PkMIi9t0T9x9KZbKzM1wyN54u78C4+XZhZX3Y3Zsx0yrixCvPdLAJxs QJRt2Pda3XbudmjB4OrezHG5xuYtOfjlCMWDj8pnGb8ikQSdsFDlWZpDe1omxKoTav hVtV/QhSaw65gzoKnw2KIHbZMYK/6/P1JQTciN8o= 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 632/742] net: stmmac: honour Rx checksum errors in the AF_XDP zero-copy path Date: Fri, 4 Dec 2026 19:08:16 +0900 Message-ID: <20261204100651.885886001@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 fcfc52fcf89a3076c3a9afbbc70c0fecd2b5fc8d upstream. Commit ee0aace5f844 ("net: stmmac: Correctly handle Rx checksum offload errors") taught stmmac_rx() to honour the csum_none status, but stmmac_dispatch_skb_zc() still ignores it and sets CHECKSUM_UNNECESSARY for every IP frame whenever the checksum offload engine (CoE) is enabled. Since commit fe4042797651 ("net: stmmac: dwmac4: stop hardware from dropping checksum-error packets") dwmac4 delivers such frames instead of dropping them, so this path receives them. Mark the skb CHECKSUM_NONE when csum_none is set, as stmmac_rx() does. Fixes: bba2556efad6 ("net: stmmac: Enable RX via AF_XDP zero-copy") Cc: Signed-off-by: Christian Schmidbauer Reviewed-by: Maxime Chevallier Link: https://patch.msgid.link/20261114133640.3285413-2-opensource@grische.xyz Signed-off-by: Paolo Abeni Signed-off-by: Greg Kroah-Hartman --- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c @@ -5482,7 +5482,7 @@ static struct sk_buff *stmmac_construct_ static void stmmac_dispatch_skb_zc(struct stmmac_priv *priv, u32 queue, struct dma_desc *p, struct dma_desc *np, - struct xdp_buff *xdp) + struct xdp_buff *xdp, int status) { struct stmmac_rxq_stats *rxq_stats = &priv->xstats.rxq_stats[queue]; struct stmmac_channel *ch = &priv->channel[queue]; @@ -5510,7 +5510,8 @@ static void stmmac_dispatch_skb_zc(struc skb->protocol = eth_type_trans(skb, priv->dev); - if (unlikely(!coe) || !stmmac_has_ip_ethertype(skb)) + if (unlikely(!coe) || !stmmac_has_ip_ethertype(skb) || + (status & csum_none)) skb_checksum_none_assert(skb); else skb->ip_summed = CHECKSUM_UNNECESSARY; @@ -5732,7 +5733,8 @@ read_again: switch (res) { case STMMAC_XDP_PASS: - stmmac_dispatch_skb_zc(priv, queue, p, np, buf->xdp); + stmmac_dispatch_skb_zc(priv, queue, p, np, buf->xdp, + status); xsk_buff_free(buf->xdp); break; case STMMAC_XDP_CONSUMED: