Commit Graph

139 Commits (bbd8d62bec9efadec92ce191a5bf251f47586446)

Author SHA1 Message Date
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 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 4c9c447429 config: convert 'ntpshm_segment' to the new scheme.
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2015-08-23 21:09:45 +02:00
Richard Cochran 177a7104d5 config: convert 'pi_integral_norm_max' to the new scheme.
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2015-08-23 21:09:45 +02:00
Richard Cochran 85c358ebe0 config: convert 'pi_integral_exponent' to the new scheme.
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2015-08-23 21:09:45 +02:00
Richard Cochran 7533336234 config: convert 'pi_integral_scale' to the new scheme.
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2015-08-23 21:09:45 +02:00
Richard Cochran b57840cef9 config: convert 'pi_proportional_norm_max' to the new scheme.
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2015-08-23 21:09:45 +02:00
Richard Cochran d48c8ce8a5 config: convert 'pi_proportional_exponent' to the new scheme.
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2015-08-23 21:09:45 +02:00
Richard Cochran 94048a2947 config: convert 'pi_proportional_scale' to the new scheme.
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2015-08-23 21:09:45 +02:00
Richard Cochran 07b229907d config: convert 'pi_integral_const' to the new scheme.
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2015-08-23 21:09:45 +02:00
Richard Cochran 25c903b0d2 config: convert 'pi_proportional_const' to the new scheme.
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2015-08-23 21:09:45 +02:00
Richard Cochran a7db9bad37 config: convert 'verbose' to the new scheme.
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2015-08-23 21:09:45 +02:00
Richard Cochran f5f77b182c config: convert 'use_syslog' to the new scheme.
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2015-08-23 21:09:45 +02:00
Richard Cochran caaf72c5ec config: convert 'logging_level' to the new scheme.
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2015-08-23 21:09:45 +02:00
Richard Cochran e8a2956ce0 config: convert the 'max_frequency' option to the new scheme.
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2015-08-23 21:09:45 +02:00
Richard Cochran 4f649b1ec4 config: convert the 'first_step_threshold' option to the new scheme.
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2015-08-23 21:09:45 +02:00
Richard Cochran df578135d3 config: convert the 'step_threshold' option to the new scheme.
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2015-08-23 21:09:45 +02:00
Richard Cochran a4329f7873 config: convert the 'check_fup_sync' option to the new scheme.
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2015-08-23 21:09:45 +02:00
Richard Cochran 42dda4d2b7 config: convert 'tx_timestamp_timeout' to the new scheme.
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2015-08-23 21:09:45 +02:00
Richard Cochran 85bbf9d919 config: convert the 'assume_two_step' option to the new scheme.
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2015-08-23 21:09:45 +02:00
Richard Cochran e7dbc068f6 config: introduce a new API for reading configuration settings.
This patch introduces generic code for adding and parsing new options.
The public 'get' methods return option values directly.  Although the
API is easy to use, it does not provide error checking in case the
option does not exist or if there is a type mismatch.

Therefore the code performs a BIST to ensure that the options are
properly populated.  In addition, the code terminates the program in
case of missing options or type mismatches.  This heavy handed
approach is meant to catch errors during development and should never
trigger during normal usage.

As a first element, we include an option for specifying the UDP TTL.

Users are required to call 'config_init', and so this patch add that into
all three programs, ptp4l, phc2sys and pmc.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2015-08-23 21:09:19 +02:00
Richard Cochran 1579b7893b clock: store the configuration in the clock data structure.
This will help us to simplify the passing of parameters between the main
program. clock, and ports.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2015-08-16 11:20:23 +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
Richard Cochran e5f20ea6df Merge Jiri's Dynamic port allocation series. 2014-09-21 19:40:49 +02:00
Jiri Benc 5e0196d647 Dynamic allocation of interface config entries
Remove the limit of MAX_PORTS ports also when parsing command line
arguments.

Signed-off-by: Jiri Benc <jbenc@redhat.com>
2014-09-21 13:15:59 +02:00
Miroslav Lichvar ca637b2067 Move signal handling to util.c.
This will be useful in phc2sys and pmc.

Signed-off-by: Miroslav Lichvar <mlichvar@redhat.com>
2014-09-21 12:34:05 +02:00
Miroslav Lichvar 93b7807aad Disable clockcheck and kernel leap with ntpshm servo.
Always disable the clock sanity check when the ntpshm servo is used,
because it doesn't know when or how is the clock adjusted. Disable also
the kernel leap option as the process controlling the clock is
responsible for setting the kernel flag.

Signed-off-by: Miroslav Lichvar <mlichvar@redhat.com>
2014-06-22 09:30:31 +02:00