]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
Merge branch 'add-fec-bins-histogram-report-via-ethtool'
authorJakub Kicinski <kuba@kernel.org>
Fri, 26 Sep 2025 23:48:02 +0000 (16:48 -0700)
committerJakub Kicinski <kuba@kernel.org>
Fri, 26 Sep 2025 23:49:31 +0000 (16:49 -0700)
Vadim Fedorenko says:

====================
add FEC bins histogram report via ethtool

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:

  $ ynl --family ethtool --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,
                       'bin-val-per-lane': [2, 0, 0, 0]}],
             'uncorr': [4]}}
====================

Link: https://patch.msgid.link/20250924124037.1508846-1-vadim.fedorenko@linux.dev
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

Trivial merge