On Thu, 18 Sep 2025 11:53:53 +0100 Vadim Fedorenko wrote:
On 18/09/2025 01:41, Jakub Kicinski wrote:
quoted
On Tue, 16 Sep 2025 19:12:54 +0000 Vadim Fedorenko wrote:
quoted
IEEE 802.3ck-2022 defines counters for FEC bins and 802.3df-2024
clarifies it a bit further. Implement reporting interface through as
addition to FEC stats available in ethtool.
diff --git a/Documentation/netlink/specs/ethtool.yaml b/Documentation/netlink/specs/ethtool.yaml
index 7a7594713f1f..de5008266884 100644
--- a/Documentation/netlink/specs/ethtool.yaml
+++ b/Documentation/netlink/specs/ethtool.yaml
@@ -1219,6 +1219,23 @@ attribute-sets:
name: udp-ports
type: nest
nested-attributes: tunnel-udp
+ -
+ name: fec-hist
+ attr-cnt-name: __ethtool-a-fec-hist-cnt
s/__/--/
That will bring strong inconsistency in schema. All other attributes
have counter attribute with __ in the beginning:
name: fec-stat
attr-cnt-name: __ethtool-a-fec-stat-cnt
name: stats-grp
attr-cnt-name: __ethtool-a-stats-grp-cnt
name: stats
attr-cnt-name: __ethtool-a-stats-cnt
I know.
quoted
quoted
static void
-nsim_get_fec_stats(struct net_device *dev, struct ethtool_fec_stats *fec_stats)
+nsim_get_fec_stats(struct net_device *dev, struct ethtool_fec_stats *fec_stats,
+ struct ethtool_fec_hist *hist)
{
+ struct ethtool_fec_hist_value *values = hist->values;
+
+ hist->ranges = netdevsim_fec_ranges;
+
fec_stats->corrected_blocks.total = 123;
fec_stats->uncorrectable_blocks.total = 4;
+
+ values[0].bin_value = 445;
Bin 0 had per lane breakdown, can't core add up the lanes for the
driver?
Like it's done for blocks counter? Should we force drivers to keep 'sum'
value equal to ETHTOOL_STAT_NOT_SET when they provide per-lane values?
No preference, but if it is NOT_SET we should add it up.