Hello Richard,

We implemented this correction in our driver using a private IOCTL and it would 
have been nice to have used some standardised interface instead. However, I 
think timestamp correction belongs in the PHY’s driver (or whatever is doing 
the times-tamping). Data sheets report expected delays so defaults can be 
automatic and the corrections can be changed automatically according to 
link-speed for instance. There should also be a standardised mechanism to 
update correction offsets at runtime as a fallback mechanism when defaults are 
not good enough.

Having said that, having TX/RX timestamps correction also in linuxptp is a good 
idea! My comments: 
(1) In some cases is not acceptable to restart linuxptp, so being able to 
change the correction at runtime would be useful. This could be added later.
(2) For some reason I would prefer (but not strongly) adding a signed 
correction offset in both the egress and ingress directions instead of adding 
in one direction and subtracting in the other.

Thanks
--
Delio

On 06 Dec 2014, at 22:59, Richard Cochran <richardcoch...@gmail.com> wrote:

> Most (or all?) hardware provides time stamps that are offset from the
> actual point at the reference plane. The amount of delay is asymmetrical
> between ingress and egress, and depending on the particular technology,
> MAC or PHY, and link speed, there can be jitter in the delay.
> 
> Sometimes the manufacturer specifies the amount of expected delay. This
> patch series provides a way for the user to correct the delays based on
> values from the data sheet or based on empirical data.
> 
> In theory one could place the sum of the correction factors into the
> delayAsymmetry field. However, the standard specifies that the slave
> applies this correction field, and never the master. Having these two
> new correction fields allows each node to compensate for its own part
> of the offset error.
> 
> This series was tested with an i210 paired with a dp83640 using a short
> cable. These devices have their delay values listed in the data sheet.
> PPS signals in both directions showed a remaining offset of about 120
> nanoseconds, which matches the sum of uncertainties (40 and 80) given
> for the i210 card at the 100 MBit link speed.
> 
> Comments are welcome.
> 
> Thanks,
> Richard
> 
> Richard Cochran (4):
>  Introduce a helper function to identify valid (non-zero) time stamps.
>  Invoke the clock check even if the time stamp nanoseconds field is
>    zero.
>  config: Introduce options for correcting transmit and receive delays.
>  port: correct transmit and receive time stamps for their calibrated
>    delays.
> 
> config.c    |   12 ++++++++++++
> default.cfg |    2 ++
> ds.h        |    2 ++
> gPTP.cfg    |    2 ++
> msg.c       |    2 +-
> msg.h       |   10 ++++++++++
> port.c      |   35 ++++++++++++++++++++++++++++++++---
> ptp4l.8     |   12 ++++++++++++
> ptp4l.c     |    2 ++
> 9 files changed, 75 insertions(+), 4 deletions(-)
> 
> -- 
> 1.7.10.4
> 
> 
> ------------------------------------------------------------------------------
> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
> from Actuate! Instantly Supercharge Your Business Reports and Dashboards
> with Interactivity, Sharing, Native Excel Exports, App Integration & more
> Get technology previously reserved for billion-dollar corporations, FREE
> http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
> _______________________________________________
> Linuxptp-devel mailing list
> Linuxptp-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/linuxptp-devel




------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
_______________________________________________
Linuxptp-devel mailing list
Linuxptp-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxptp-devel

Reply via email to