[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <e431c74f-5f83-4fb8-8246-a0f447a24596@lunn.ch>
Date: Fri, 15 Dec 2023 11:30:47 +0100
From: Andrew Lunn <andrew@...n.ch>
To: Romain Gantois <romain.gantois@...tlin.com>
Cc: Florian Fainelli <f.fainelli@...il.com>,
Vladimir Oltean <olteanv@...il.com>,
Alexandre Torgue <alexandre.torgue@...s.st.com>,
Jose Abreu <joabreu@...opsys.com>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
netdev@...r.kernel.org,
Maxime Chevallier <maxime.chevallier@...tlin.com>,
Thomas Petazzoni <thomas.petazzoni@...tlin.com>,
Linus Walleij <linus.walleij@...aro.org>
Subject: Re: DSA tags seem to break checksum offloading on DWMAC100
> So it seems like a solution is needed to prevent checksum offloading by Ethernet
> drivers when DSA tags are in used. I'm not sure how this would be done, since
> DSA is purposefully kept quite separate from CPU port drivers. What are your
> thoughts on this?
It is not as simple as that, because some Ethernet drivers do know how
to correctly calculate checksums when there is a DSA
header. e.g. Marvell and Broadcom devices can do this, when combined
with Marvell/Broadcom switches. I don't know how the Broadcom driver
does this, but on the Marvell Ethernet drivers, there is a value you
set in the transmit descriptor to indicate how big the headers are
before the IP header. Its normally used to skip over the VLAN tag, but
it can also be used to skip over the DSA header.
So i would suggest you look at the data sheet and see if there is
anything similar, a way to tell the hardware where the IP header
actually is in the frame. If you can do that, you can then actually
make use of the hardware checksum, rather than disable it.
Andrew
Powered by blists - more mailing lists