Re: [PATCH net v2] net: stmmac: restore NET_IP_ALIGN in the RX DMA offset
From: Pascal Kneuper <hidden>
Date: 2026-09-09 08:57:52
Also in:
lkml, netdev
On Tue, 08 Sep 2026 22:58:05 +0200, Maxime Chevallier wrote:
Hi again, On 9/8/26 10:16, Maxime Chevallier wrote:quoted
Hi, On 8/24/26 14:50, Pascal Kneuper wrote:quoted
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.quoted
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