From: Pascal Kneuper <PKneuper@dspace.de>
To: Maxime Chevallier <maxime.chevallier@bootlin.com>
Cc: kuba@kernel.org, andrew+netdev@lunn.ch, davem@davemloft.net,
edumazet@google.com, pabeni@redhat.com,
mcoquelin.stm32@gmail.com, alexandre.torgue@foss.st.com,
rmk+kernel@armlinux.org.uk, 0x1207@gmail.com,
si.yanteng@linux.dev, larysa.zaremba@intel.com,
aleksander.lobakin@intel.com, netdev@vger.kernel.org,
linux-stm32@st-md-mailman.stormreply.com,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, DBaldin@dspace.de
Subject: Re: [PATCH net v2] net: stmmac: restore NET_IP_ALIGN in the RX DMA offset
Date: Wed, 9 Sep 2026 10:57:29 +0200 (CEST) [thread overview]
Message-ID: <20260909085731.108922-1-PKneuper@dspace.de> (raw)
In-Reply-To: <5aeb6fd1-f1c3-426d-a2c4-1ad45ddc8572@bootlin.com>
On Tue, 08 Sep 2026 22:58:05 +0200, Maxime Chevallier wrote:
> Hi again,
>
> On 9/8/26 10:16, Maxime Chevallier wrote:
> > Hi,
> >
> > On 8/24/26 14:50, Pascal Kneuper wrote:
> >> Since the RX path was converted to zero-copy, the page pool page is handed
> >> to the stack directly as the skb head, and the offset the DMA engine writes
> >> at is what determines the alignment of the packet headers.
> >>
> >> Before the conversion the payload was copied into an skb obtained from
> >> napi_alloc_skb(), which reserves NET_SKB_PAD + NET_IP_ALIGN. The
> >> conversion moved the headroom into stmmac_rx_offset() but did not carry
> >> over NET_IP_ALIGN, so on architectures where NET_IP_ALIGN is 2 the IP
> >> header now lands misaligned:
> >>
> >> 64 (NET_SKB_PAD) + 14 (ethernet) + 20 (IP) = 98
> >>
> >> Same for the XDP branch:
> >>
> >> 256 (XDP_PACKET_HEADROOM) + 14 (ethernet) + 20 (IP) = 290
> >>
> >> On ARM32 this is fatal, because ldm and ldrd trap on unaligned addresses
> >> even when CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS is set.
>
> > This patch breaks the stmmac selftests for Jumbo Frames on dwmac1000 :(
> So looks like the problem isn't this patch, but rather both the way we select
> the bufsize, and the Jumbo test itself :)
>
> This merely surfaces existing problems, I have some fixes that I'll send shortly.
>
> Maxime
>
Great! Thanks for testing and keeping us posted :)
Best
Pascal
prev parent reply other threads:[~2026-09-09 8:57 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-13 9:29 [PATCH net] net: stmmac: restore NET_IP_ALIGN in the non-XDP RX path Pascal Kneuper
2026-08-18 1:22 ` Jakub Kicinski
2026-08-24 12:13 ` Pascal Kneuper
2026-08-24 12:50 ` [PATCH net v2] net: stmmac: restore NET_IP_ALIGN in the RX DMA offset Pascal Kneuper
2026-08-24 14:23 ` David Laight
2026-08-27 19:40 ` patchwork-bot+netdevbpf
2026-09-08 8:16 ` Maxime Chevallier
[not found] ` <5aeb6fd1-f1c3-426d-a2c4-1ad45ddc8572@bootlin.com>
2026-09-09 8:57 ` Pascal Kneuper [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=20260909085731.108922-1-PKneuper@dspace.de \
--to=pkneuper@dspace.de \
--cc=0x1207@gmail.com \
--cc=DBaldin@dspace.de \
--cc=aleksander.lobakin@intel.com \
--cc=alexandre.torgue@foss.st.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=larysa.zaremba@intel.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=maxime.chevallier@bootlin.com \
--cc=mcoquelin.stm32@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=rmk+kernel@armlinux.org.uk \
--cc=si.yanteng@linux.dev \
/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