Add a configuration file option for the extra sync-fup check.
Signed-off-by: Richard Cochran <richardcochran@gmail.com>master
parent
7b7e046e91
commit
b7ebfab0cc
6
config.c
6
config.c
|
@ -301,6 +301,12 @@ static enum parser_result parse_global_setting(const char *option,
|
||||||
return r;
|
return r;
|
||||||
*cfg->tx_timestamp_timeout = val;
|
*cfg->tx_timestamp_timeout = val;
|
||||||
|
|
||||||
|
} else if (!strcmp(option, "check_fup_sync")) {
|
||||||
|
r = get_ranged_int(value, &val, 0, 1);
|
||||||
|
if (r != PARSED_OK)
|
||||||
|
return r;
|
||||||
|
*cfg->check_fup_sync = val;
|
||||||
|
|
||||||
} else if (!strcmp(option, "pi_proportional_const")) {
|
} else if (!strcmp(option, "pi_proportional_const")) {
|
||||||
r = get_ranged_double(value, &df, 0.0, DBL_MAX);
|
r = get_ranged_double(value, &df, 0.0, DBL_MAX);
|
||||||
if (r != PARSED_OK)
|
if (r != PARSED_OK)
|
||||||
|
|
1
config.h
1
config.h
|
@ -70,6 +70,7 @@ struct config {
|
||||||
struct port_defaults pod;
|
struct port_defaults pod;
|
||||||
int *assume_two_step;
|
int *assume_two_step;
|
||||||
int *tx_timestamp_timeout;
|
int *tx_timestamp_timeout;
|
||||||
|
int *check_fup_sync;
|
||||||
|
|
||||||
enum servo_type clock_servo;
|
enum servo_type clock_servo;
|
||||||
|
|
||||||
|
|
|
@ -36,6 +36,7 @@ use_syslog 1
|
||||||
verbose 0
|
verbose 0
|
||||||
summary_interval 0
|
summary_interval 0
|
||||||
kernel_leap 1
|
kernel_leap 1
|
||||||
|
check_fup_sync 0
|
||||||
#
|
#
|
||||||
# Servo Options
|
# Servo Options
|
||||||
#
|
#
|
||||||
|
|
1
gPTP.cfg
1
gPTP.cfg
|
@ -35,6 +35,7 @@ use_syslog 1
|
||||||
verbose 0
|
verbose 0
|
||||||
summary_interval 0
|
summary_interval 0
|
||||||
kernel_leap 1
|
kernel_leap 1
|
||||||
|
check_fup_sync 0
|
||||||
#
|
#
|
||||||
# Servo options
|
# Servo options
|
||||||
#
|
#
|
||||||
|
|
12
ptp4l.8
12
ptp4l.8
|
@ -255,6 +255,18 @@ The number of milliseconds to poll waiting for the tx time stamp from the kernel
|
||||||
when a message has recently been sent.
|
when a message has recently been sent.
|
||||||
The default is 1.
|
The default is 1.
|
||||||
.TP
|
.TP
|
||||||
|
.B check_fup_sync
|
||||||
|
Because of packet reordering that can occur in the network, in the
|
||||||
|
hardware, or in the networking stack, a follow up message can appear
|
||||||
|
to arrive in the application before the matching sync message. As this
|
||||||
|
is a normal occurrence, and the sequenceID message field ensures
|
||||||
|
proper matching, the ptp4l program accepts out of order packets. This
|
||||||
|
option adds an additional check using the software time stamps from
|
||||||
|
the networking stack to verify that the sync message did arrive
|
||||||
|
first. This option is only useful if you do not trust the sequence IDs
|
||||||
|
generated by the master.
|
||||||
|
The default is 0 (disabled).
|
||||||
|
.TP
|
||||||
.B clock_servo
|
.B clock_servo
|
||||||
The servo which is used to synchronize the local clock. Currently only one
|
The servo which is used to synchronize the local clock. Currently only one
|
||||||
servo is implemented, a PI controller.
|
servo is implemented, a PI controller.
|
||||||
|
|
1
ptp4l.c
1
ptp4l.c
|
@ -92,6 +92,7 @@ static struct config cfg_settings = {
|
||||||
|
|
||||||
.assume_two_step = &assume_two_step,
|
.assume_two_step = &assume_two_step,
|
||||||
.tx_timestamp_timeout = &sk_tx_timeout,
|
.tx_timestamp_timeout = &sk_tx_timeout,
|
||||||
|
.check_fup_sync = &sk_check_fupsync,
|
||||||
|
|
||||||
.clock_servo = CLOCK_SERVO_PI,
|
.clock_servo = CLOCK_SERVO_PI,
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue