From: Vladimir Oltean <vladimir.oltean@nxp.com>
To: netdev@vger.kernel.org
Cc: "David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Xiaoliang Yang <xiaoliang.yang_1@nxp.com>,
Claudiu Manoil <claudiu.manoil@nxp.com>,
Alexandre Belloni <alexandre.belloni@bootlin.com>,
UNGLinuxDriver@microchip.com, Andrew Lunn <andrew@lunn.ch>,
Vivien Didelot <vivien.didelot@gmail.com>,
Florian Fainelli <f.fainelli@gmail.com>,
Maxim Kochetkov <fido_max@inbox.ru>,
Colin Foster <colin.foster@in-advantage.com>,
Richie Pearn <richard.pearn@nxp.com>,
linux-kernel@vger.kernel.org
Subject: [PATCH net-next 01/14] net: dsa: felix: add definitions for the stream filter counters
Date: Thu, 8 Sep 2022 19:48:03 +0300 [thread overview]
Message-ID: <20220908164816.3576795-2-vladimir.oltean@nxp.com> (raw)
In-Reply-To: <20220908164816.3576795-1-vladimir.oltean@nxp.com>
TSN stream (802.1Qci, 802.1CB) filters are also accessed through
STAT_VIEW, just like the port registers, but these counters are per
stream, rather than per port. So we don't keep them in
ocelot_port_update_stats().
What we can do, however, is we can create register definitions for them
just like we have for the port counters, and delete the last remaining
user of the SYS_CNT register + a group index (read_gix).
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
---
drivers/net/dsa/ocelot/felix_vsc9959.c | 15 ++++++++++-----
drivers/net/dsa/ocelot/seville_vsc9953.c | 1 -
drivers/net/ethernet/mscc/vsc7514_regs.c | 1 -
include/soc/mscc/ocelot.h | 5 ++++-
4 files changed, 14 insertions(+), 8 deletions(-)
diff --git a/drivers/net/dsa/ocelot/felix_vsc9959.c b/drivers/net/dsa/ocelot/felix_vsc9959.c
index 1cdce8a98d1d..10db0b69b681 100644
--- a/drivers/net/dsa/ocelot/felix_vsc9959.c
+++ b/drivers/net/dsa/ocelot/felix_vsc9959.c
@@ -366,6 +366,10 @@ static const u32 vsc9959_sys_regmap[] = {
REG(SYS_COUNT_DROP_GREEN_PRIO_5, 0x00043c),
REG(SYS_COUNT_DROP_GREEN_PRIO_6, 0x000440),
REG(SYS_COUNT_DROP_GREEN_PRIO_7, 0x000444),
+ REG(SYS_COUNT_SF_MATCHING_FRAMES, 0x000800),
+ REG(SYS_COUNT_SF_NOT_PASSING_FRAMES, 0x000804),
+ REG(SYS_COUNT_SF_NOT_PASSING_SDU, 0x000808),
+ REG(SYS_COUNT_SF_RED_FRAMES, 0x00080c),
REG(SYS_RESET_CFG, 0x000e00),
REG(SYS_SR_ETYPE_CFG, 0x000e04),
REG(SYS_VLAN_ETYPE_CFG, 0x000e08),
@@ -387,7 +391,6 @@ static const u32 vsc9959_sys_regmap[] = {
REG_RESERVED(SYS_MMGT_FAST),
REG_RESERVED(SYS_EVENTS_DIF),
REG_RESERVED(SYS_EVENTS_CORE),
- REG(SYS_CNT, 0x000000),
REG(SYS_PTP_STATUS, 0x000f14),
REG(SYS_PTP_TXSTAMP, 0x000f18),
REG(SYS_PTP_NXT, 0x000f1c),
@@ -2522,10 +2525,12 @@ static void vsc9959_psfp_counters_get(struct ocelot *ocelot, u32 index,
SYS_STAT_CFG_STAT_VIEW_M,
SYS_STAT_CFG);
- counters->match = ocelot_read_gix(ocelot, SYS_CNT, 0x200);
- counters->not_pass_gate = ocelot_read_gix(ocelot, SYS_CNT, 0x201);
- counters->not_pass_sdu = ocelot_read_gix(ocelot, SYS_CNT, 0x202);
- counters->red = ocelot_read_gix(ocelot, SYS_CNT, 0x203);
+ counters->match = ocelot_read(ocelot, SYS_COUNT_SF_MATCHING_FRAMES);
+ counters->not_pass_gate = ocelot_read(ocelot,
+ SYS_COUNT_SF_NOT_PASSING_FRAMES);
+ counters->not_pass_sdu = ocelot_read(ocelot,
+ SYS_COUNT_SF_NOT_PASSING_SDU);
+ counters->red = ocelot_read(ocelot, SYS_COUNT_SF_RED_FRAMES);
/* Clear the PSFP counter. */
ocelot_write(ocelot,
diff --git a/drivers/net/dsa/ocelot/seville_vsc9953.c b/drivers/net/dsa/ocelot/seville_vsc9953.c
index b34f4cdfe814..26fdd0d90724 100644
--- a/drivers/net/dsa/ocelot/seville_vsc9953.c
+++ b/drivers/net/dsa/ocelot/seville_vsc9953.c
@@ -383,7 +383,6 @@ static const u32 vsc9953_sys_regmap[] = {
REG_RESERVED(SYS_MMGT_FAST),
REG_RESERVED(SYS_EVENTS_DIF),
REG_RESERVED(SYS_EVENTS_CORE),
- REG_RESERVED(SYS_CNT),
REG_RESERVED(SYS_PTP_STATUS),
REG_RESERVED(SYS_PTP_TXSTAMP),
REG_RESERVED(SYS_PTP_NXT),
diff --git a/drivers/net/ethernet/mscc/vsc7514_regs.c b/drivers/net/ethernet/mscc/vsc7514_regs.c
index 9cf82ecf191c..bd062203a6b2 100644
--- a/drivers/net/ethernet/mscc/vsc7514_regs.c
+++ b/drivers/net/ethernet/mscc/vsc7514_regs.c
@@ -283,7 +283,6 @@ const u32 vsc7514_sys_regmap[] = {
REG(SYS_MMGT_FAST, 0x0006a0),
REG(SYS_EVENTS_DIF, 0x0006a4),
REG(SYS_EVENTS_CORE, 0x0006b4),
- REG(SYS_CNT, 0x000000),
REG(SYS_PTP_STATUS, 0x0006b8),
REG(SYS_PTP_TXSTAMP, 0x0006bc),
REG(SYS_PTP_NXT, 0x0006c0),
diff --git a/include/soc/mscc/ocelot.h b/include/soc/mscc/ocelot.h
index 2a7e18ee5577..99d679235070 100644
--- a/include/soc/mscc/ocelot.h
+++ b/include/soc/mscc/ocelot.h
@@ -411,6 +411,10 @@ enum ocelot_reg {
SYS_COUNT_DROP_GREEN_PRIO_5,
SYS_COUNT_DROP_GREEN_PRIO_6,
SYS_COUNT_DROP_GREEN_PRIO_7,
+ SYS_COUNT_SF_MATCHING_FRAMES,
+ SYS_COUNT_SF_NOT_PASSING_FRAMES,
+ SYS_COUNT_SF_NOT_PASSING_SDU,
+ SYS_COUNT_SF_RED_FRAMES,
SYS_RESET_CFG,
SYS_SR_ETYPE_CFG,
SYS_VLAN_ETYPE_CFG,
@@ -433,7 +437,6 @@ enum ocelot_reg {
SYS_MMGT_FAST,
SYS_EVENTS_DIF,
SYS_EVENTS_CORE,
- SYS_CNT,
SYS_PTP_STATUS,
SYS_PTP_TXSTAMP,
SYS_PTP_NXT,
--
2.34.1
next prev parent reply other threads:[~2022-09-08 16:50 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-08 16:48 [PATCH net-next 00/14] Standardized ethtool counters for Felix DSA driver Vladimir Oltean
2022-09-08 16:48 ` Vladimir Oltean [this message]
2022-09-08 16:48 ` [PATCH net-next 02/14] net: mscc: ocelot: make access to STAT_VIEW sleepable again Vladimir Oltean
2022-09-08 16:48 ` [PATCH net-next 03/14] net: dsa: felix: check the 32-bit PSFP stats against overflow Vladimir Oltean
2022-09-08 16:48 ` [PATCH net-next 04/14] net: mscc: ocelot: report FIFO drop counters through stats->rx_dropped Vladimir Oltean
2022-09-08 16:48 ` [PATCH net-next 05/14] net: mscc: ocelot: sort Makefile files alphabetically Vladimir Oltean
2022-09-08 16:48 ` [PATCH net-next 06/14] net: mscc: ocelot: move stats code to ocelot_stats.c Vladimir Oltean
2022-09-08 16:48 ` [PATCH net-next 07/14] net: mscc: ocelot: unexport ocelot_port_fdb_do_dump from the common lib Vladimir Oltean
2022-09-08 16:48 ` [PATCH net-next 08/14] net: mscc: ocelot: move more PTP code from the lib to ocelot_ptp.c Vladimir Oltean
2022-09-08 16:48 ` [PATCH net-next 09/14] net: dsa: felix: use ocelot's ndo_get_stats64 method Vladimir Oltean
2022-09-08 16:48 ` [PATCH net-next 10/14] net: mscc: ocelot: exclude stats from bulk regions based on reg, not name Vladimir Oltean
2022-09-08 16:48 ` [PATCH net-next 11/14] net: mscc: ocelot: add support for all sorts of standardized counters present in DSA Vladimir Oltean
2022-09-08 16:48 ` [PATCH net-next 12/14] net: mscc: ocelot: harmonize names of SYS_COUNT_TX_AGING and OCELOT_STAT_TX_AGED Vladimir Oltean
2022-09-08 16:48 ` [PATCH net-next 13/14] net: mscc: ocelot: minimize definitions for stats Vladimir Oltean
2022-09-08 16:48 ` [PATCH net-next 14/14] net: mscc: ocelot: share the common stat definitions between all drivers Vladimir Oltean
2022-09-09 10:10 ` [PATCH net-next 00/14] Standardized ethtool counters for Felix DSA driver patchwork-bot+netdevbpf
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=20220908164816.3576795-2-vladimir.oltean@nxp.com \
--to=vladimir.oltean@nxp.com \
--cc=UNGLinuxDriver@microchip.com \
--cc=alexandre.belloni@bootlin.com \
--cc=andrew@lunn.ch \
--cc=claudiu.manoil@nxp.com \
--cc=colin.foster@in-advantage.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=f.fainelli@gmail.com \
--cc=fido_max@inbox.ru \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=richard.pearn@nxp.com \
--cc=vivien.didelot@gmail.com \
--cc=xiaoliang.yang_1@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
all inboxes | Powered by JetHome®