From: MD Danish Anwar <danishanwar@ti.com>
To: "David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Simon Horman <horms@kernel.org>, Jonathan Corbet <corbet@lwn.net>,
Shuah Khan <skhan@linuxfoundation.org>,
MD Danish Anwar <danishanwar@ti.com>,
Roger Quadros <rogerq@kernel.org>,
Andrew Lunn <andrew+netdev@lunn.ch>,
Meghana Malladi <m-malladi@ti.com>,
Jacob Keller <jacob.e.keller@intel.com>,
David Carlier <devnexen@gmail.com>,
"Vadim Fedorenko" <vadim.fedorenko@linux.dev>,
Kevin Hao <haokexin@gmail.com>
Cc: <netdev@vger.kernel.org>, <linux-doc@vger.kernel.org>,
<linux-kernel@vger.kernel.org>,
<linux-arm-kernel@lists.infradead.org>,
Vladimir Oltean <vladimir.oltean@nxp.com>
Subject: [PATCH net-next v2 0/2] Add ICSSG firmware stats related to HSR
Date: Thu, 14 May 2026 13:26:03 +0530 [thread overview]
Message-ID: <20260514075605.850674-1-danishanwar@ti.com> (raw)
This series adds HSR and LRE firmware PA statistics to the TI ICSSG
ethtool stats interface, and places static_assert() guards next to the
stat descriptor arrays to catch count mismatches at build time.
Patch 1 adds static_assert() immediately after each of
icssg_all_miig_stats[] and icssg_all_pa_stats[] in icssg_stats.h,
verifying that ICSSG_NUM_MIIG_STATS and ICSSG_NUM_PA_STATS stay in
sync with the actual array sizes.
Patch 2 adds ten new firmware counters for HSR forwarding-path drops,
host-egress-path drops, and LRE duplicate-detection, updates
icssg_ndo_get_stats64() to fold the relevant counters into rx_errors
and rx_dropped, bumps ICSSG_NUM_PA_STATS to 42 (caught immediately by
the static_assert from patch 1 if the constant is ever left behind),
and documents all new entries in icssg_prueth.rst.
Changes in v2:
- Drop the ARRAY_SIZE()-based macro approach from v1 (which caused
binary bloat by pulling the static const arrays into every TU via
icssg_prueth.h) as suggested by David Carlier <devnexen@gmail.com>
- Add static_assert() next to each array in icssg_stats.h instead,
keeping the numeric #defines and the original include graph. As
suggested by David Carlier <devnexen@gmail.com>
v1 https://lore.kernel.org/all/20260512060627.3781329-1-danishanwar@ti.com/
MD Danish Anwar (2):
net: ti: icssg: Add static_assert to guard stat array counts
net: ti: icssg: Add HSR and LRE PA statistics
.../device_drivers/ethernet/ti/icssg_prueth.rst | 10 ++++++++++
drivers/net/ethernet/ti/icssg/icssg_common.c | 7 +++++--
drivers/net/ethernet/ti/icssg/icssg_prueth.h | 2 +-
drivers/net/ethernet/ti/icssg/icssg_stats.h | 14 ++++++++++++++
drivers/net/ethernet/ti/icssg/icssg_switch_map.h | 10 ++++++++++
5 files changed, 40 insertions(+), 3 deletions(-)
base-commit: 18dc8e6d15d7a30888beec46a1e01ca0f98508fa
--
2.34.1
next reply other threads:[~2026-05-14 7:56 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-14 7:56 MD Danish Anwar [this message]
2026-05-14 7:56 ` [PATCH net-next v2 1/2] net: ti: icssg: Add static_assert to guard stat array counts MD Danish Anwar
2026-05-14 7:56 ` [PATCH net-next v2 2/2] net: ti: icssg: Add HSR and LRE PA statistics MD Danish Anwar
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=20260514075605.850674-1-danishanwar@ti.com \
--to=danishanwar@ti.com \
--cc=andrew+netdev@lunn.ch \
--cc=corbet@lwn.net \
--cc=davem@davemloft.net \
--cc=devnexen@gmail.com \
--cc=edumazet@google.com \
--cc=haokexin@gmail.com \
--cc=horms@kernel.org \
--cc=jacob.e.keller@intel.com \
--cc=kuba@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=m-malladi@ti.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=rogerq@kernel.org \
--cc=skhan@linuxfoundation.org \
--cc=vadim.fedorenko@linux.dev \
--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