[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250918065923.26331dd6@kernel.org>
Date: Thu, 18 Sep 2025 06:59:23 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Vadim Fedorenko <vadim.fedorenko@...ux.dev>
Cc: Andrew Lunn <andrew@...n.ch>, Michael Chan <michael.chan@...adcom.com>,
Pavan Chebbi <pavan.chebbi@...adcom.com>, Tariq Toukan <tariqt@...dia.com>,
Gal Pressman <gal@...dia.com>, intel-wired-lan@...ts.osuosl.org, Donald
Hunter <donald.hunter@...il.com>, Carolina Jubran <cjubran@...dia.com>,
Paolo Abeni <pabeni@...hat.com>, Simon Horman <horms@...nel.org>,
netdev@...r.kernel.org
Subject: Re: [PATCH net-next v3 1/4] ethtool: add FEC bins histogram report
On Thu, 18 Sep 2025 11:53:53 +0100 Vadim Fedorenko wrote:
> On 18/09/2025 01:41, Jakub Kicinski wrote:
> > On Tue, 16 Sep 2025 19:12:54 +0000 Vadim Fedorenko wrote:
> >> 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.
> >> 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.
Powered by blists - more mailing lists