Commit Graph

66 Commits (master)

Author SHA1 Message Date
Richard Cochran a8d0eb92c6 telecom: Introduce the local priority attribute into the data set.
The Telecom Profiles G.8275.1 and G.8275.2 have invented a new
per-port and per-clock attribute, not in 1588, called "localPriority".
The use of this attribute is a distinguishing feature of the telecom
data set comparison algorithm.

This patch adds the attribute, hard coded to its default value.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2018-04-24 21:39:13 -07:00
Miroslav Lichvar 0309a880fb Update TAI-UTC offset
A leap second was applied to UTC on 2016-12-31 and the offset between
TAI and UTC is now 37 seconds.

Signed-off-by: Miroslav Lichvar <mlichvar@redhat.com>
2017-01-08 21:28:40 +01:00
Richard Cochran 9b27664cfc clock: simplify the create method.
With the new configuration API, there is no need to pass the default data
set.  Instead, the clock code can read the configuration directly.  This
patch simplifies the clock create method by removing the 'dds' parameter
and moving the code that initialized the data set into the clock module.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2016-04-03 14:45:41 +02:00
Libor Pechacek 4a875d4e3d Update UTC offset
The difference between Coordinated Universal Time UTC and the International
Atomic Time TAI is :

     from 2015 July 1, 0h UTC, until further notice : UTC-TAI = -36 s

https://hpiers.obspm.fr/iers/bul/bulc/bulletinc.dat

Signed-off-by: Libor Pechacek <lpechacek@suse.com>
2015-09-17 13:12:28 +02:00
Richard Cochran b6a91303a9 config: convert 'delay_filter' to the new scheme.
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2015-08-23 21:09:46 +02:00
Richard Cochran a8b550887d config: convert 'tsproc_mode' to the new scheme.
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2015-08-23 21:09:45 +02:00
Richard Cochran 0bb690c16c config: remove the 'port_defaults' structure.
This definition is now empty and can serve no purpose any more.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2015-08-23 21:09:45 +02:00
Richard Cochran bbd8d62bec config: convert the fault interval options to the new scheme.
This conversion is not straightforward due to the fact that these options
can take a value of "ASAP" or a number.  We check for the special ASAP
case in a helper function and leave the numbers to the generic code.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2015-08-23 21:09:45 +02:00
Richard Cochran 76f8d5eb48 config: convert 'timeSource' to the new scheme.
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2015-08-23 21:09:45 +02:00
Richard Cochran 5277396b3a config: convert 'sanity_freq_limit' to the new scheme.
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2015-08-23 21:09:45 +02:00
Richard Cochran 0aff268a4e config: convert 'kernel_leap' to the new scheme.
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2015-08-23 21:09:45 +02:00
Richard Cochran f2da3cc484 config: convert 'summary_interval' to the new scheme.
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2015-08-23 21:09:45 +02:00
Richard Cochran 2816133b5e config: convert 'gmCapable' to the new scheme.
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2015-08-23 21:09:45 +02:00
Richard Cochran 5eeea13652 config: convert 'free_running' to the new scheme.
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2015-08-23 21:09:45 +02:00
Richard Cochran 38c891b2c8 config: clock, port: convert 'boundary_clock_jbod' to the new scheme.
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2015-08-23 21:09:45 +02:00
Richard Cochran eaa70f165f config: port: convert 'delay_filter_length' to the new scheme.
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2015-08-23 21:09:45 +02:00
Richard Cochran 83e26ec68b config: port: convert 'ingressLatency' to the new scheme.
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2015-08-23 21:09:45 +02:00
Richard Cochran a19318b413 config: port: convert 'egressLatency' to the new scheme.
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2015-08-23 21:09:45 +02:00
Richard Cochran 3ff0e4a589 config: port: convert 'min_neighbor_prop_delay' to the new scheme.
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2015-08-23 21:09:45 +02:00
Richard Cochran 7895466de1 config: port: convert 'neighborPropDelayThresh' to new scheme.
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2015-08-23 21:09:45 +02:00
Richard Cochran ffa7d49df6 config: clock, port: convert 'freq_est_interval' to the new scheme.
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2015-08-23 21:09:45 +02:00
Richard Cochran becc6262cc config: port: convert 'follow_up_info' to the new scheme.
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2015-08-23 21:09:45 +02:00
Richard Cochran e1dcf8ea11 config: port: convert 'path_trace_enabled' to the new scheme.
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2015-08-23 21:09:45 +02:00
Richard Cochran 54f45063df port: change 'announce_span' into a macro.
This probably should not have been a variable in the first place.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2015-08-23 21:09:45 +02:00
Richard Cochran 8efb623f12 config: prot: convert 'transportSpecific' to the new scheme.
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2015-08-23 21:09:45 +02:00
Richard Cochran fffb6a53bd config: port: convert 'syncReceiptTimeout' to the new scheme.
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2015-08-23 21:09:45 +02:00
Richard Cochran 35227f2d1f config: port: convert 'announceReceiptTimeout' to the new scheme.
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2015-08-23 21:09:45 +02:00
Richard Cochran 639ce56fa0 config: port: convert 'logMinPdelayReqInterval' to the new scheme.
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2015-08-23 21:09:45 +02:00
Richard Cochran 0578e321fb config: port: convert 'logMinDelayReqInterval' to the new scheme.
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2015-08-23 21:09:45 +02:00
Richard Cochran 769a8d3fa6 config: port: convert 'logSyncInterval' to the new scheme.
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2015-08-23 21:09:45 +02:00
Richard Cochran 8026663c43 config: port: convert 'logAnnounceInterval' to the new scheme.
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2015-08-23 21:09:45 +02:00
Richard Cochran 95a629624f config: port: convert 'delayAsymmetry' to the new scheme.
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2015-08-23 21:09:45 +02: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
Richard Cochran d70d38ade3 config: add a option to enable a poor man's boundary clock.
This patch adds a configuration option that allows running a boundary clock
using "just a bunch of devices". Normally each port is probed to make sure
they all share the same PTP hardware clock, but this option will allow a
heterogeneous collection of devices, should the user really want it.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
Acked-by: Jiri Benc <jbenc@redhat.com>
2014-12-16 21:33:23 +01:00
Richard Cochran 53a08ec4df config: Introduce options for correcting transmit and receive delays.
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2014-12-12 21:44:56 +01:00
Delio Brignoli b2bde6f5ec config: Add min_neighbor_prop_delay configuration variable
When peer delay is < min_neighbor_prop_delay the port is flagged
as non 802.1AS capable. min_neighbor_prop_delay defaults to -20ms.

Signed-off-by: Delio Brignoli <dbrignoli@audioscience.com>
2014-02-25 14:14:01 +01:00
Richard Cochran f36af8e0c3 uds: disable the accidentally enabled announce timer.
Commit e425da2f inadvertently enabled the announce timer on the UDS port,
causing it to continually reopen the socket when in slave mode. This patch
fixes the issue by passing zero in the 'span' field of the new function,
set_tmo_random, which disables the timer again.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
Reported-by: Rohrer Hansjoerg <hj.rohrer@mobatime.com>
2014-01-08 18:59:20 +01:00
Richard Cochran bdbda10c73 Introduce the gmCapable flag for use with 802.1AS clocks.
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2013-12-01 20:32:05 +01:00
Miroslav Lichvar 85a1bcfa8e Add options to configure delay filter.
Add new options delay_filter and delay_filter_length to select the
filter and its length. They set both the clock delay filter and the port
peer delay filter. The default is now moving median with 10 samples.

Signed-off-by: Miroslav Lichvar <mlichvar@redhat.com>
2013-10-30 21:54:07 +01:00
Miroslav Lichvar ed379b4028 Add clock sanity check.
Check the sanity of the synchronized clock by comparing its uncorrected
frequency with the system monotonic clock. When the measured frequency
offset is larger than the value of the sanity_freq_limit option (20% by
default), a warning message will be printed and the servo will be reset.
Setting the option to zero disables the check.

This is useful to detect when the clock is broken or adjusted by another
program.

Signed-off-by: Miroslav Lichvar <mlichvar@redhat.com>
2013-10-27 08:24:01 +01:00
Richard Cochran c6e046e2a2 Add a configuration file option for the sync receive timeout.
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2013-08-26 18:30:54 +02:00
Richard Cochran 4782d669c2 Add a clock variable to hold the value of the time source.
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2013-07-07 18:55:45 +02:00
Richard Cochran bd28acffb3 Merge branch 'mlichvar_leap'
Fixed up trivial conflict in the makefile.

Conflicts:
	makefile
2013-03-20 19:51:46 +01:00
Miroslav Lichvar 4e24248a71 Add options to not apply leap seconds in kernel.
Add kernel_leap option for ptp4l and -x option for phc2sys to disable
setting of the STA_INS/STA_DEL bit to slowly correct the one-second
offset by servo.

Signed-off-by: Miroslav Lichvar <mlichvar@redhat.com>
2013-03-20 19:37:40 +01:00
Delio Brignoli b936d35b6d Add support for multiple fault types
Signed-off-by: Delio Brignoli <dbrignoli@audioscience.com>
2013-03-20 19:10:22 +01:00
Delio Brignoli 4626487ff3 Implement neighborPropDelayThresh check in port_capable()
Signed-off-by: Delio Brignoli <dbrignoli@audioscience.com>
2013-03-14 05:17:38 +01:00
Richard Cochran 1ce90fe160 Reduce the arguments to clock_create.
New clock options should go into 'struct default_ds' so that we can avoid
growing clock_create indefinitely.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2013-02-09 10:45:30 +01:00
Geoff Salmon 09c2d1a652 adds clock description
Adds struct containing clock description info that will be needed for
USER_DESCRIPTION and CLOCK_DESCRIPTION management messages.

Signed-off-by: Geoff Salmon <gsalmon@se-instruments.com>
2013-02-04 12:22:11 +01:00
Delio Brignoli da594e78d9 Make the fault reset interval a per-port configuration parameter.
A timeout of 15 seconds is not always acceptable, make it configurable.

By popular consensus, instead of using a linear number of seconds, use
the 2^N format for the time interval, just like the other intervals in
the PTP data sets. In addition to numeric values, let the configuration
file support 'ASAP' to have the fault reset immediately.

[RC - moved the handling of special case tmo=0 and added a break out
      of the fd event loop in case the fds have been closed.
    - changed the linear seconds option to log second instead.
    - changed the commit message to reflect the final version. ]

Signed-off-by: Delio Brignoli <dbrignoli@audioscience.com>
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2013-02-03 17:53:33 +01:00
Richard Cochran b810153ed5 Add asymmetry correction.
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
Acked-by: Jacob Keller <Jacob.e.keller@intel.com>
2012-12-11 14:36:30 +01:00