From: Colin Foster <colin.foster@in-advantage.com>
To: Vladimir Oltean <vladimir.oltean@nxp.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
Paolo Abeni <pabeni@redhat.com>,
Eric Dumazet <edumazet@google.com>,
"David S. Miller" <davem@davemloft.net>,
Florian Fainelli <f.fainelli@gmail.com>,
Andrew Lunn <andrew@lunn.ch>,
Alexandre Belloni <alexandre.belloni@bootlin.com>,
Claudiu Manoil <claudiu.manoil@nxp.com>
Subject: Re: [PATCH v1 net-next 2/2] net: mscc: ocelot: remove unnecessary exposure of stats structures
Date: Mon, 14 Nov 2022 19:47:16 -0800 [thread overview]
Message-ID: <Y3MLxNIQBiZKmtNs@euler> (raw)
In-Reply-To: <20221114151925.p35ynwi7ejmr6zhc@skbuf>
On Mon, Nov 14, 2022 at 03:19:26PM +0000, Vladimir Oltean wrote:
> On Fri, Nov 11, 2022 at 12:49:24PM -0800, Colin Foster wrote:
> > +#define OCELOT_COMMON_STATS \
> > + OCELOT_STAT_ETHTOOL(RX_OCTETS, "rx_octets"), \
> > + OCELOT_STAT_ETHTOOL(RX_UNICAST, "rx_unicast"), \
> > + OCELOT_STAT_ETHTOOL(RX_MULTICAST, "rx_multicast"), \
> > + OCELOT_STAT_ETHTOOL(RX_BROADCAST, "rx_broadcast"), \
> > + OCELOT_STAT_ETHTOOL(RX_SHORTS, "rx_shorts"), \
> > + OCELOT_STAT_ETHTOOL(RX_FRAGMENTS, "rx_fragments"), \
> > + OCELOT_STAT_ETHTOOL(RX_JABBERS, "rx_jabbers"), \
> > + OCELOT_STAT_ETHTOOL(RX_CRC_ALIGN_ERRS, "rx_crc_align_errs"), \
> > + OCELOT_STAT_ETHTOOL(RX_SYM_ERRS, "rx_sym_errs"), \
> > + OCELOT_STAT_ETHTOOL(RX_64, "rx_frames_below_65_octets"), \
> > + OCELOT_STAT_ETHTOOL(RX_65_127, "rx_frames_65_to_127_octets"), \
> > + OCELOT_STAT_ETHTOOL(RX_128_255, "rx_frames_128_to_255_octets"), \
> > + OCELOT_STAT_ETHTOOL(RX_256_511, "rx_frames_256_to_511_octets"), \
> > + OCELOT_STAT_ETHTOOL(RX_512_1023, "rx_frames_512_to_1023_octets"), \
> > + OCELOT_STAT_ETHTOOL(RX_1024_1526, "rx_frames_1024_to_1526_octets"), \
> > + OCELOT_STAT_ETHTOOL(RX_1527_MAX, "rx_frames_over_1526_octets"), \
> > + OCELOT_STAT_ETHTOOL(RX_PAUSE, "rx_pause"), \
> > + OCELOT_STAT_ETHTOOL(RX_CONTROL, "rx_control"), \
> > + OCELOT_STAT_ETHTOOL(RX_LONGS, "rx_longs"), \
> > + OCELOT_STAT_ETHTOOL(RX_CLASSIFIED_DROPS, "rx_classified_drops"), \
> > + OCELOT_STAT_ETHTOOL(RX_RED_PRIO_0, "rx_red_prio_0"), \
> > + OCELOT_STAT_ETHTOOL(RX_RED_PRIO_1, "rx_red_prio_1"), \
> > + OCELOT_STAT_ETHTOOL(RX_RED_PRIO_2, "rx_red_prio_2"), \
> > + OCELOT_STAT_ETHTOOL(RX_RED_PRIO_3, "rx_red_prio_3"), \
> > + OCELOT_STAT_ETHTOOL(RX_RED_PRIO_4, "rx_red_prio_4"), \
> > + OCELOT_STAT_ETHTOOL(RX_RED_PRIO_5, "rx_red_prio_5"), \
> > + OCELOT_STAT_ETHTOOL(RX_RED_PRIO_6, "rx_red_prio_6"), \
> > + OCELOT_STAT_ETHTOOL(RX_RED_PRIO_7, "rx_red_prio_7"), \
> > + OCELOT_STAT_ETHTOOL(RX_YELLOW_PRIO_0, "rx_yellow_prio_0"), \
> > + OCELOT_STAT_ETHTOOL(RX_YELLOW_PRIO_1, "rx_yellow_prio_1"), \
> > + OCELOT_STAT_ETHTOOL(RX_YELLOW_PRIO_2, "rx_yellow_prio_2"), \
> > + OCELOT_STAT_ETHTOOL(RX_YELLOW_PRIO_3, "rx_yellow_prio_3"), \
> > + OCELOT_STAT_ETHTOOL(RX_YELLOW_PRIO_4, "rx_yellow_prio_4"), \
> > + OCELOT_STAT_ETHTOOL(RX_YELLOW_PRIO_5, "rx_yellow_prio_5"), \
> > + OCELOT_STAT_ETHTOOL(RX_YELLOW_PRIO_6, "rx_yellow_prio_6"), \
> > + OCELOT_STAT_ETHTOOL(RX_YELLOW_PRIO_7, "rx_yellow_prio_7"), \
> > + OCELOT_STAT_ETHTOOL(RX_GREEN_PRIO_0, "rx_green_prio_0"), \
> > + OCELOT_STAT_ETHTOOL(RX_GREEN_PRIO_1, "rx_green_prio_1"), \
> > + OCELOT_STAT_ETHTOOL(RX_GREEN_PRIO_2, "rx_green_prio_2"), \
> > + OCELOT_STAT_ETHTOOL(RX_GREEN_PRIO_3, "rx_green_prio_3"), \
> > + OCELOT_STAT_ETHTOOL(RX_GREEN_PRIO_4, "rx_green_prio_4"), \
> > + OCELOT_STAT_ETHTOOL(RX_GREEN_PRIO_5, "rx_green_prio_5"), \
> > + OCELOT_STAT_ETHTOOL(RX_GREEN_PRIO_6, "rx_green_prio_6"), \
> > + OCELOT_STAT_ETHTOOL(RX_GREEN_PRIO_7, "rx_green_prio_7"), \
> > + OCELOT_STAT_ETHTOOL(TX_OCTETS, "tx_octets"), \
> > + OCELOT_STAT_ETHTOOL(TX_UNICAST, "tx_unicast"), \
> > + OCELOT_STAT_ETHTOOL(TX_MULTICAST, "tx_multicast"), \
> > + OCELOT_STAT_ETHTOOL(TX_BROADCAST, "tx_broadcast"), \
> > + OCELOT_STAT_ETHTOOL(TX_COLLISION, "tx_collision"), \
> > + OCELOT_STAT_ETHTOOL(TX_DROPS, "tx_drops"), \
> > + OCELOT_STAT_ETHTOOL(TX_PAUSE, "tx_pause"), \
> > + OCELOT_STAT_ETHTOOL(TX_64, "tx_frames_below_65_octets"), \
> > + OCELOT_STAT_ETHTOOL(TX_65_127, "tx_frames_65_to_127_octets"), \
> > + OCELOT_STAT_ETHTOOL(TX_128_255, "tx_frames_128_255_octets"), \
> > + OCELOT_STAT_ETHTOOL(TX_256_511, "tx_frames_256_511_octets"), \
> > + OCELOT_STAT_ETHTOOL(TX_512_1023, "tx_frames_512_1023_octets"), \
> > + OCELOT_STAT_ETHTOOL(TX_1024_1526, "tx_frames_1024_1526_octets"), \
> > + OCELOT_STAT_ETHTOOL(TX_1527_MAX, "tx_frames_over_1526_octets"), \
> > + OCELOT_STAT_ETHTOOL(TX_YELLOW_PRIO_0, "tx_yellow_prio_0"), \
> > + OCELOT_STAT_ETHTOOL(TX_YELLOW_PRIO_1, "tx_yellow_prio_1"), \
> > + OCELOT_STAT_ETHTOOL(TX_YELLOW_PRIO_2, "tx_yellow_prio_2"), \
> > + OCELOT_STAT_ETHTOOL(TX_YELLOW_PRIO_3, "tx_yellow_prio_3"), \
> > + OCELOT_STAT_ETHTOOL(TX_YELLOW_PRIO_4, "tx_yellow_prio_4"), \
> > + OCELOT_STAT_ETHTOOL(TX_YELLOW_PRIO_5, "tx_yellow_prio_5"), \
> > + OCELOT_STAT_ETHTOOL(TX_YELLOW_PRIO_6, "tx_yellow_prio_6"), \
> > + OCELOT_STAT_ETHTOOL(TX_YELLOW_PRIO_7, "tx_yellow_prio_7"), \
> > + OCELOT_STAT_ETHTOOL(TX_GREEN_PRIO_0, "tx_green_prio_0"), \
> > + OCELOT_STAT_ETHTOOL(TX_GREEN_PRIO_1, "tx_green_prio_1"), \
> > + OCELOT_STAT_ETHTOOL(TX_GREEN_PRIO_2, "tx_green_prio_2"), \
> > + OCELOT_STAT_ETHTOOL(TX_GREEN_PRIO_3, "tx_green_prio_3"), \
> > + OCELOT_STAT_ETHTOOL(TX_GREEN_PRIO_4, "tx_green_prio_4"), \
> > + OCELOT_STAT_ETHTOOL(TX_GREEN_PRIO_5, "tx_green_prio_5"), \
> > + OCELOT_STAT_ETHTOOL(TX_GREEN_PRIO_6, "tx_green_prio_6"), \
> > + OCELOT_STAT_ETHTOOL(TX_GREEN_PRIO_7, "tx_green_prio_7"), \
> > + OCELOT_STAT_ETHTOOL(TX_AGED, "tx_aged"), \
> > + OCELOT_STAT_ETHTOOL(DROP_LOCAL, "drop_local"), \
> > + OCELOT_STAT_ETHTOOL(DROP_TAIL, "drop_tail"), \
> > + OCELOT_STAT_ETHTOOL(DROP_YELLOW_PRIO_0, "drop_yellow_prio_0"), \
> > + OCELOT_STAT_ETHTOOL(DROP_YELLOW_PRIO_1, "drop_yellow_prio_1"), \
> > + OCELOT_STAT_ETHTOOL(DROP_YELLOW_PRIO_2, "drop_yellow_prio_2"), \
> > + OCELOT_STAT_ETHTOOL(DROP_YELLOW_PRIO_3, "drop_yellow_prio_3"), \
> > + OCELOT_STAT_ETHTOOL(DROP_YELLOW_PRIO_4, "drop_yellow_prio_4"), \
> > + OCELOT_STAT_ETHTOOL(DROP_YELLOW_PRIO_5, "drop_yellow_prio_5"), \
> > + OCELOT_STAT_ETHTOOL(DROP_YELLOW_PRIO_6, "drop_yellow_prio_6"), \
> > + OCELOT_STAT_ETHTOOL(DROP_YELLOW_PRIO_7, "drop_yellow_prio_7"), \
> > + OCELOT_STAT_ETHTOOL(DROP_GREEN_PRIO_0, "drop_green_prio_0"), \
> > + OCELOT_STAT_ETHTOOL(DROP_GREEN_PRIO_1, "drop_green_prio_1"), \
> > + OCELOT_STAT_ETHTOOL(DROP_GREEN_PRIO_2, "drop_green_prio_2"), \
> > + OCELOT_STAT_ETHTOOL(DROP_GREEN_PRIO_3, "drop_green_prio_3"), \
> > + OCELOT_STAT_ETHTOOL(DROP_GREEN_PRIO_4, "drop_green_prio_4"), \
> > + OCELOT_STAT_ETHTOOL(DROP_GREEN_PRIO_5, "drop_green_prio_5"), \
> > + OCELOT_STAT_ETHTOOL(DROP_GREEN_PRIO_6, "drop_green_prio_6"), \
> > + OCELOT_STAT_ETHTOOL(DROP_GREEN_PRIO_7, "drop_green_prio_7")
>
> If we're moving these anyway, and stopping providing anything *but*
> common stats, we could as well move them to ocelot_stats_layout and
> delete the OCELOT_COMMON_STATS macro?
I noticed that as well. Depending on which way is best (if the v2 patch
looks anything like this patch), I'll remove this macro.
prev parent reply other threads:[~2022-11-15 3:47 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-11 20:49 [PATCH v1 net-next 0/2] cleanup ocelot_stats exposure Colin Foster
2022-11-11 20:49 ` [PATCH v1 net-next 1/2] net: mscc: ocelot: remove redundant stats_layout pointers Colin Foster
2022-11-12 1:08 ` kernel test robot
2022-11-12 18:05 ` Colin Foster
2022-11-14 15:15 ` Vladimir Oltean
2022-11-15 3:43 ` Colin Foster
2022-11-15 16:08 ` Vladimir Oltean
2022-11-15 17:10 ` Colin Foster
2022-11-15 17:39 ` Vladimir Oltean
2022-11-11 20:49 ` [PATCH v1 net-next 2/2] net: mscc: ocelot: remove unnecessary exposure of stats structures Colin Foster
2022-11-12 10:34 ` kernel test robot
2022-11-14 15:19 ` Vladimir Oltean
2022-11-15 3:47 ` Colin Foster [this message]
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=Y3MLxNIQBiZKmtNs@euler \
--to=colin.foster@in-advantage.com \
--cc=alexandre.belloni@bootlin.com \
--cc=andrew@lunn.ch \
--cc=claudiu.manoil@nxp.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=f.fainelli@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=vladimir.oltean@nxp.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).