Skip to content

ethtool HW timestamping statistics

Rahul Rameshbabu linux-doc lkml netdev 2 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. v2 Latest6 patches 1 replyApplied 7/7
  2. v16 patches 4 repliesSuperseded

Changes in v2 from the cover letter

- Dropped the late statistics counter since that was not general enough
- Dropped the layer selection attribute for timestamping statistics
- Take Jakub's suggestion and converted to ETHTOOL_FLAG_STATS
- Provided a working interface to query these new statistics from tools/net/ynl/ethtool.py

Patches in v2 All 7 applied

#Subject and filesSizeRepliesApplied
1/6ethtool: add interface to read Tx hardware timestamping statisticsDocumentation/netlink/specs/ethtool.yaml Documentation/networking/ethtool-netlink.rst include/linux/ethtool.h +2 more+117 -20 repliesApplied
2/6net/mlx5e: Introduce lost_cqe statistic counter for PTP Tx port timestamping CQDocumentation/networking/device_drivers/ethernet/mellanox/mlx5/counters.rst drivers/net/ethernet/mellanox/mlx5/core/en/ptp.c drivers/net/ethernet/mellanox/mlx5/core/en_stats.c +1 more+9 -00 repliesApplied
3/6net/mlx5e: Introduce timestamps statistic counter for Tx DMA layerDocumentation/networking/device_drivers/ethernet/mellanox/mlx5/counters.rst drivers/net/ethernet/mellanox/mlx5/core/en_stats.c drivers/net/ethernet/mellanox/mlx5/core/en_stats.h +1 more+12 -20 repliesApplied
4/6net/mlx5e: Implement ethtool hardware timestamping statisticsdrivers/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+56 -00 repliesApplied
5/6netlink: specs: ethtool: add header-flags enumerationDocumentation/netlink/specs/ethtool.yaml include/uapi/linux/ethtool_netlink.h+10 -60 repliesApplied
5/6tools: ynl: ethtool.py: Make tool invokable from any CWDtools/net/ynl/ethtool.py+6 -21 replyApplied
6/6tools: ynl: ethtool.py: Output timestamping statistics from tsinfo-get operationtools/net/ynl/ethtool.py+10 -10 repliesApplied

Reviews trailers per patch

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

PatchDragos TatuleaTariq Toukan
1/6R-b
2/6R-b R-b
3/6R-b
4/6R-b
5/6R-b
5/6R-b
6/6R-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 HW timestamping statistics

The goal of this patch series is to introduce a common set of ethtool statistics for hardware timestamping that a driver implementer can hook into. The statistics counters added are based on what I believe are common patterns/behaviors found across various hardware timestamping implementations seen in the kernel tree today. The mlx5 family of devices is used as the PoC for this patch series. Other vendors are more than welcome to chime in on this series.

Changes since RFC v1:
- Dropped the late statistics counter since that was not general enough
- Dropped the layer selection attribute for timestamping statistics
- Take Jakub's suggestion and converted to ETHTOOL_FLAG_STATS
- Provided a working interface to query these new statistics from tools/net/ynl/ethtool.py

Changes since RFC v2:
- Applied suggestion by Jakub for implementing an enumeration for ethtool header flags

Changes since v1:
- Fixed scripts/kernel-doc warning in include/linux/ethtool.h

---
Rahul Rameshbabu (6):
ethtool: add interface to read Tx hardware timestamping statistics net/mlx5e: Introduce lost_cqe statistic counter for PTP Tx port
timestamping CQ
net/mlx5e: Introduce timestamps statistic counter for Tx DMA layer net/mlx5e: Implement ethtool hardware timestamping statistics
netlink: specs: ethtool: add header-flags enumeration
tools: ynl: ethtool.py: Output timestamping statistics from tsinfo-get
operation

 Documentation/netlink/specs/ethtool.yaml      | 22 ++++++++
 .../ethernet/mellanox/mlx5/counters.rst       | 11 ++++
 Documentation/networking/ethtool-netlink.rst  |  9 ++++
 .../net/ethernet/mellanox/mlx5/core/en/ptp.c  |  1 +
 .../ethernet/mellanox/mlx5/core/en_ethtool.c  |  9 ++++
 .../ethernet/mellanox/mlx5/core/en_stats.c    | 48 +++++++++++++++++
 .../ethernet/mellanox/mlx5/core/en_stats.h    |  4 ++
 .../net/ethernet/mellanox/mlx5/core/en_tx.c   |  6 ++-
 include/linux/ethtool.h                       | 27 +++++++++-
 include/uapi/linux/ethtool_netlink.h          | 25 ++++++---
 net/ethtool/tsinfo.c                          | 52 ++++++++++++++++++-
 tools/net/ynl/ethtool.py                      | 11 +++-
 12 files changed, 214 insertions(+), 11 deletions(-)
Signature · 1 line
2.42.0