All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next v3 0/4] Improve phc2sys precision for mv88e6xxx switch in combination with imx6-fec
@ 2019-08-20  8:48 Hubert Feurstein
  2019-08-20  8:48 ` [PATCH net-next v3 1/4] net: mdio: add support for passing a PTP system timestamp to the mii_bus driver Hubert Feurstein
                   ` (4 more replies)
  0 siblings, 5 replies; 18+ messages in thread
From: Hubert Feurstein @ 2019-08-20  8:48 UTC (permalink / raw)
  To: netdev, linux-kernel
  Cc: Hubert Feurstein, Andrew Lunn, Richard Cochran, Miroslav Lichvar,
	Vivien Didelot, Florian Fainelli, Heiner Kallweit,
	Vladimir Oltean, Fugang Duan, David S. Miller

From: Hubert Feurstein <h.feurstein@gmail.com>

Changelog:
 v3: mv88e6xxx_smi_indirect_write: forward ptp_sts only on the last write
     Copied Miroslav Lichvar because of PTP offset compensation patch
 v2: Added patch for PTP offset compensation
     Removed mdiobus_write_sts as there was no user
     Removed ptp_sts_supported-boolean and introduced flags instead

With this patchset the phc2sys synchronisation precision improved to +/-555ns on
an IMX6DL with an MV88E6220 switch attached.

This patchset takes into account the comments from the following discussions:
- https://lkml.org/lkml/2019/8/2/1364
- https://lkml.org/lkml/2019/8/5/169

Patch 01 adds the required infrastructure in the MDIO layer.
Patch 02 adds additional PTP offset compensation.
Patch 03 adds support for the PTP_SYS_OFFSET_EXTENDED ioctl in the mv88e6xxx driver.
Patch 04 adds support for the PTP system timestamping in the imx-fec driver.

The following tests show the improvement caused by each patch. The system clock 
precision was set to 15ns instead of 333ns (as described in https://lkml.org/lkml/2019/8/2/1364).

Without this patchset applied, the phc2sys synchronisation performance was very 
poor:

  offset: min -27120 max 28840 mean 2.44 stddev 8040.78 count 1236
  delay:  min 282103 max 386385 mean 352568.03 stddev 27814.27 count 1236
  (test runtime 20 minutes)

Results after appling patch 01-03:

  offset: min -12316 max 13314 mean -9.38 stddev 4274.82 count 1022
  delay:  min 69977 max 96266 mean 87939.04 stddev 6466.17 count 1022
  (test runtime 16 minutes)

Results after appling patch 04:

  offset: min -788 max 528 mean -0.06 stddev 185.02 count 7171
  delay:  min 1773 max 2031 mean 1909.43 stddev 33.74 count 7171
  (test runtime 119 minutes)

Hubert Feurstein (4):
  net: mdio: add support for passing a PTP system timestamp to the
    mii_bus driver
  net: mdio: add PTP offset compensation to mdiobus_write_sts
  net: dsa: mv88e6xxx: extend PTP gettime function to read system clock
  net: fec: add support for PTP system timestamping for MDIO devices

 drivers/net/dsa/mv88e6xxx/chip.h          |  2 +
 drivers/net/dsa/mv88e6xxx/ptp.c           | 11 +--
 drivers/net/dsa/mv88e6xxx/smi.c           |  7 +-
 drivers/net/ethernet/freescale/fec_main.c |  7 +-
 drivers/net/phy/mdio_bus.c                | 88 +++++++++++++++++++++++
 include/linux/mdio.h                      |  5 ++
 include/linux/phy.h                       | 42 +++++++++++
 7 files changed, 156 insertions(+), 6 deletions(-)

-- 
2.22.1


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

end of thread, other threads:[~2019-08-22  3:49 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-20  8:48 [PATCH net-next v3 0/4] Improve phc2sys precision for mv88e6xxx switch in combination with imx6-fec Hubert Feurstein
2019-08-20  8:48 ` [PATCH net-next v3 1/4] net: mdio: add support for passing a PTP system timestamp to the mii_bus driver Hubert Feurstein
2019-08-20  8:48 ` [PATCH net-next v3 2/4] net: mdio: add PTP offset compensation to mdiobus_write_sts Hubert Feurstein
2019-08-20  9:49   ` Miroslav Lichvar
2019-08-20 12:29     ` Hubert Feurstein
2019-08-20 14:25       ` Miroslav Lichvar
2019-08-20 15:23         ` Andrew Lunn
2019-08-20 15:40           ` Miroslav Lichvar
2019-08-20 16:56             ` Hubert Feurstein
2019-08-21  8:07               ` Miroslav Lichvar
2019-08-21  9:53                 ` Hubert Feurstein
2019-08-21 10:19                   ` Vladimir Oltean
2019-08-21 10:19                   ` Miroslav Lichvar
2019-08-20 13:26     ` Andrew Lunn
2019-08-20  8:48 ` [PATCH net-next v3 3/4] net: dsa: mv88e6xxx: extend PTP gettime function to read system clock Hubert Feurstein
2019-08-20  8:48 ` [PATCH net-next v3 4/4] net: fec: add support for PTP system timestamping for MDIO devices Hubert Feurstein
2019-08-21 10:28   ` Vladimir Oltean
2019-08-22  3:49 ` [PATCH net-next v3 0/4] Improve phc2sys precision for mv88e6xxx switch in combination with imx6-fec David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.