From: Vladimir Oltean <olteanv@gmail.com>
To: Rakesh Sankaranarayanan <rakesh.sankaranarayanan@microchip.com>
Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
woojung.huh@microchip.com, UNGLinuxDriver@microchip.com,
andrew@lunn.ch, f.fainelli@gmail.com, davem@davemloft.net,
edumazet@google.com, kuba@kernel.org, pabeni@redhat.com,
Oleksij Rempel <o.rempel@pengutronix.de>
Subject: Re: [RFC Patch net-next 1/5] net: dsa: microchip: add rmon grouping for ethtool statistics
Date: Wed, 7 Dec 2022 15:23:33 +0200 [thread overview]
Message-ID: <20221207132333.tw3ztzfgo7i3cf5x@skbuf> (raw)
In-Reply-To: <20221130132902.2984580-2-rakesh.sankaranarayanan@microchip.com>
On Wed, Nov 30, 2022 at 06:58:58PM +0530, Rakesh Sankaranarayanan wrote:
> diff --git a/drivers/net/dsa/microchip/ksz_ethtool.c b/drivers/net/dsa/microchip/ksz_ethtool.c
> new file mode 100644
> index 000000000000..7e1f1b4d1e98
> --- /dev/null
> +++ b/drivers/net/dsa/microchip/ksz_ethtool.c
> @@ -0,0 +1,178 @@
> +// SPDX-License-Identifier: GPL-2.0-or-later
> +/*
> + * Microchip KSZ series ethtool statistics
> + *
> + * Copyright (C) 2022 Microchip Technology Inc.
> + */
> +
> +#include "ksz_common.h"
> +#include "ksz_ethtool.h"
> +
> +enum ksz8_mib_entry {
> + ksz8_rx,
> + ksz8_rx_hi,
> + ksz8_rx_undersize,
> + ksz8_rx_fragments,
> + ksz8_rx_oversize,
> + ksz8_rx_jabbers,
> + ksz8_rx_symbol_err,
> + ksz8_rx_crc_err,
> + ksz8_rx_align_err,
> + ksz8_rx_mac_ctrl,
> + ksz8_rx_pause,
> + ksz8_rx_bcast,
> + ksz8_rx_mcast,
> + ksz8_rx_ucast,
> + ksz8_rx_64_or_less,
> + ksz8_rx_65_127,
> + ksz8_rx_128_255,
> + ksz8_rx_256_511,
> + ksz8_rx_512_1023,
> + ksz8_rx_1024_1522,
> + ksz8_tx,
> + ksz8_tx_hi,
> + ksz8_tx_late_col,
> + ksz8_tx_pause,
> + ksz8_tx_bcast,
> + ksz8_tx_mcast,
> + ksz8_tx_ucast,
> + ksz8_tx_deferred,
> + ksz8_tx_total_col,
> + ksz8_tx_exc_col,
> + ksz8_tx_single_col,
> + ksz8_tx_mult_col,
> + ksz8_rx_discards = 0x100,
> + ksz8_tx_discards,
> +};
> +
> +enum ksz9477_mib_entry {
> + ksz9477_rx_hi,
> + ksz9477_rx_undersize,
> + ksz9477_rx_fragments,
> + ksz9477_rx_oversize,
> + ksz9477_rx_jabbers,
> + ksz9477_rx_symbol_err,
> + ksz9477_rx_crc_err,
> + ksz9477_rx_align_err,
> + ksz9477_rx_mac_ctrl,
> + ksz9477_rx_pause,
> + ksz9477_rx_bcast,
> + ksz9477_rx_mcast,
> + ksz9477_rx_ucast,
> + ksz9477_rx_64_or_less,
> + ksz9477_rx_65_127,
> + ksz9477_rx_128_255,
> + ksz9477_rx_256_511,
> + ksz9477_rx_512_1023,
> + ksz9477_rx_1024_1522,
> + ksz9477_rx_1523_2000,
> + ksz9477_rx_2001,
> + ksz9477_tx_hi,
> + ksz9477_tx_late_col,
> + ksz9477_tx_pause,
> + ksz9477_tx_bcast,
> + ksz9477_tx_mcast,
> + ksz9477_tx_ucast,
> + ksz9477_tx_deferred,
> + ksz9477_tx_total_col,
> + ksz9477_tx_exc_col,
> + ksz9477_tx_single_col,
> + ksz9477_tx_mult_col,
> + ksz9477_rx_total = 0x80,
> + ksz9477_tx_total,
> + ksz9477_rx_discards,
> + ksz9477_tx_discards,
> +};
We usually name constants using all capitals.
Can you do something to reuse the ksz_mib_names structures?
next prev parent reply other threads:[~2022-12-07 13:23 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-30 13:28 [RFC Patch net-next 0/5] add ethtool categorized statistics Rakesh Sankaranarayanan
2022-11-30 13:28 ` [RFC Patch net-next 1/5] net: dsa: microchip: add rmon grouping for ethtool statistics Rakesh Sankaranarayanan
2022-12-07 13:23 ` Vladimir Oltean [this message]
2022-11-30 13:28 ` [RFC Patch net-next 2/5] net: dsa: microchip: add eth ctrl " Rakesh Sankaranarayanan
2022-11-30 13:29 ` [RFC Patch net-next 3/5] net: dsa: microchip: add eth mac " Rakesh Sankaranarayanan
2022-12-02 4:02 ` Jakub Kicinski
2022-12-02 11:53 ` Rakesh.Sankaranarayanan
2022-12-07 13:21 ` Vladimir Oltean
2022-11-30 13:29 ` [RFC Patch net-next 4/5] net: dsa: microchip: add eth phy " Rakesh Sankaranarayanan
2022-11-30 13:29 ` [RFC Patch net-next 5/5] net: dsa: microchip: remove num_alus variable Rakesh Sankaranarayanan
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=20221207132333.tw3ztzfgo7i3cf5x@skbuf \
--to=olteanv@gmail.com \
--cc=UNGLinuxDriver@microchip.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=f.fainelli@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=o.rempel@pengutronix.de \
--cc=pabeni@redhat.com \
--cc=rakesh.sankaranarayanan@microchip.com \
--cc=woojung.huh@microchip.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