Commit Graph

4 Commits (1de59d62266a5770a3789faece251eda46a495ff)

Author SHA1 Message Date
Richard Cochran 3f2ef92052 tsproc: Fix time stamp handling with P2P one shot mode.
When the P2P link partner is using one shot mode, the residence time
in the peer (t3 - t2) is reflected in the correction field of the
peer delay response message, and t2 and t3 are both zero.

The function port_peer_delay() calls clock_peer_delay(), passing in
the zero valued 't2' to the 'rx' argument.  The latter function then
stores the zero value in the 't4' field of the clock's tsproc
instance.

As a result, tsproc_update_offset() returns an error to
clock_synchronize(), and so a slave clock will never leave the
"uncalibrated" state.

This patch fixes the issue by removing the test for a non-zero 't4'
field within the tsproc.

Acked-by: Miroslav Lichvar <mlichvar@redhat.com>
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2016-04-03 13:33:10 +02:00
Miroslav Lichvar 999c86f4a9 tsproc: allow zero remote timestamps in delay update
When remote timestamps from P2P delay measurement are not known (the
remote processing time is saved in the correction field), they are set
to zero. Fix tsproc to not require non-zero t1 and t4.

Signed-off-by: Miroslav Lichvar <mlichvar@redhat.com>
2015-11-20 20:00:37 +01:00
Miroslav Lichvar 06fcfe123c tsproc: add raw and weighting modes.
Add new time stamp processing modes to return raw delay and offset based
on the raw delay instead of the long-term filtered delay, and to return
also a weight of the sample. The weight is set to the ratio between the
two delays. This gives smaller weight to samples where the sync and/or
delay messages were delayed significantly in the network and possibly
include a large error.

Signed-off-by: Miroslav Lichvar <mlichvar@redhat.com>
2015-03-27 10:58:04 +01:00
Miroslav Lichvar c452e862dd Refactor time stamp processing.
Introduce a time stamp processor for offset/delay calculations and use
it in the clock and port modules.

Signed-off-by: Miroslav Lichvar <mlichvar@redhat.com>
2015-03-27 10:58:04 +01:00