Re: [PATCH 2/2] net: dsa: tag_ksz: dont let the hardware process the layer 4 checksum
From: Vladimir Oltean
Date: Wed Jul 14 2021 - 16:04:23 EST
Hi Lino,
On Wed, Jul 14, 2021 at 09:17:23PM +0200, Lino Sanfilippo wrote:
> If the checksum calculation is offloaded to the network device (e.g due to
> NETIF_F_HW_CSUM inherited from the DSA master device), the calculated
> layer 4 checksum is incorrect. This is since the DSA tag which is placed
> after the layer 4 data is seen as a part of the data portion and thus
> errorneously included into the checksum calculation.
> To avoid this, always calculate the layer 4 checksum in software.
>
> Signed-off-by: Lino Sanfilippo <LinoSanfilippo@xxxxxx>
> ---
This needs to be solved more generically for all tail taggers. Let me
try out a few things tomorrow and come with a proposal.