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