netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next v2 0/6] ethtool: add standard FEC statistics
@ 2021-04-15 22:53 Jakub Kicinski
  2021-04-15 22:53 ` [PATCH net-next v2 1/6] ethtool: move ethtool_stats_init Jakub Kicinski
                   ` (8 more replies)
  0 siblings, 9 replies; 15+ messages in thread
From: Jakub Kicinski @ 2021-04-15 22:53 UTC (permalink / raw)
  To: davem
  Cc: netdev, michael.chan, saeedm, leon, ecree.xilinx, habetsm.xilinx,
	f.fainelli, andrew, mkubecek, ariela, Jakub Kicinski

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(-)

-- 
2.30.2


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

end of thread, other threads:[~2021-07-01 15:42 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-15 22:53 [PATCH net-next v2 0/6] ethtool: add standard FEC statistics Jakub Kicinski
2021-04-15 22:53 ` [PATCH net-next v2 1/6] ethtool: move ethtool_stats_init Jakub Kicinski
2021-04-15 22:53 ` [PATCH net-next v2 2/6] ethtool: fec_prepare_data() - jump to error handling Jakub Kicinski
2021-04-15 22:53 ` [PATCH net-next v2 3/6] ethtool: add FEC statistics Jakub Kicinski
2021-04-15 22:53 ` [PATCH net-next v2 4/6] bnxt: implement ethtool::get_fec_stats Jakub Kicinski
2021-04-15 22:53 ` [PATCH net-next v2 5/6] sfc: ef10: " Jakub Kicinski
2021-04-20 15:13   ` Edward Cree
2021-04-20 18:24     ` Jakub Kicinski
2021-04-15 22:53 ` [PATCH net-next v2 6/6] mlx5: " Jakub Kicinski
2021-04-15 23:51 ` [PATCH net-next v2 0/6] ethtool: add standard FEC statistics Saeed Mahameed
2021-04-16  0:20 ` patchwork-bot+netdevbpf
2021-05-18  6:48 ` huangguangbin (A)
2021-05-18 17:30   ` Jakub Kicinski
2021-07-01 12:18     ` huangguangbin (A)
2021-07-01 15:42       ` 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).