mbox series

[net-next,0/4] ethtool get_ts_stats() for DSA and ocelot driver

Message ID 20241213140852.1254063-1-vladimir.oltean@nxp.com (mailing list archive)
Headers show
Series ethtool get_ts_stats() for DSA and ocelot driver | expand

Message

Vladimir Oltean Dec. 13, 2024, 2:08 p.m. UTC
After a recent patch set with fixes and general restructuring, Jakub asked for
the Felix DSA driver to start reporting standardized statistics for hardware
timestamping:
https://lore.kernel.org/netdev/20241207180640.12da60ed@kernel.org/

Testing follows the same procedure as in the aforementioned series, with PTP
packet loss induced through taprio:

$ ethtool -I --show-time-stamping swp3
Time stamping parameters for swp3:
Capabilities:
        hardware-transmit
        software-transmit
        hardware-receive
        software-receive
        software-system-clock
        hardware-raw-clock
PTP Hardware Clock: 1
Hardware Transmit Timestamp Modes:
        off
        on
        onestep-sync
Hardware Receive Filter Modes:
        none
        ptpv2-l4-event
        ptpv2-l2-event
        ptpv2-event
Statistics:
  tx_pkts: 14591
  tx_lost: 85
  tx_err: 0

Note that the kernel netlink attributes contain a newly added statistics
counter for unconfirmed one-step TX timestamps, which is not printed by
the ethtool user space program yet. I will post a patch once this set is
accepted.

Vladimir Oltean (4):
  net: ethtool: ts: add separate counter for unconfirmed one-step TX
    timestamps
  net: dsa: implement get_ts_stats ethtool operation for user ports
  net: mscc: ocelot: add TX timestamping statistics
  net: dsa: felix: report timestamping stats from the ocelot library

 Documentation/netlink/specs/ethtool.yaml      |  3 ++
 Documentation/networking/ethtool-netlink.rst  | 16 ++++--
 drivers/net/dsa/ocelot/felix.c                |  9 ++++
 drivers/net/ethernet/mscc/ocelot_net.c        | 11 ++++
 drivers/net/ethernet/mscc/ocelot_ptp.c        | 53 +++++++++++++++----
 drivers/net/ethernet/mscc/ocelot_stats.c      | 37 +++++++++++++
 include/linux/ethtool.h                       |  7 +++
 include/net/dsa.h                             |  2 +
 include/soc/mscc/ocelot.h                     | 11 ++++
 .../uapi/linux/ethtool_netlink_generated.h    |  1 +
 net/dsa/user.c                                | 11 ++++
 net/ethtool/tsinfo.c                          |  2 +
 12 files changed, 147 insertions(+), 16 deletions(-)

Comments

Jakub Kicinski Dec. 14, 2024, 1:33 a.m. UTC | #1
On Fri, 13 Dec 2024 16:08:48 +0200 Vladimir Oltean wrote:
> After a recent patch set with fixes and general restructuring, Jakub asked for
> the Felix DSA driver to start reporting standardized statistics for hardware
> timestamping:
> https://lore.kernel.org/netdev/20241207180640.12da60ed@kernel.org/

Reviewed-by: Jakub Kicinski <kuba@kernel.org>

Thank you!
Jakub Kicinski Dec. 17, 2024, 2:22 a.m. UTC | #2
On Fri, 13 Dec 2024 16:08:48 +0200 Vladimir Oltean wrote:
> After a recent patch set with fixes and general restructuring, Jakub asked for
> the Felix DSA driver to start reporting standardized statistics for hardware
> timestamping:
> https://lore.kernel.org/netdev/20241207180640.12da60ed@kernel.org/

Looks like we need a rebase.