netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next v3 0/4] add FEC bins histogram report via ethtool
@ 2025-09-16 19:12 Vadim Fedorenko
  2025-09-16 19:12 ` [PATCH net-next v3 1/4] ethtool: add FEC bins histogram report Vadim Fedorenko
                   ` (3 more replies)
  0 siblings, 4 replies; 25+ messages in thread
From: Vadim Fedorenko @ 2025-09-16 19:12 UTC (permalink / raw)
  To: Jakub Kicinski, Andrew Lunn, Michael Chan, Pavan Chebbi,
	Tariq Toukan, Gal Pressman, intel-wired-lan, Donald Hunter,
	Carolina Jubran, Vadim Fedorenko
  Cc: Paolo Abeni, Simon Horman, netdev

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. NetDevSim driver has simple
implementation as an example while mlx5 has much more complex solution.

The example query is the same as usual FEC statistics while the answer
is a bit more verbose:

[vmuser@archvm9 linux]$ ./tools/net/ynl/pyynl/cli.py --spec Documentation/netlink/specs/ethtool.yaml --do fec-get --json '{"header":{"dev-index": 10, "flags": 4}}'
{'auto': 0,
 'header': {'dev-index': 10, 'dev-name': 'eni10np1'},
 'modes': {'bits': {}, 'nomask': True, 'size': 121},
 'stats': {'corr-bits': [],
           'corrected': [123],
           'hist': [{'bin-high': 0,
                     'bin-low': 0,
                     'bin-val': 445,
                     'bin-val-per-lane': [125, 120, 100, 100]},
                    {'bin-high': 3, 'bin-low': 1, 'bin-val': 12},
                    {'bin-high': 7, 'bin-low': 4, 'bin-val': 2}],
           'uncorr': [4]}}

v2 -> v3:
* fix yaml spec to use binary array for histogram per-lane values
* fix spelling
v1 -> v2:
* fix memset size of FEC histogram bins in mlx5
* adjust fbnic driver FEC stats callback

Links to RFC discussions:
v1 - https://lore.kernel.org/netdev/20250729102354.771859-1-vadfed@meta.com/
v2 - https://lore.kernel.org/netdev/20250731231019.1809172-1-vadfed@meta.com/
v3 - https://lore.kernel.org/netdev/20250802063024.2423022-1-vadfed@meta.com/
v4 - https://lore.kernel.org/netdev/20250807155924.2272507-1-vadfed@meta.com/
v5 - https://lore.kernel.org/netdev/20250815132729.2251597-1-vadfed@meta.com/

Carolina Jubran (3):
  net/mlx5e: Don't query FEC statistics when FEC is disabled
  net/mlx5e: Add logic to read RS-FEC histogram bin ranges from PPHCR
  net/mlx5e: Report RS-FEC histogram statistics via ethtool

Vadim Fedorenko (1):
  ethtool: add FEC bins histogram report

 Documentation/netlink/specs/ethtool.yaml      |  22 ++++
 Documentation/networking/ethtool-netlink.rst  |   5 +
 .../net/ethernet/broadcom/bnxt/bnxt_ethtool.c |   3 +-
 .../ethernet/fungible/funeth/funeth_ethtool.c |   3 +-
 .../ethernet/hisilicon/hns3/hns3_ethtool.c    |   3 +-
 drivers/net/ethernet/intel/ice/ice_ethtool.c  |   4 +-
 .../marvell/octeontx2/nic/otx2_ethtool.c      |   3 +-
 drivers/net/ethernet/mellanox/mlx5/core/en.h  |   1 +
 .../ethernet/mellanox/mlx5/core/en_ethtool.c  |   5 +-
 .../net/ethernet/mellanox/mlx5/core/en_main.c |  10 ++
 .../ethernet/mellanox/mlx5/core/en_stats.c    | 102 ++++++++++++++++--
 .../ethernet/mellanox/mlx5/core/en_stats.h    |   4 +-
 .../net/ethernet/meta/fbnic/fbnic_ethtool.c   |   3 +-
 drivers/net/ethernet/sfc/ethtool.c            |   3 +-
 drivers/net/ethernet/sfc/siena/ethtool.c      |   3 +-
 drivers/net/netdevsim/ethtool.c               |  22 +++-
 include/linux/ethtool.h                       |  25 ++++-
 .../uapi/linux/ethtool_netlink_generated.h    |  11 ++
 net/ethtool/fec.c                             |  69 +++++++++++-
 19 files changed, 278 insertions(+), 23 deletions(-)

-- 
2.47.3


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

end of thread, other threads:[~2025-09-19 15:48 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-16 19:12 [PATCH net-next v3 0/4] add FEC bins histogram report via ethtool Vadim Fedorenko
2025-09-16 19:12 ` [PATCH net-next v3 1/4] ethtool: add FEC bins histogram report Vadim Fedorenko
2025-09-17 11:27   ` [Intel-wired-lan] " Loktionov, Aleksandr
2025-09-18 10:58     ` Vadim Fedorenko
2025-09-19 15:47       ` Tony Nguyen
2025-09-18  0:41   ` Jakub Kicinski
2025-09-18 10:53     ` Vadim Fedorenko
2025-09-18 13:59       ` Jakub Kicinski
2025-09-16 19:12 ` [PATCH net-next v3 2/4] net/mlx5e: Don't query FEC statistics when FEC is disabled Vadim Fedorenko
2025-09-17 11:26   ` [Intel-wired-lan] " Loktionov, Aleksandr
2025-09-16 19:12 ` [PATCH net-next v3 3/4] net/mlx5e: Add logic to read RS-FEC histogram bin ranges from PPHCR Vadim Fedorenko
2025-09-17 11:25   ` [Intel-wired-lan] " Loktionov, Aleksandr
2025-09-18  0:46   ` Jakub Kicinski
2025-09-18 14:25     ` Carolina Jubran
2025-09-18 14:35       ` Jakub Kicinski
2025-09-18 15:16         ` Carolina Jubran
2025-09-18 15:40           ` Jakub Kicinski
2025-09-18 19:41             ` Carolina Jubran
2025-09-18 22:18               ` Jakub Kicinski
2025-09-19  9:35                 ` Carolina Jubran
2025-09-16 19:12 ` [PATCH net-next v3 4/4] net/mlx5e: Report RS-FEC histogram statistics via ethtool Vadim Fedorenko
2025-09-17 11:24   ` [Intel-wired-lan] " Loktionov, Aleksandr
2025-09-18  0:48   ` Jakub Kicinski
2025-09-18 14:32     ` Vadim Fedorenko
2025-09-18 14:40       ` Jakub Kicinski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).