From: Christian Marangi <ansuelsmth@gmail.com>
To: Vladimir Oltean <olteanv@gmail.com>
Cc: Andrew Lunn <andrew@lunn.ch>,
Vivien Didelot <vivien.didelot@gmail.com>,
Florian Fainelli <f.fainelli@gmail.com>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
"Russell King (Oracle)" <rmk+kernel@armlinux.org.uk>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
Pawel Dembicki <paweldembicki@gmail.com>,
Lech Perczak <lech.perczak@gmail.com>
Subject: Re: [net PATCH 1/2] net: dsa: qca8k: fix inband mgmt for big-endian systems
Date: Wed, 12 Oct 2022 14:24:47 +0200 [thread overview]
Message-ID: <6346b213.170a0220.a9c38.3d7b@mx.google.com> (raw)
In-Reply-To: <20221012072411.dk7dynbttnaozyrl@skbuf>
On Wed, Oct 12, 2022 at 10:24:11AM +0300, Vladimir Oltean wrote:
> On Mon, Oct 10, 2022 at 02:44:46PM +0200, Christian Marangi wrote:
> > On Mon, Oct 10, 2022 at 08:53:01PM +0200, Andrew Lunn wrote:
> > > > /* Special struct emulating a Ethernet header */
> > > > struct qca_mgmt_ethhdr {
> > > > - u32 command; /* command bit 31:0 */
> > > > - u32 seq; /* seq 63:32 */
> > > > - u32 mdio_data; /* first 4byte mdio */
> > > > + __le32 command; /* command bit 31:0 */
> > > > + __le32 seq; /* seq 63:32 */
> > > > + __le32 mdio_data; /* first 4byte mdio */
> > > > __be16 hdr; /* qca hdr */
> > > > } __packed;
> > >
> > > It looks odd that hdr is BE while the rest are LE. Did you check this?
> > >
> > > Andrew
> >
> > Yes we did many test to analyze this and I just checked with some
> > tcpdump that the hdr is BE everytime. If you want I can provide you some
> > tcpdump from 2 different systems.
> >
> > Anyway it looks like this family switch treats the hdr in a standard way
> > with the network byte order and for anything else stick to LE.
> >
> > Also as a side note the tagger worked correctly before the mgmt feature
> > on BE systems and also works correctly now... just any command is slow
> > as the mgmt system has to timeout and fallback to legacy mdio.
>
> Could you provide a tcpdump?
Hi, this [0] is the zip with all the tcpdump.
The main packet to check are the one that are 60 in lenght and > 170 in
length for the autocast mib. I added both LE and BE and for BE I added
the broken and the correct one.
As you notice without following this endianess madness, the switch
doesn't answer to any request.
Hope the dump are not too bloated to understand this problem.
[0] https://we.tl/t-ZpXVObTIh0
--
Ansuel
next prev parent reply other threads:[~2022-10-12 12:24 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-10 11:14 [net PATCH 1/2] net: dsa: qca8k: fix inband mgmt for big-endian systems Christian Marangi
2022-10-10 11:14 ` [net PATCH 2/2] net: dsa: qca8k: fix ethtool autocast mib " Christian Marangi
2022-10-12 12:37 ` Andrew Lunn
2022-10-10 18:53 ` [net PATCH 1/2] net: dsa: qca8k: fix inband mgmt " Andrew Lunn
2022-10-10 12:44 ` Christian Marangi
2022-10-12 7:24 ` Vladimir Oltean
2022-10-12 12:24 ` Christian Marangi [this message]
2022-10-12 12:29 ` Andrew Lunn
2022-10-12 12:34 ` Christian Marangi
2022-10-12 7:27 ` Vladimir Oltean
2022-10-12 12:26 ` Christian Marangi
2022-10-12 12:31 ` Andrew Lunn
2022-10-12 12:42 ` Andrew Lunn
2022-10-12 12:54 ` Christian Marangi
2022-10-12 12:59 ` Christian Marangi
2022-10-12 13:31 ` Vladimir Oltean
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=6346b213.170a0220.a9c38.3d7b@mx.google.com \
--to=ansuelsmth@gmail.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=f.fainelli@gmail.com \
--cc=kuba@kernel.org \
--cc=lech.perczak@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=olteanv@gmail.com \
--cc=pabeni@redhat.com \
--cc=paweldembicki@gmail.com \
--cc=rmk+kernel@armlinux.org.uk \
--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).