From: Mattias Forsblad <mattias.forsblad@gmail.com>
To: Andrew Lunn <andrew@lunn.ch>
Cc: netdev@vger.kernel.org, Vivien Didelot <vivien.didelot@gmail.com>,
Florian Fainelli <f.fainelli@gmail.com>,
Vladimir Oltean <olteanv@gmail.com>,
"David S . Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
linux@armlinux.org.uk
Subject: Re: [PATCH net-next v11 5/6] net: dsa: mv88e6xxx: rmon: Use RMU for reading RMON data
Date: Thu, 15 Sep 2022 09:19:39 +0200 [thread overview]
Message-ID: <3f9a9054-6605-fc93-067d-6b22e131de6c@gmail.com> (raw)
In-Reply-To: <YyHoXUyBIMyFGZTX@lunn.ch>
On 2022-09-14 16:42, Andrew Lunn wrote:
>> @@ -1234,16 +1234,30 @@ static int mv88e6xxx_stats_get_stats(struct mv88e6xxx_chip *chip, int port,
>> u16 bank1_select, u16 histogram)
>> {
>> struct mv88e6xxx_hw_stat *stat;
>> + int offset = 0;
>> + u64 high;
>> int i, j;
>>
>> for (i = 0, j = 0; i < ARRAY_SIZE(mv88e6xxx_hw_stats); i++) {
>> stat = &mv88e6xxx_hw_stats[i];
>> if (stat->type & types) {
>> - mv88e6xxx_reg_lock(chip);
>> - data[j] = _mv88e6xxx_get_ethtool_stat(chip, stat, port,
>> - bank1_select,
>> - histogram);
>> - mv88e6xxx_reg_unlock(chip);
>> + if (mv88e6xxx_rmu_available(chip) &&
>> + !(stat->type & STATS_TYPE_PORT)) {
>
> If i understand you comment to a previous version, the problem here is
> STATS_TYPE_PORT. You are falling back to MDIO for those three
> statistics. The data sheet for the 6352 shows these statistics are
> available at offset 129 and above in the RMU reply.
>
> I looked through the datasheets i have. I don't have a full set, but
> all that i have which include the RMU have these statistics at offset
> 129.
>
> So i think you can remove the fallback to MDIO. That should then allow
> you to have a fully independent implementation, making it much
> cleaner.
>
> Or do you see other problems i currently don't?
>
> Andrew
>
I'll look into that, thanks.
/Mattias
next prev parent reply other threads:[~2022-09-15 7:19 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-14 5:30 [PATCH net-next v11 0/6] net: dsa: qca8k, mv88e6xxx: rmon: Add RMU support Mattias Forsblad
2022-09-14 5:30 ` [PATCH net-next v11 1/6] net: dsa: mv88e6xxx: Add RMU enable for select switches Mattias Forsblad
2022-09-14 5:30 ` [PATCH net-next v11 2/6] net: dsa: Add convenience functions for frame handling Mattias Forsblad
2022-09-14 5:30 ` [PATCH net-next v11 3/6] net: dsa: Introduce dsa tagger data operation Mattias Forsblad
2022-09-14 5:30 ` [PATCH net-next v11 4/6] net: dsa: mv88e6xxxx: Add RMU functionality Mattias Forsblad
2022-09-14 5:30 ` [PATCH net-next v11 5/6] net: dsa: mv88e6xxx: rmon: Use RMU for reading RMON data Mattias Forsblad
2022-09-14 14:42 ` Andrew Lunn
2022-09-15 7:19 ` Mattias Forsblad [this message]
2022-09-14 5:30 ` [PATCH net-next v11 6/6] net: dsa: qca8k: Use new convenience functions Mattias Forsblad
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=3f9a9054-6605-fc93-067d-6b22e131de6c@gmail.com \
--to=mattias.forsblad@gmail.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=f.fainelli@gmail.com \
--cc=kuba@kernel.org \
--cc=linux@armlinux.org.uk \
--cc=netdev@vger.kernel.org \
--cc=olteanv@gmail.com \
--cc=pabeni@redhat.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).