On Tue, Dec 01, 2020 at 05:14:38PM +0100, Volodymyr Bendiuga wrote:
> From: Volodymyr Bendiuga <volodymyr.bendi...@westermo.se>
> 
> This tiny patch provides generic solution for 1-step
> E2E & P2P Transparent Clocks.

The small code change (or something like it) would be fine, but there
is a larger issue that you need to address, first.
 
> Before revealing any further details, I want to state
> in plain words that changes brought about in this patch
> will only work for HW that is compliant with IEEE 1588 V2
> standard, with regard to Transparent Clock and 1-step
> operation. That is to say, HW that is capable of updating
> correction field on-the-fly, for the following packets:
>       1. SYNC

So what HW actually does this?  I just looked...

Only one driver implements HWTSTAMP_TX_ONESTEP_P2P, namely
drivers/ptp/ptp_ines.c.  It have this HW for testing.  That one
updates the originTimestamp of Sync messages, IIRC.

These are the drivers that implement HWTSTAMP_TX_ONESTEP_SYNC.

- drivers/net/ethernet/cadence/macb_main.c
- drivers/net/ethernet/freescale/dpaa2/
- drivers/net/ethernet/microchip/lan743x_ptp.c
- drivers/net/ethernet/mscc/ocelot.c
- drivers/net/phy/dp83640.c
- drivers/net/phy/mscc/mscc_ptp.c

Of these, I only have the dp83640 available for testing.  That one
updates the originTimestamp.

What do the others do?

It appears that ocelot *can* update the correction field,

        case HWTSTAMP_TX_ONESTEP_SYNC
                /* IFH_REW_OP_ONE_STEP_PTP updates the correctional field, we
                 * need to update the origin time.
                 */
                ocelot_port->ptp_cmd = IFH_REW_OP_ORIGIN_PTP;

but does it clobber the correction field or accumulate?  It is an
important difference!

So what HW will support this new TC 1-step Sync?  None at all, AFAICT.

If you want to support 1-step TC, then you are going to have to do
some background work:

- Expand the kernel driver interface to make it clear that a given HW
  performs correctionField accumulation.

- Advertise that via ethtool get_ts_info.

- Get a driver merged that implements this.

- Expand ptp4l's time_stamping option to make use of the new feature.

Thanks,
Richard






_______________________________________________
Linuxptp-devel mailing list
Linuxptp-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxptp-devel

Reply via email to