Skip to content

ethtool: add standard FEC statistics

Jakub Kicinski netdev 2 versions – Applied

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

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest6 patches 7 repliesApplied 6/6
  2. v16 patches 6 repliesSuperseded

Patches in v2 All 6 applied

#Subject and filesSizeRepliesApplied
1/6ethtool: move ethtool_stats_initinclude/linux/ethtool.h net/ethtool/pause.c+6 -60 repliesApplied
2/6ethtool: fec_prepare_data() - jump to error handlingnet/ethtool/fec.c+4 -30 repliesApplied
3/6ethtool: add FEC statisticsDocumentation/networking/ethtool-netlink.rst Documentation/networking/statistics.rst include/linux/ethtool.h +2 more+149 -10 repliesApplied
4/6bnxt: implement ethtool::get_fec_statsdrivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c+15 -00 repliesApplied
5/6sfc: ef10: implement ethtool::get_fec_statsdrivers/net/ethernet/sfc/ef10.c drivers/net/ethernet/sfc/ethtool.c drivers/net/ethernet/sfc/net_driver.h+30 -02 repliesApplied
6/6mlx5: implement ethtool::get_fec_statsdrivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c drivers/net/ethernet/mellanox/mlx5/core/en_stats.c drivers/net/ethernet/mellanox/mlx5/core/en_stats.h+38 -20 repliesApplied

Reviews trailers per patch

2 of 6 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchMichael ChanSaeed Mahameed
SeriesR-b
1/6
2/6
3/6
4/6R-b
5/6
6/6A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH net-next v2 0/6] ethtool: add standard FEC statistics

This set adds uAPI for reporting standard FEC statistics, and implements it in a handful of drivers.

The statistics are taken from the IEEE standard, with one extra seemingly popular but not standard statistics added.

The implementation is similar to that of the pause frame statistics, user requests the stats by setting a bit (ETHTOOL_FLAG_STATS) in the common ethtool header of ETHTOOL_MSG_FEC_GET.

Since standard defines the statistics per lane what's reported is both total and per-lane counters:

 # ethtool -I --show-fec eth0
 FEC parameters for eth0:
 Configured FEC encodings: None
 Active FEC encoding: None
 Statistics:
  corrected_blocks: 256
    Lane 0: 255
    Lane 1: 1
  uncorrectable_blocks: 145
    Lane 0: 128
    Lane 1: 17

v2: check for errors in mlx5 register access

Jakub Kicinski (6):
ethtool: move ethtool_stats_init
ethtool: fec_prepare_data() - jump to error handling
ethtool: add FEC statistics
bnxt: implement ethtool::get_fec_stats
sfc: ef10: implement ethtool::get_fec_stats
mlx5: implement ethtool::get_fec_stats

 Documentation/networking/ethtool-netlink.rst  | 21 +++++
 Documentation/networking/statistics.rst       |  2 +
 .../net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 15 ++++
 .../ethernet/mellanox/mlx5/core/en_ethtool.c  |  9 +++
 .../ethernet/mellanox/mlx5/core/en_stats.c    | 29 ++++++-
 .../ethernet/mellanox/mlx5/core/en_stats.h    |  2 +
 drivers/net/ethernet/sfc/ef10.c               | 17 ++++
 drivers/net/ethernet/sfc/ethtool.c            | 10 +++
 drivers/net/ethernet/sfc/net_driver.h         |  3 +
 include/linux/ethtool.h                       | 46 +++++++++++
 include/uapi/linux/ethtool_netlink.h          | 14 ++++
 net/ethtool/fec.c                             | 80 ++++++++++++++++++-
 net/ethtool/pause.c                           |  6 --
 13 files changed, 242 insertions(+), 12 deletions(-)
Signature · 1 line
2.30.2