From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=185.246.85.4 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796080499; b=C3A5eNSgbPuh83Hwo2uu3UAoRCC2/nckdInIOVYdskrbajusFZfKPotZyMEECFkp6GtO KKZ5u3dIGqV8Yh8t8leQaBRQcAHPf67XhOhghphGzSW+nax1pcp+vJsKBk4UFAynb0dBg iTE2rApHrOOab+oEBDBx++i2yCnsmD4kSj0llzaHqKVYigiVOqhnIcOPuNa57KB7awYGq cMK23s4bK/i5mmmxg9gVXlhbaKtQWUyiX8PvRnC2rmMYaJNTXbjgu00JSoK0qe60REb+s pfBifWQTEoyIQdIYMY8nYjZIRn92BPfSGHeVEpNksSAJTSn3ighulqIda4iKP/YXVtg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796080499; h=DMARC-Filter:Received:Received:Received:DKIM-Signature:Message-ID: Date:MIME-Version:User-Agent:Subject:To:Cc:References: Content-Language:From:In-Reply-To:Content-Type: Content-Transfer-Encoding:X-Last-TLS-Session-Version; bh=KJofhADW0nGE3I7HbfwCQk9EzXGRZ1i+8zMVrNPvswE=; b=BMMJ3fLdZnumqFEogIdDcGrFIuOiz0PsqHOK3sAlfoGrrS0hAsNfILZQR5EdvXhkwdDi SoBYJ2a3Vj6EtDWDwKvfGmRVYUxyL13Rz+8gkt958yz8Mvv9btEXsKUR1s+i2xtMT+RIq 1iHwmfwQ8dB7zALXoVg9kTC1Er+bDnKU51NoTHN+k6jVUbMk1glQVJQPSd7QPmBMfHxdK 4OAaiR84mb4yxkT5mybVAePLuivLl0X2AaZbZA4o0/YuWTM2VNu4QVWJuUkTtJ3xXnqtx gY3ixJ8bgCLiDXMxCbJwhR41kjJqPswhxdkguh2MGb6Kkecj8dVPjWylZRHYqcvBiuw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass header.d=bootlin.com header.i=@bootlin.com header.a=rsa-sha256 header.s=dkim header.b=e9jrtFYm; arc=none smtp.remote-ip=185.246.85.4 Received: from smtpout-03.galae.net (smtpout-03.galae.net [185.246.85.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BEE08606A31A for ; Mon, 30 Nov 2026 23:14:58 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org BEE08606A31A Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.a=rsa-sha256 header.s=dkim header.b=e9jrtFYm Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-03.galae.net (Postfix) with ESMTPS id 097B64E4182C; Mon, 30 Nov 2026 23:14:57 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id BD3D86007C; Mon, 30 Nov 2026 23:14:56 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 9D37111EA05A6; Tue, 01 Dec 2026 00:14:45 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1796080491; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:content-language:in-reply-to:references; bh=KJofhADW0nGE3I7HbfwCQk9EzXGRZ1i+8zMVrNPvswE=; b=e9jrtFYmRmNITtXvXGKho5CluxeYIF7QB2EXpUtDYJVHX8pZAu0vRWOe5PmmW4yf8A4ng6 7Xy8W/fjeHFnUDWopF435r9U/fzbrqeFLkcn9wRnHE1LwMGoJLhGzTehaM++JguvgyjF1f Vxqfuc4LcMHdc8bB7an9uZNf2jLuy6e+jn/itNLhyowlUxmaoEE6InuqjYh+BzqE0LCsAi bzQqUc2g8bvvW5HmWSsm/F35mHmlAMk8H3AQgIC/oDklWWPUBH+mWPyBE1xhEnDdhwYLtT k7jTgeLHMdZULtDobdCZaUTBK+vxphTXsSC0WxwkhVyYdoW4N6327RBxTLxVag== Message-ID: <19878e38-4d48-401c-b3fb-24ea6b428f66@bootlin.com> Date: Tue, 1 Dec 2026 00:14:43 +0100 X-Mailing-List: netdev@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH net] net: stmmac: dwmac-socfpga: disable split header on Agilex 5 To: James Clark , Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Maxime Coquelin , Alexandre Torgue , Rohan G Thomas Cc: netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, =?UTF-8?Q?Alexandra_=C3=98stermark?= References: <20261126031300.211248-1-jjc@jclark.com> Content-Language: en-US From: Maxime Chevallier In-Reply-To: <20261126031300.211248-1-jjc@jclark.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Last-TLS-Session-Version: TLSv1.3 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 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 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: