config: port: convert 'neighborPropDelayThresh' to new scheme.
Signed-off-by: Richard Cochran <richardcochran@gmail.com>master
parent
ffa7d49df6
commit
7895466de1
11
config.c
11
config.c
|
@ -104,6 +104,7 @@ struct config_item config_tab[] = {
|
||||||
PORT_ITEM_INT("logSyncInterval", 0, INT8_MIN, INT8_MAX),
|
PORT_ITEM_INT("logSyncInterval", 0, INT8_MIN, INT8_MAX),
|
||||||
GLOB_ITEM_INT("logging_level", LOG_INFO, PRINT_LEVEL_MIN, PRINT_LEVEL_MAX),
|
GLOB_ITEM_INT("logging_level", LOG_INFO, PRINT_LEVEL_MIN, PRINT_LEVEL_MAX),
|
||||||
GLOB_ITEM_INT("max_frequency", 900000000, 0, INT_MAX),
|
GLOB_ITEM_INT("max_frequency", 900000000, 0, INT_MAX),
|
||||||
|
PORT_ITEM_INT("neighborPropDelayThresh", 20000000, 0, INT_MAX),
|
||||||
GLOB_ITEM_INT("ntpshm_segment", 0, INT_MIN, INT_MAX),
|
GLOB_ITEM_INT("ntpshm_segment", 0, INT_MIN, INT_MAX),
|
||||||
PORT_ITEM_INT("path_trace_enabled", 0, 0, 1),
|
PORT_ITEM_INT("path_trace_enabled", 0, 0, 1),
|
||||||
GLOB_ITEM_DBL("pi_integral_const", 0.0, 0.0, DBL_MAX),
|
GLOB_ITEM_DBL("pi_integral_const", 0.0, 0.0, DBL_MAX),
|
||||||
|
@ -269,17 +270,9 @@ static enum parser_result parse_pod_setting(const char *option,
|
||||||
struct port_defaults *pod)
|
struct port_defaults *pod)
|
||||||
{
|
{
|
||||||
int val;
|
int val;
|
||||||
unsigned int uval;
|
|
||||||
|
|
||||||
enum parser_result r;
|
enum parser_result r;
|
||||||
|
|
||||||
if (!strcmp(option, "neighborPropDelayThresh")) {
|
if (!strcmp(option, "min_neighbor_prop_delay")) {
|
||||||
r = get_ranged_uint(value, &uval, 0, UINT32_MAX);
|
|
||||||
if (r != PARSED_OK)
|
|
||||||
return r;
|
|
||||||
pod->neighborPropDelayThresh = uval;
|
|
||||||
|
|
||||||
} else if (!strcmp(option, "min_neighbor_prop_delay")) {
|
|
||||||
r = get_ranged_int(value, &val, INT_MIN, -1);
|
r = get_ranged_int(value, &val, INT_MIN, -1);
|
||||||
if (r != PARSED_OK)
|
if (r != PARSED_OK)
|
||||||
return r;
|
return r;
|
||||||
|
|
1
ds.h
1
ds.h
|
@ -125,7 +125,6 @@ struct portDS {
|
||||||
|
|
||||||
struct port_defaults {
|
struct port_defaults {
|
||||||
struct fault_interval flt_interval_pertype[FT_CNT];
|
struct fault_interval flt_interval_pertype[FT_CNT];
|
||||||
UInteger32 neighborPropDelayThresh; /*nanoseconds*/
|
|
||||||
int min_neighbor_prop_delay; /*nanoseconds*/
|
int min_neighbor_prop_delay; /*nanoseconds*/
|
||||||
int tx_timestamp_offset; /*nanoseconds*/
|
int tx_timestamp_offset; /*nanoseconds*/
|
||||||
int rx_timestamp_offset; /*nanoseconds*/
|
int rx_timestamp_offset; /*nanoseconds*/
|
||||||
|
|
2
port.c
2
port.c
|
@ -1457,7 +1457,7 @@ static int port_initialize(struct port *p)
|
||||||
p->transportSpecific <<= 4;
|
p->transportSpecific <<= 4;
|
||||||
p->logSyncInterval = config_get_int(cfg, p->name, "logSyncInterval");
|
p->logSyncInterval = config_get_int(cfg, p->name, "logSyncInterval");
|
||||||
p->logMinPdelayReqInterval = config_get_int(cfg, p->name, "logMinPdelayReqInterval");
|
p->logMinPdelayReqInterval = config_get_int(cfg, p->name, "logMinPdelayReqInterval");
|
||||||
p->neighborPropDelayThresh = p->pod.neighborPropDelayThresh;
|
p->neighborPropDelayThresh = config_get_int(cfg, p->name, "neighborPropDelayThresh");
|
||||||
p->min_neighbor_prop_delay = p->pod.min_neighbor_prop_delay;
|
p->min_neighbor_prop_delay = p->pod.min_neighbor_prop_delay;
|
||||||
|
|
||||||
for (i = 0; i < N_TIMER_FDS; i++) {
|
for (i = 0; i < N_TIMER_FDS; i++) {
|
||||||
|
|
3
ptp4l.c
3
ptp4l.c
|
@ -79,9 +79,6 @@ static struct config cfg_settings = {
|
||||||
},
|
},
|
||||||
|
|
||||||
.pod = {
|
.pod = {
|
||||||
/* Default to very a large neighborPropDelay threshold */
|
|
||||||
.neighborPropDelayThresh = 20000000,
|
|
||||||
.min_neighbor_prop_delay = -20000000,
|
|
||||||
.tx_timestamp_offset = 0,
|
.tx_timestamp_offset = 0,
|
||||||
.rx_timestamp_offset = 0,
|
.rx_timestamp_offset = 0,
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue