[PATCH net-next 2/2] net: stmmac: disable TX checksum offload for jumbo frames on bugged cores

Jisheng Zhang jszhang at kernel.org
Thu Oct 22 04:15:12 PDT 2026


On Wed, Oct 21, 2026 at 12:33:37PM +0800, Jisheng Zhang wrote:
> On Tue, Oct 20, 2026 at 02:28:26PM +0200, Andrew Lunn wrote:
> > > > Here I want to query a generic rule from netdev maintainers:
> > > > can XDP frame enable HW checksum on dwmac IP? Per my understanding, the
> > > > dwmac can only do HW checksum for normal particular packets layouts, such as
> > > > TCP, UDP. What about if XDP transmits a non-IP frame?
> > > 
> > > or a generic XDP guide from netdev maintainers:
> > > Since XDP can tranmist arbitrary Eth frames, so how does the eth driver cope
> > > with HW checksum if the HW checksum is intended for supported IP packet
> > > layouts rather than arbitrary layer2 frames?
> > > 
> > > choices:
> > > c1. Simply disabled HW checksum by default. Then XDP prog must provide
> > > checksums themselves, lost the HW offload cap for IP packets.
> > > 
> > > c2. detect the frame in eth driver's xdp code path, then enable/disable
> > > HW checksum accordingly. Then how? Any example in exisiting eth drivers
> > > is appreciated.
> > 
> > Why is this specific to XDP? Cannot the network stack transmit
> > arbitrary layer2 frames? Isn't this a generic problem?
> > 
> 
> network stack normal tx supplies the skb->ip_summed metadata, and
> dwmac driver specifically can decide to enable/disable HW csum
> by checking the protocol which is extraced from skb, example
> stmmac_has_ip_ethertype()
> But XDP path doesn't have the necessary metadata, and I'm not sure
> whether stmmac_has_ip_ethertype xdb version can be implemented or
> not. That's the reason I request generic XDP guidence from netdev
> maintainers.
> 

Hi,

Given above, I think the dwmac hw csum needs to be disabled by default
to make XDP always behave properly. Since this patch2/2 has been
merged, I will update my patch:
https://lore.kernel.org/netdev/20260929121025.20821-1-jszhang@kernel.org/

1.rebase on the lastest net-next or wait for new rc1

2.update the commit msg of my patch to include above reply.

Kindly let me know if this way can be accepted or not

Thanks



More information about the linux-arm-kernel mailing list