Skip to content

add FEC bins histogram report via ethtool

Vadim Fedorenko intel-wired-lan netdev 6 versions – Applied

Status from this message: This series was applied to netdev/net-next.git (main)

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v6 Latest5 patches 4 repliesApplied 5/5
  2. v55 patches 2 repliesSuperseded
  3. v45 patches 1 replySuperseded
Earlier versions · 3
VersionPostedPatchesRepliesStatus
v34 patches20 repliesSuperseded
v24 patches3 repliesSuperseded
v14 patches0 repliesSuperseded

Changes in v6 from the cover letter

* adjust yaml spec to have padding field within fec-hist namespace
* mlx5: adjust max histogram entries check to match the size of array of mapped registers

Patches in v6 All 5 applied

#Subject and filesSizeRepliesApplied
1/5ethtool: add FEC bins histogram reportDocumentation/netlink/specs/ethtool.yaml Documentation/networking/ethtool-netlink.rst drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c +12 more+186 -131 replyApplied
2/5net/mlx5e: Don't query FEC statistics when FEC is disableddrivers/net/ethernet/mellanox/mlx5/core/en_stats.c+6 -61 replyApplied
3/5net/mlx5e: Add logic to read RS-FEC histogram bin ranges from PPHCRdrivers/net/ethernet/mellanox/mlx5/core/en.h drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c drivers/net/ethernet/mellanox/mlx5/core/en_main.c +2 more+94 -31 replyApplied
4/5net/mlx5e: Report RS-FEC histogram statistics via ethtooldrivers/net/ethernet/mellanox/mlx5/core/en_stats.c+33 -10 repliesApplied
5/5selftests: net-drv: stats: sanity check FEC histogramtools/testing/selftests/drivers/net/stats.py+33 -21 replyApplied

Reviews trailers per patch

All 5 patches have a Reviewed-by or Acked-by.

PatchDragos TatuleaYael ChemlaAleksandr Loktionov
1/5R-b
2/5R-b R-b R-b R-b
3/5R-b R-b R-b
4/5R-b R-b
5/5R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v6 thread

Cover letter [PATCH net-next v6 0/5] 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:

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

v5 -> v6:
* adjust yaml spec to have padding field within fec-hist namespace
* mlx5: adjust max histogram entries check to match the size of array of mapped registers
v4 -> v5:
* fix selftests error path
v3 -> v4:
* update spec to avoid using underscores
* make core accumulate per-lane errors into bin error counter
* adjust wording in Documentation
* improve FEC type check in mlx5
* add selftest to do sanity check of reported histogram
* partially carry-over Rb tags from Aleksandr because of logical changes
v3 Link - https://lore.kernel.org/netdev/[email protected]/
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/[email protected]/
v2 - https://lore.kernel.org/netdev/[email protected]/
v3 - https://lore.kernel.org/netdev/[email protected]/
v4 - https://lore.kernel.org/netdev/[email protected]/
v5 - https://lore.kernel.org/netdev/[email protected]/

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 (2):
ethtool: add FEC bins histogram report
selftests: net-drv: stats: sanity check FEC histogram

 Documentation/netlink/specs/ethtool.yaml      |  29 ++++
 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 |   8 ++
 .../ethernet/mellanox/mlx5/core/en_stats.c    | 127 +++++++++++++++++-
 .../ethernet/mellanox/mlx5/core/en_stats.h    |   3 +-
 .../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               |  25 +++-
 include/linux/ethtool.h                       |  25 +++-
 .../uapi/linux/ethtool_netlink_generated.h    |  12 ++
 net/ethtool/fec.c                             |  75 ++++++++++-
 tools/testing/selftests/drivers/net/stats.py  |  35 ++++-
 20 files changed, 351 insertions(+), 24 deletions(-)
Signature · 1 line
2.47.3