Richard Cochran
2014-12-06 21:59:18 UTC
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(-)
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
1.7.10.4