Skip to content

ethtool: support time stamping and phc clocks

Richard Cochran linux-next netdev 4 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest26 patches 7 repliesIn review
  2. v328 patches 6 repliesSuperseded
  3. v228 patches 4 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v1 RFC8 patches0 repliesSuperseded

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/26phc: Add a method for obtaining the device index.drivers/ptp/ptp_clock.c include/linux/ptp_clock_kernel.h+14 -00 replies
2/26ethtool: Introduce a method for getting time stamping capabilities.include/linux/ethtool.h include/linux/phy.h net/core/ethtool.c+76 -30 replies
3/26dp83640: Support the get_ts_info ethtool method.drivers/net/phy/dp83640.c+31 -00 replies
4/26gianfar: Support the get_ts_info ethtool method.drivers/net/ethernet/freescale/gianfar.h drivers/net/ethernet/freescale/gianfar_ethtool.c drivers/net/ethernet/freescale/gianfar_ptp.c+34 -02 replies
5/26bfin_mac: Support the get_ts_info ethtool method.drivers/net/ethernet/adi/bfin_mac.c+20 -03 replies
6/26ixp4xx_eth: Support the get_ts_info ethtool method.arch/arm/mach-ixp4xx/include/mach/ixp46x_ts.h drivers/net/ethernet/xscale/ixp4xx_eth.c drivers/ptp/ptp_ixp46x.c+35 -00 replies
7/26ethtool: Add a common function for drivers with transmit time stamping.include/linux/ethtool.h net/core/ethtool.c+12 -00 replies
8/26ax88796: Support the get_ts_info ethtool method.drivers/net/ethernet/8390/ax88796.c+1 -00 replies
9/26davinci_emac: Support the get_ts_info ethtool method.drivers/net/ethernet/ti/davinci_emac.c+1 -00 replies
10/26dnet: Support the get_ts_info ethtool method.drivers/net/ethernet/dnet.c+1 -00 replies
11/26etherh: Support the get_ts_info ethtool method.drivers/net/ethernet/8390/etherh.c+1 -00 replies
12/26fec_mpc52xx: Support the get_ts_info ethtool method.drivers/net/ethernet/freescale/fec_mpc52xx.c+1 -00 replies
13/26fec: Support the get_ts_info ethtool method.drivers/net/ethernet/freescale/fec.c+1 -00 replies
14/26fs_enet: Support the get_ts_info ethtool method.drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c+1 -00 replies
15/26ll_temac: Support the get_ts_info ethtool method.drivers/net/ethernet/xilinx/ll_temac_main.c+1 -00 replies
16/26macb: Support the get_ts_info ethtool method.drivers/net/ethernet/cadence/macb.c+1 -00 replies
17/26mv643xx_eth: Support the get_ts_info ethtool method.drivers/net/ethernet/marvell/mv643xx_eth.c+1 -00 replies
18/26pxa168_eth: Support the get_ts_info ethtool method.drivers/net/ethernet/marvell/pxa168_eth.c+1 -00 replies
19/26r6040: Support the get_ts_info ethtool method.drivers/net/ethernet/rdc/r6040.c+1 -00 replies
20/26r8169: Support the get_ts_info ethtool method.drivers/net/ethernet/realtek/r8169.c+1 -00 replies
21/26smsc911x: Support the get_ts_info ethtool method.drivers/net/ethernet/smsc/smsc911x.c+1 -00 replies
22/26smsc9420: Support the get_ts_info ethtool method.drivers/net/ethernet/smsc/smsc9420.c+1 -00 replies
23/26stmmac: Support the get_ts_info ethtool method.drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c+1 -00 replies
24/26tg3: Support the get_ts_info ethtool method.drivers/net/ethernet/broadcom/tg3.c+1 -00 replies
25/26ucc_geth: Support the get_ts_info ethtool method.drivers/net/ethernet/freescale/ucc_geth_ethtool.c+1 -00 replies
26/26usbnet: Support the get_ts_info ethtool method.drivers/net/usb/usbnet.c+1 -00 replies

Reviews trailers per patch

2 of 26 patches have a Reviewed-by or Acked-by.

PatchBen Hutchings
1/26
2/26R-b
3/26
4/26
5/26
6/26
7/26R-b
8/26
9/26
10/26
11/26
12/26
13/26
14/26
15/26
16/26
17/26
18/26
19/26
20/26
21/26
22/26
23/26
24/26
25/26
26/26

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

Read the v4 thread

Cover letter [PATCH V4 net-next 00/26] ethtool: support time stamping and phc clocks

* Changes in V4:
- drop two patches requiring out of tree support
- added Ben's Reviewed-by tag on two commit messages
* Changes in V3:
- works without ethtool_ops
- does not require special privileges
- neaten user space tool output

Support for SO_TIMESTAMPING of network packets and PTP Hardware Clocks has been expanding over the last year or two. In an ideal world, every host would have exactly one PTP hardware clock, and every Ethernet MAC would support SO_TIMESTAMPING on both the transmit and receive paths. However, since we do not yet have full coverage for these features, user space programs need a way to discover what a given interface supports in these two areas.

* PTP Hardware Clocks

The relationship between the network interfaces and the (possibly multiple) PHC devices is not discoverable except by knowing what hardware you have got and carefully looking into the kernel log.

* SO_TIMESTAMPING

- Receive software time stamps are implemented in the stack and thus work for all MAC hardware.
- Transmit software time stamps are only supported by a dozen drivers or so.
- Some special devices support Tx/Rx time stamping in hardware.
- None of this is discoverable except by looking into the kernel sources.

This series exposes the hardware and driver capabilities known to user space via ethtool.

Since the PHC code was first merged, this has become the number one requested new feature.

The new feature has been tested on the following hardware:

igb       Hardware time stamping in the MAC (but patch awaits out of tree support)
dp83640   Hardware time stamping in the PHY
r8169     Software Tx time stamping in the MAC

Thanks,
Richard

Richard Cochran (26):
phc: Add a method for obtaining the device index.
ethtool: Introduce a method for getting time stamping capabilities.
dp83640: Support the get_ts_info ethtool method.
gianfar: Support the get_ts_info ethtool method.
bfin_mac: Support the get_ts_info ethtool method.
ixp4xx_eth: Support the get_ts_info ethtool method.
ethtool: Add a common function for drivers with transmit time
stamping.
ax88796: Support the get_ts_info ethtool method.
davinci_emac: Support the get_ts_info ethtool method.
dnet: Support the get_ts_info ethtool method.
etherh: Support the get_ts_info ethtool method.
fec_mpc52xx: Support the get_ts_info ethtool method.
fec: Support the get_ts_info ethtool method.
fs_enet: Support the get_ts_info ethtool method.
ll_temac: Support the get_ts_info ethtool method.
macb: Support the get_ts_info ethtool method.
mv643xx_eth: Support the get_ts_info ethtool method.
pxa168_eth: Support the get_ts_info ethtool method.
r6040: Support the get_ts_info ethtool method.
r8169: Support the get_ts_info ethtool method.
smsc911x: Support the get_ts_info ethtool method.
smsc9420: Support the get_ts_info ethtool method.
stmmac: Support the get_ts_info ethtool method.
tg3: Support the get_ts_info ethtool method.
ucc_geth: Support the get_ts_info ethtool method.
usbnet: Support the get_ts_info ethtool method.

 arch/arm/mach-ixp4xx/include/mach/ixp46x_ts.h      |    3 +
 drivers/net/ethernet/8390/ax88796.c                |    1 +
 drivers/net/ethernet/8390/etherh.c                 |    1 +
 drivers/net/ethernet/adi/bfin_mac.c                |   20 +++++++
 drivers/net/ethernet/broadcom/tg3.c                |    1 +
 drivers/net/ethernet/cadence/macb.c                |    1 +
 drivers/net/ethernet/dnet.c                        |    1 +
 drivers/net/ethernet/freescale/fec.c               |    1 +
 drivers/net/ethernet/freescale/fec_mpc52xx.c       |    1 +
 .../net/ethernet/freescale/fs_enet/fs_enet-main.c  |    1 +
 drivers/net/ethernet/freescale/gianfar.h           |    3 +
 drivers/net/ethernet/freescale/gianfar_ethtool.c   |   29 ++++++++++
 drivers/net/ethernet/freescale/gianfar_ptp.c       |    2 +
 drivers/net/ethernet/freescale/ucc_geth_ethtool.c  |    1 +
 drivers/net/ethernet/marvell/mv643xx_eth.c         |    1 +
 drivers/net/ethernet/marvell/pxa168_eth.c          |    1 +
 drivers/net/ethernet/rdc/r6040.c                   |    1 +
 drivers/net/ethernet/realtek/r8169.c               |    1 +
 drivers/net/ethernet/smsc/smsc911x.c               |    1 +
 drivers/net/ethernet/smsc/smsc9420.c               |    1 +
 .../net/ethernet/stmicro/stmmac/stmmac_ethtool.c   |    1 +
 drivers/net/ethernet/ti/davinci_emac.c             |    1 +
 drivers/net/ethernet/xilinx/ll_temac_main.c        |    1 +
 drivers/net/ethernet/xscale/ixp4xx_eth.c           |   29 ++++++++++
 drivers/net/phy/dp83640.c                          |   31 ++++++++++
 drivers/net/usb/usbnet.c                           |    1 +
 drivers/ptp/ptp_clock.c                            |    6 ++
 drivers/ptp/ptp_ixp46x.c                           |    3 +
 include/linux/ethtool.h                            |   29 ++++++++++
 include/linux/phy.h                                |    3 +
 include/linux/ptp_clock_kernel.h                   |    8 +++
 net/core/ethtool.c                                 |   59 +++++++++++++++++++-
 32 files changed, 241 insertions(+), 3 deletions(-)
Signature · 1 line
1.7.2.5