Linux Documentation
 help / color / mirror / Atom feed
* [PATCH net-next v2 0/2] Add ICSSG firmware stats related to HSR
@ 2026-05-14  7:56 MD Danish Anwar
  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
  0 siblings, 2 replies; 3+ messages in thread
From: MD Danish Anwar @ 2026-05-14  7:56 UTC (permalink / raw)
  To: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Simon Horman, Jonathan Corbet, Shuah Khan, MD Danish Anwar,
	Roger Quadros, Andrew Lunn, Meghana Malladi, Jacob Keller,
	David Carlier, Vadim Fedorenko, Kevin Hao
  Cc: netdev, linux-doc, linux-kernel, linux-arm-kernel,
	Vladimir Oltean

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-05-14  7:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-14  7:56 [PATCH net-next v2 0/2] Add ICSSG firmware stats related to HSR MD Danish Anwar
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox