From: Maxime Chevallier <maxime.chevallier@bootlin.com>
To: Christian Schmidbauer <opensource@grische.xyz>, netdev@vger.kernel.org
Cc: andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@kernel.org,
kuba@kernel.org, pabeni@redhat.com,
Oleksij Rempel <o.rempel@pengutronix.de>,
stable@vger.kernel.org,
Maxime Coquelin <mcoquelin.stm32@gmail.com>,
Alexandre Torgue <alexandre.torgue@foss.st.com>,
Alexei Starovoitov <ast@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>,
Jesper Dangaard Brouer <hawk@kernel.org>,
John Fastabend <john.fastabend@gmail.com>,
Stanislav Fomichev <sdf@fomichev.me>,
Ong Boon Leong <boon.leong.ong@intel.com>,
linux-stm32@st-md-mailman.stormreply.com,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, bpf@vger.kernel.org
Subject: Re: [PATCH net v3 1/3] net: stmmac: honour Rx checksum errors in the AF_XDP zero-copy path
Date: Tue, 17 Nov 2026 15:54:22 +0100 [thread overview]
Message-ID: <d06c6f0c-a0cc-4b6c-a0ec-eb459ea0eaef@bootlin.com> (raw)
In-Reply-To: <20261114133640.3285413-2-opensource@grische.xyz>
Hi,
On 11/14/26 14:36, Christian Schmidbauer wrote:
> 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: <stable@vger.kernel.org>
> Assisted-by: Claude:claude-opus-5-5
> Signed-off-by: Christian Schmidbauer <opensource@grische.xyz>
Reviewed-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
Maxime
> ---
> drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 8 +++++---
> 1 file changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> index 7ffed295eb14..3e5803db19b4 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> @@ -5547,7 +5547,7 @@ static struct sk_buff *stmmac_construct_skb_zc(struct stmmac_channel *ch,
>
> 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];
> @@ -5575,7 +5575,8 @@ static void stmmac_dispatch_skb_zc(struct stmmac_priv *priv, u32 queue,
>
> 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;
> @@ -5789,7 +5790,8 @@ static int stmmac_rx_zc(struct stmmac_priv *priv, int limit, u32 queue)
>
> 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:
next prev parent reply other threads:[~2026-11-17 14:54 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-14 13:36 [PATCH net v3 0/3] net: stmmac: deliver frames with Rx checksum errors to the stack Christian Schmidbauer
2026-11-14 13:36 ` [PATCH net v3 1/3] net: stmmac: honour Rx checksum errors in the AF_XDP zero-copy path Christian Schmidbauer
2026-11-17 14:54 ` Maxime Chevallier [this message]
2026-11-14 13:36 ` [PATCH net v3 2/3] net: stmmac: dwmac1000: don't discard frames with only a checksum error Christian Schmidbauer
2026-11-17 14:56 ` Maxime Chevallier
2026-11-14 13:36 ` [PATCH net v3 3/3] net: stmmac: dwmac1000: stop hardware from dropping checksum-error packets Christian Schmidbauer
2026-11-17 14:58 ` Maxime Chevallier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d06c6f0c-a0cc-4b6c-a0ec-eb459ea0eaef@bootlin.com \
--to=maxime.chevallier@bootlin.com \
--cc=alexandre.torgue@foss.st.com \
--cc=andrew+netdev@lunn.ch \
--cc=ast@kernel.org \
--cc=boon.leong.ong@intel.com \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=edumazet@kernel.org \
--cc=hawk@kernel.org \
--cc=john.fastabend@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=mcoquelin.stm32@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=o.rempel@pengutronix.de \
--cc=opensource@grische.xyz \
--cc=pabeni@redhat.com \
--cc=sdf@fomichev.me \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.