From: Andrew Lunn <andrew@lunn.ch>
To: Vladimir Oltean <olteanv@gmail.com>
Cc: Tobias Waldekranz <tobias@waldekranz.com>,
davem@davemloft.net, kuba@kernel.org, vivien.didelot@gmail.com,
f.fainelli@gmail.com, netdev@vger.kernel.org
Subject: Re: [PATCH net-next] net: dsa: mv88e6xxx: Allow dynamic reconfiguration of tag protocol
Date: Tue, 23 Mar 2021 13:32:45 +0100 [thread overview]
Message-ID: <YFnf7arsXNbJpuBE@lunn.ch> (raw)
In-Reply-To: <20210323113522.coidmitlt6e44jjq@skbuf>
On Tue, Mar 23, 2021 at 01:35:22PM +0200, Vladimir Oltean wrote:
> On Tue, Mar 23, 2021 at 11:23:26AM +0100, Tobias Waldekranz wrote:
> > All devices are capable of using regular DSA tags. Support for
> > Ethertyped DSA tags sort into three categories:
> >
> > 1. No support. Older chips fall into this category.
> >
> > 2. Full support. Datasheet explicitly supports configuring the CPU
> > port to receive FORWARDs with a DSA tag.
> >
> > 3. Undocumented support. Datasheet lists the configuration from
> > category 2 as "reserved for future use", but does empirically
> > behave like a category 2 device.
> >
> > Because there are ethernet controllers that do not handle regular DSA
> > tags in all cases, it is sometimes preferable to rely on the
> > undocumented behavior, as the alternative is a very crippled
> > system. But, in those cases, make sure to log the fact that an
> > undocumented feature has been enabled.
> >
> > Signed-off-by: Tobias Waldekranz <tobias@waldekranz.com>
> > ---
> >
> > In a system using an NXP T1023 SoC connected to a 6390X switch, we
> > noticed that TO_CPU frames where not reaching the CPU. This only
> > happened on hardware port 8. Looking at the DSA master interface
> > (dpaa-ethernet) we could see that an Rx error counter was bumped at
> > the same rate. The logs indicated a parser error.
> >
> > It just so happens that a TO_CPU coming in on device 0, port 8, will
> > result in the first two bytes of the DSA tag being one of:
> >
> > 00 40
> > 00 44
> > 00 46
> >
> > My guess is that since these values look like 802.3 length fields, the
> > controller's parser will signal an error if the frame length does not
> > match what is in the header.
>
> Interesting assumption.
> Could you please try this patch out, just for my amusement? It is only
> compile-tested.
Another thing you could try, just for amusement, is change the
Ethertype in EDSA to 00400044 and see if it also causes problems. It
might not, since the last two bytes are not set as required.
Andrew
next prev parent reply other threads:[~2021-03-23 12:33 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-23 10:23 [PATCH net-next] net: dsa: mv88e6xxx: Allow dynamic reconfiguration of tag protocol Tobias Waldekranz
2021-03-23 11:35 ` Vladimir Oltean
2021-03-23 12:32 ` Andrew Lunn [this message]
2021-03-23 14:48 ` Tobias Waldekranz
2021-03-23 16:30 ` Florian Fainelli
2021-03-23 19:03 ` Vladimir Oltean
2021-03-23 21:17 ` Tobias Waldekranz
2021-03-23 23:15 ` Vladimir Oltean
2021-03-24 10:52 ` Tobias Waldekranz
2021-03-24 11:34 ` Vladimir Oltean
2021-03-24 13:01 ` Tobias Waldekranz
2021-03-24 13:24 ` Vladimir Oltean
2021-03-24 14:03 ` Vladimir Oltean
2021-03-24 14:10 ` Vladimir Oltean
2021-03-24 15:02 ` Tobias Waldekranz
2021-03-24 15:08 ` Vladimir Oltean
2021-03-24 16:07 ` Tobias Waldekranz
2021-03-25 1:34 ` Vladimir Oltean
2021-03-25 8:04 ` Tobias Waldekranz
2021-03-23 12:41 ` Andrew Lunn
2021-03-23 14:49 ` Tobias Waldekranz
2021-03-23 16:53 ` Florian Fainelli
2021-03-23 20:50 ` Tobias Waldekranz
2021-03-24 0:44 ` Andrew Lunn
2021-03-24 12:53 ` Tobias Waldekranz
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=YFnf7arsXNbJpuBE@lunn.ch \
--to=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=f.fainelli@gmail.com \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=olteanv@gmail.com \
--cc=tobias@waldekranz.com \
--cc=vivien.didelot@gmail.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;
as well as URLs for NNTP newsgroup(s).