[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2ee678f6-07f3-6747-15a8-280cf1f7ca04@gmail.com>
Date: Thu, 15 Jul 2021 09:24:09 -0700
From: Florian Fainelli <f.fainelli@...il.com>
To: Andrew Lunn <andrew@...n.ch>, Vladimir Oltean <olteanv@...il.com>
Cc: Lino Sanfilippo <LinoSanfilippo@....de>, woojung.huh@...rochip.com,
UNGLinuxDriver@...rochip.com, vivien.didelot@...il.com,
davem@...emloft.net, kuba@...nel.org, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] net: dsa: tag_ksz: dont let the hardware process the
layer 4 checksum
On 7/15/21 6:08 AM, Andrew Lunn wrote:
>> - If we inherit NETIF_F_HW_CSUM from the master for tail taggers, it is
>> actively detrimential to keep this feature enabled, as proven my Lino.
>> As for header taggers, I fail to see how this would be helpful, since
>> the DSA master would always fail to see the real IP header (it has
>> been pushed to the right by the DSA tag), and therefore, the DSA
>> master offload would be effectively bypassed.
>
> The Marvell MACs know about DSA and should be able to perform hardware
> checksumming. It is a long time since i looked at how this works, but
> i think there is a field in the descriptor which gets set with the
> offset to the IP header, so it work for DSA as well as EDSA.
>
> I _think_ Broadcom MACs also know about Broadcom tags and can do the
> right thing.
Yes, the SYSTEMPORT MAC as well as bgmac to some extent will
automagically work, but they have to be told to expect a Broadcom tag in
order to generate an appropriate checksum on receive. This is why we
have this:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/net/ethernet/broadcom/bcmsysport.c#n144
Likewise, for TX:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/net/ethernet/broadcom/bcmsysport.c#n172
--
Florian
Powered by blists - more mailing lists