Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Maxime Chevallier <maxime.chevallier@bootlin.com>
To: James Clark <jjc@jclark.com>, Andrew Lunn <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@kernel.org>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Maxime Coquelin <mcoquelin.stm32@gmail.com>,
	Alexandre Torgue <alexandre.torgue@foss.st.com>,
	Rohan G Thomas <rohan.g.thomas@altera.com>
Cc: netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com,
	linux-arm-kernel@lists.infradead.org,
	"Alexandra Østermark" <alex.cramt@gmail.com>
Subject: Re: [PATCH net] net: stmmac: dwmac-socfpga: disable split header on Agilex 5
Date: Tue, 1 Dec 2026 00:14:43 +0100	[thread overview]
Message-ID: <19878e38-4d48-401c-b3fb-24ea6b428f66@bootlin.com> (raw)
In-Reply-To: <20261126031300.211248-1-jjc@jclark.com>

Hi,

On 11/26/26 04:13, James Clark wrote:
> On Agilex 5, received IPv4 fragments are corrupted when RX checksum
> offload is on.
> 
> This was observed as corrupted downloads on a Terasic DE25-Nano over
> a PPPoE connection with TCP MSS not clamped. It can be reproduced by
> running ping -s 2000 to another host on the LAN: ping reports every
> reply as corrupted.
> 
> Agilex 5 has an XGMAC core, and stmmac turns split header on whenever
> RX checksum offload is on.
> 
> Set STMMAC_FLAG_SPH_DISABLE for Agilex 5. Other glue drivers set this
> flag already. The same failure with fragmented ping is described in
> commit 47f753c1108e ("net: stmmac: disable Split Header (SPH) for Intel
> platforms"), which noted that according to the DesignWare Ethernet
> QoS (not XGMAC) datasheet, split header is not supported for IPv4
> fragments.
> 
> With the flag set, fragments are received intact.
> 
> Fixes: 93d46ea3e984 ("net: stmmac: socfpga: Agilex5 EMAC platform configuration")
> Cc: stable@vger.kernel.org
> Signed-off-by: James Clark <jjc@jclark.com>

Maybe there's a way to properly process these unsplit packets, it seems to
me (running some tests on DE25-nano too) that the first 256 bytes are in
buf1 (matches HDSMS, the max size of the header) and the rest is in buf2 but I
haven't dug deeper. I'll drop a message to Synopsys, maybe they can shed some
light here.

In the meantime, let's have that disabled on this glue, and wait to see if
any other XGMAC glues face that.

Reviewed-by: Maxime Chevallier <maxime.chevallier@bootlin.com>

Thanks,

Maxime

> ---
> I used an LLM coding assistant to help prepare this patch.
> 
>  drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c
> index 3a89c4da2af5..28ffa5ad12d7 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c
> @@ -578,6 +578,9 @@ static void socfpga_agilex5_setup_plat_dat(struct socfpga_dwmac *dwmac)
>  	/* Enable TSO */
>  	plat_dat->flags |= STMMAC_FLAG_TSO_EN;
>  
> +	/* Disable split header */
> +	plat_dat->flags |= STMMAC_FLAG_SPH_DISABLE;
> +
>  	/* Enable TBS */
>  	switch (plat_dat->tx_queues_to_use) {
>  	case 8:



      parent reply	other threads:[~2026-11-30 23:15 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-26  3:13 [PATCH net] net: stmmac: dwmac-socfpga: disable split header on Agilex 5 James Clark
2026-11-27  3:16 ` netdev-bot+sashiko
2026-11-27  4:38   ` James Clark
2026-11-30 23:14 ` Maxime Chevallier [this message]

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=19878e38-4d48-401c-b3fb-24ea6b428f66@bootlin.com \
    --to=maxime.chevallier@bootlin.com \
    --cc=alex.cramt@gmail.com \
    --cc=alexandre.torgue@foss.st.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@kernel.org \
    --cc=jjc@jclark.com \
    --cc=kuba@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-stm32@st-md-mailman.stormreply.com \
    --cc=mcoquelin.stm32@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=rohan.g.thomas@altera.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox