Add a configuration file option for the sync receive timeout.
Signed-off-by: Richard Cochran <richardcochran@gmail.com>master
parent
7eef4101c9
commit
c6e046e2a2
6
config.c
6
config.c
|
@ -95,6 +95,12 @@ static enum parser_result parse_pod_setting(const char *option,
|
||||||
return r;
|
return r;
|
||||||
pod->announceReceiptTimeout = uval;
|
pod->announceReceiptTimeout = uval;
|
||||||
|
|
||||||
|
} else if (!strcmp(option, "syncReceiptTimeout")) {
|
||||||
|
r = get_ranged_uint(value, &uval, 0, UINT8_MAX);
|
||||||
|
if (r != PARSED_OK)
|
||||||
|
return r;
|
||||||
|
pod->syncReceiptTimeout = uval;
|
||||||
|
|
||||||
} else if (!strcmp(option, "transportSpecific")) {
|
} else if (!strcmp(option, "transportSpecific")) {
|
||||||
r = get_ranged_uint(value, &uval, 0, 0x0F);
|
r = get_ranged_uint(value, &uval, 0, 0x0F);
|
||||||
if (r != PARSED_OK)
|
if (r != PARSED_OK)
|
||||||
|
|
|
@ -20,6 +20,7 @@ logSyncInterval 0
|
||||||
logMinDelayReqInterval 0
|
logMinDelayReqInterval 0
|
||||||
logMinPdelayReqInterval 0
|
logMinPdelayReqInterval 0
|
||||||
announceReceiptTimeout 3
|
announceReceiptTimeout 3
|
||||||
|
syncReceiptTimeout 0
|
||||||
delayAsymmetry 0
|
delayAsymmetry 0
|
||||||
fault_reset_interval 4
|
fault_reset_interval 4
|
||||||
neighborPropDelayThresh 20000000
|
neighborPropDelayThresh 20000000
|
||||||
|
|
1
ds.h
1
ds.h
|
@ -123,6 +123,7 @@ struct port_defaults {
|
||||||
Integer8 logMinDelayReqInterval;
|
Integer8 logMinDelayReqInterval;
|
||||||
Integer8 logMinPdelayReqInterval;
|
Integer8 logMinPdelayReqInterval;
|
||||||
UInteger8 announceReceiptTimeout;
|
UInteger8 announceReceiptTimeout;
|
||||||
|
UInteger8 syncReceiptTimeout;
|
||||||
UInteger8 transportSpecific;
|
UInteger8 transportSpecific;
|
||||||
int path_trace_enabled;
|
int path_trace_enabled;
|
||||||
int follow_up_info;
|
int follow_up_info;
|
||||||
|
|
1
gPTP.cfg
1
gPTP.cfg
|
@ -19,6 +19,7 @@ logAnnounceInterval 1
|
||||||
logSyncInterval -3
|
logSyncInterval -3
|
||||||
logMinPdelayReqInterval 0
|
logMinPdelayReqInterval 0
|
||||||
announceReceiptTimeout 3
|
announceReceiptTimeout 3
|
||||||
|
syncReceiptTimeout 3
|
||||||
delayAsymmetry 0
|
delayAsymmetry 0
|
||||||
fault_reset_interval 4
|
fault_reset_interval 4
|
||||||
neighborPropDelayThresh 800
|
neighborPropDelayThresh 800
|
||||||
|
|
1
port.c
1
port.c
|
@ -1283,6 +1283,7 @@ static int port_initialize(struct port *p)
|
||||||
p->peerMeanPathDelay = 0;
|
p->peerMeanPathDelay = 0;
|
||||||
p->logAnnounceInterval = p->pod.logAnnounceInterval;
|
p->logAnnounceInterval = p->pod.logAnnounceInterval;
|
||||||
p->announceReceiptTimeout = p->pod.announceReceiptTimeout;
|
p->announceReceiptTimeout = p->pod.announceReceiptTimeout;
|
||||||
|
p->syncReceiptTimeout = p->pod.syncReceiptTimeout;
|
||||||
p->transportSpecific = p->pod.transportSpecific;
|
p->transportSpecific = p->pod.transportSpecific;
|
||||||
p->logSyncInterval = p->pod.logSyncInterval;
|
p->logSyncInterval = p->pod.logSyncInterval;
|
||||||
p->logMinPdelayReqInterval = p->pod.logMinPdelayReqInterval;
|
p->logMinPdelayReqInterval = p->pod.logMinPdelayReqInterval;
|
||||||
|
|
7
ptp4l.8
7
ptp4l.8
|
@ -148,6 +148,13 @@ The number of missed Announce messages before the last Announce messages
|
||||||
expires.
|
expires.
|
||||||
The default is 3.
|
The default is 3.
|
||||||
.TP
|
.TP
|
||||||
|
.B syncReceiptTimeout
|
||||||
|
The number of sync/follow up messages that may go missing before
|
||||||
|
triggering a Best Master Clock election. This option is used for
|
||||||
|
running in gPTP mode according to the 802.1AS-2011 standard. Setting
|
||||||
|
this option to zero will disable the sync message timeout.
|
||||||
|
The default is 0 or disabled.
|
||||||
|
.TP
|
||||||
.B transportSpecific
|
.B transportSpecific
|
||||||
The transport specific field. Must be in the range 0 to 255.
|
The transport specific field. Must be in the range 0 to 255.
|
||||||
The default is 0.
|
The default is 0.
|
||||||
|
|
1
ptp4l.c
1
ptp4l.c
|
@ -77,6 +77,7 @@ static struct config cfg_settings = {
|
||||||
.logMinDelayReqInterval = 0,
|
.logMinDelayReqInterval = 0,
|
||||||
.logMinPdelayReqInterval = 0,
|
.logMinPdelayReqInterval = 0,
|
||||||
.announceReceiptTimeout = 3,
|
.announceReceiptTimeout = 3,
|
||||||
|
.syncReceiptTimeout = 0,
|
||||||
.transportSpecific = 0,
|
.transportSpecific = 0,
|
||||||
.path_trace_enabled = 0,
|
.path_trace_enabled = 0,
|
||||||
.follow_up_info = 0,
|
.follow_up_info = 0,
|
||||||
|
|
Loading…
Reference in New Issue