Re: [PATCH 2/2] net: dsa: tag_ksz: dont let the hardware process the layer 4 checksum

From: Andrew Lunn
Date: Thu Jul 15 2021 - 11:50:52 EST


> Tell me more (show me some code).

https://elixir.bootlin.com/linux/latest/source/drivers/net/ethernet/marvell/mvneta.c#L1747

and

https://elixir.bootlin.com/linux/latest/source/drivers/net/ethernet/marvell/mvneta.c#L1944

It uses skb_network_offset(skb) to know where the real header is. This
should work independent of DSA or EDSA.

mvpp2_main.c looks to have something similar. The older mv643xx_eth.c
also has something, but it is more subtle. Ah, found it:

https://elixir.bootlin.com/linux/latest/source/drivers/net/ethernet/marvell/mv643xx_eth.c#L683

> I expect Marvell switches to be equally broken on the Broadcom genet
> controller?

Maybe. Depends on how genet works. A Broadcom switch connected to a
Marvell MAC probably works, since the code is generic. It should work
for any switch which uses head tagging, although mv643xx_eth.c is
limited to 4 or 8 byte tags.

Andrew