From: Richard Tresidder <rtresidd@electromag.com.au>
To: Romain Gantois <romain.gantois@bootlin.com>,
Andrew Lunn <andrew@lunn.ch>
Cc: Alexandre Torgue <alexandre.torgue@foss.st.com>,
Jose Abreu <joabreu@synopsys.com>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Maxime Coquelin <mcoquelin.stm32@gmail.com>,
Miquel Raynal <miquel.raynal@bootlin.com>,
Maxime Chevallier <maxime.chevallier@bootlin.com>,
Sylvain Girard <sylvain.girard@se.com>,
Pascal EBERHARD <pascal.eberhard@se.com>,
netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH net 0/1] Prevent DSA tags from breaking COE
Date: Fri, 5 Jan 2024 12:37:42 +0800 [thread overview]
Message-ID: <9e371efe-8759-4e4a-bbd6-8ec2a12620a1@electromag.com.au> (raw)
In-Reply-To: <cdc38cdf-536c-c23b-46c1-abadf14001a2@bootlin.com>
Richard Tresidder
Hi All
Just wondering if from a custom platform point of view it might be better to use vlan tagging instead of DSA in the case where the MAC can't handle DSA tags in the header.
The marvel chip can use VLAN tagging to perform basically the same thing is my understanding, you just have to nominate a vlan id (untag outbound) to a port and trunk on cpu interface..
Just considering this as from my understanding the STMMAC does understand VLAN tags and will correctly generate the CRC.
I don't think this would stop us using VLAN for the ports in general, they'd just have a "default" tag for each port thats used for untagged packets on the port.
You could still apply additional VLAN's over those same ports..
I don't suppose anyone has some CPU usage info on software CRC vs this method?
I'm not sure if this is just an IP CRC issue or a TCP CRC issue also ( can the stmmac offload the TCP CRC also? )
If this is only an IP issue and the TCP CRC is never offloaded then it probably won't make much difference in reality..
Thanks
Richard Tresidder
On 19/12/2023 5:50 pm, Romain Gantois wrote:
> On Mon, 18 Dec 2023, Andrew Lunn wrote:
> ...
>> Probably a dumb question.... Does this COE also perform checksum
>> validation on receive? Is it also getting confused by the DSA header?
>>
>> You must of tested receive, so it works somehow, but i just wounder if
>> something needs to be done to be on the safe side?
> That's a good point, I just investigated the RX path a bit more and the MAC
> indeed has IP/TCP/UDP RX checksum offloading enabled. However, the
> external switch in my setup uses EDSA tags, which displace the "true" ethertype
> field to the end of the DSA header and replaces the "normal" ethertype with
> ETH_P_EDSA (0xdada). So to the MAC controller, the ethernet frame has an unknown
> ethertype, and so it doesn't see it as an IP frame at all. All of the
> ethtool counters related to IP stuff are at 0, which supports this.
>
> This explains why checksum offloading doesn't break the RX path in my case.
> However, other maybe other DSA switches using different frame formats could
> cause different behavior? Considering this, I think it would be safer to change
> the dsa_breaks_tx_coe flag to a general dsa_breaks_coe flag. It makes sense to
> me to assume that if DSA tags break TX COE, then RX COE will also not work.
>
> I'll take this into account when I send a v2.
>
> Best Regards,
>
next prev parent reply other threads:[~2024-01-05 4:44 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-18 16:23 [PATCH net 0/1] Prevent DSA tags from breaking COE Romain Gantois
2023-12-18 16:23 ` [PATCH net 1/1] net: stmmac: " Romain Gantois
2023-12-19 12:20 ` Vladimir Oltean
2023-12-19 13:07 ` Maxime Chevallier
2023-12-19 14:19 ` Linus Walleij
2023-12-19 16:29 ` Maxime Chevallier
2023-12-19 22:46 ` Vladimir Oltean
2023-12-20 0:43 ` Linus Walleij
2023-12-20 23:00 ` Linus Walleij
2023-12-29 16:11 ` Romain Gantois
2023-12-30 14:17 ` Vladimir Oltean
2023-12-18 16:41 ` [PATCH net 0/1] " Andrew Lunn
2023-12-19 9:50 ` Romain Gantois
2024-01-05 4:37 ` Richard Tresidder [this message]
2023-12-19 12:30 ` Vladimir Oltean
2023-12-21 7:40 ` Household Cang
2023-12-22 12:30 ` Vladimir Oltean
2023-12-22 13:22 ` Lucas Pereira
2023-12-22 13:46 ` Vladimir Oltean
2023-12-22 19:08 ` Household Cang
[not found] ` <SJ2PR22MB45547404DA1CA10A201B2BE0A294A@SJ2PR22MB4554.namprd22.prod.outlook.com>
2025-10-17 6:56 ` Proxy ARP NetNS Awareness Household Cang
2025-10-20 9:58 ` Nicolas Dichtel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9e371efe-8759-4e4a-bbd6-8ec2a12620a1@electromag.com.au \
--to=rtresidd@electromag.com.au \
--cc=alexandre.torgue@foss.st.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=joabreu@synopsys.com \
--cc=kuba@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=maxime.chevallier@bootlin.com \
--cc=mcoquelin.stm32@gmail.com \
--cc=miquel.raynal@bootlin.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=pascal.eberhard@se.com \
--cc=romain.gantois@bootlin.com \
--cc=sylvain.girard@se.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox