Netdev List
 help / color / mirror / Atom feed
From: Vladimir Oltean <vladimir.oltean@nxp.com>
To: Tobias Waldekranz <tobias@waldekranz.com>
Cc: davem@davemloft.net, kuba@kernel.org, andrew@lunn.ch,
	f.fainelli@gmail.com, netdev@vger.kernel.org
Subject: Re: [PATCH v2 net-next 6/6] net: dsa: mv88e6xxx: Add "rmon" counter group support
Date: Tue, 5 Dec 2023 20:11:56 +0200	[thread overview]
Message-ID: <20231205181156.y5p57cb2rgukyjwz@skbuf> (raw)
In-Reply-To: <20231205160418.3770042-7-tobias@waldekranz.com>

On Tue, Dec 05, 2023 at 05:04:18PM +0100, Tobias Waldekranz wrote:
> Report the applicable subset of an mv88e6xxx port's counters using
> ethtool's standardized "rmon" counter group.
> 
> Signed-off-by: Tobias Waldekranz <tobias@waldekranz.com>
> ---
>  drivers/net/dsa/mv88e6xxx/chip.c | 42 ++++++++++++++++++++++++++++++++
>  1 file changed, 42 insertions(+)
> 
> diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/chip.c
> index 1a16698181fb..2e74109196f4 100644
> --- a/drivers/net/dsa/mv88e6xxx/chip.c
> +++ b/drivers/net/dsa/mv88e6xxx/chip.c
> @@ -1357,6 +1357,47 @@ static void mv88e6xxx_get_eth_mac_stats(struct dsa_switch *ds, int port,
> +	MV88E6XXX_RMON_STAT_MAP(in_undersize, undersize_pkts);
> +	MV88E6XXX_RMON_STAT_MAP(in_oversize, oversize_pkts);
> +	MV88E6XXX_RMON_STAT_MAP(in_fragments, fragments);
> +	MV88E6XXX_RMON_STAT_MAP(in_jabber, jabbers);
> +	MV88E6XXX_RMON_STAT_MAP(hist_64bytes, hist[0]);
> +	MV88E6XXX_RMON_STAT_MAP(hist_65_127bytes, hist[1]);
> +	MV88E6XXX_RMON_STAT_MAP(hist_128_255bytes, hist[2]);
> +	MV88E6XXX_RMON_STAT_MAP(hist_256_511bytes, hist[3]);
> +	MV88E6XXX_RMON_STAT_MAP(hist_512_1023bytes, hist[4]);
> +	MV88E6XXX_RMON_STAT_MAP(hist_1024_max_bytes, hist[5]);

I see that these are in STATS_TYPE_BANK0 and that every switch provides
that. Good.

Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>

  reply	other threads:[~2023-12-05 18:12 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-05 16:04 [PATCH v2 net-next 0/6] net: dsa: mv88e6xxx: Add "eth-mac" and "rmon" counter group support Tobias Waldekranz
2023-12-05 16:04 ` [PATCH v2 net-next 1/6] net: dsa: mv88e6xxx: Push locking into stats snapshotting Tobias Waldekranz
2023-12-05 17:13   ` Vladimir Oltean
2023-12-05 16:04 ` [PATCH v2 net-next 2/6] net: dsa: mv88e6xxx: Create API to read a single stat counter Tobias Waldekranz
2023-12-05 17:26   ` Vladimir Oltean
2023-12-05 16:04 ` [PATCH v2 net-next 3/6] net: dsa: mv88e6xxx: Fix mv88e6352_serdes_get_stats error path Tobias Waldekranz
2023-12-05 17:50   ` Vladimir Oltean
2023-12-05 21:13     ` Tobias Waldekranz
2023-12-05 22:38       ` Vladimir Oltean
2023-12-05 16:04 ` [PATCH v2 net-next 4/6] net: dsa: mv88e6xxx: Give each hw stat an ID Tobias Waldekranz
2023-12-05 17:51   ` Vladimir Oltean
2023-12-05 16:04 ` [PATCH v2 net-next 5/6] net: dsa: mv88e6xxx: Add "eth-mac" counter group support Tobias Waldekranz
2023-12-05 18:07   ` Vladimir Oltean
2023-12-05 21:24     ` Tobias Waldekranz
2023-12-05 16:04 ` [PATCH v2 net-next 6/6] net: dsa: mv88e6xxx: Add "rmon" " Tobias Waldekranz
2023-12-05 18:11   ` Vladimir Oltean [this message]
2023-12-06  0:22   ` Vladimir Oltean
2023-12-06  8:27     ` Tobias Waldekranz
2023-12-06 19:55       ` Vladimir Oltean
2023-12-07  9:47         ` 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=20231205181156.y5p57cb2rgukyjwz@skbuf \
    --to=vladimir.oltean@nxp.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=f.fainelli@gmail.com \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=tobias@waldekranz.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