config: port: convert 'min_neighbor_prop_delay' to the new scheme.
Signed-off-by: Richard Cochran <richardcochran@gmail.com>master
parent
7895466de1
commit
3ff0e4a589
9
config.c
9
config.c
|
@ -104,6 +104,7 @@ struct config_item config_tab[] = {
|
|||
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("max_frequency", 900000000, 0, INT_MAX),
|
||||
PORT_ITEM_INT("min_neighbor_prop_delay", -20000000, INT_MIN, -1),
|
||||
PORT_ITEM_INT("neighborPropDelayThresh", 20000000, 0, INT_MAX),
|
||||
GLOB_ITEM_INT("ntpshm_segment", 0, INT_MIN, INT_MAX),
|
||||
PORT_ITEM_INT("path_trace_enabled", 0, 0, 1),
|
||||
|
@ -272,13 +273,7 @@ static enum parser_result parse_pod_setting(const char *option,
|
|||
int val;
|
||||
enum parser_result r;
|
||||
|
||||
if (!strcmp(option, "min_neighbor_prop_delay")) {
|
||||
r = get_ranged_int(value, &val, INT_MIN, -1);
|
||||
if (r != PARSED_OK)
|
||||
return r;
|
||||
pod->min_neighbor_prop_delay = val;
|
||||
|
||||
} else if (!strcmp(option, "egressLatency")) {
|
||||
if (!strcmp(option, "egressLatency")) {
|
||||
r = get_ranged_int(value, &val, INT_MIN, INT_MAX);
|
||||
if (r != PARSED_OK)
|
||||
return r;
|
||||
|
|
1
ds.h
1
ds.h
|
@ -125,7 +125,6 @@ struct portDS {
|
|||
|
||||
struct port_defaults {
|
||||
struct fault_interval flt_interval_pertype[FT_CNT];
|
||||
int min_neighbor_prop_delay; /*nanoseconds*/
|
||||
int tx_timestamp_offset; /*nanoseconds*/
|
||||
int rx_timestamp_offset; /*nanoseconds*/
|
||||
};
|
||||
|
|
2
port.c
2
port.c
|
@ -1458,7 +1458,7 @@ static int port_initialize(struct port *p)
|
|||
p->logSyncInterval = config_get_int(cfg, p->name, "logSyncInterval");
|
||||
p->logMinPdelayReqInterval = config_get_int(cfg, p->name, "logMinPdelayReqInterval");
|
||||
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 = config_get_int(cfg, p->name, "min_neighbor_prop_delay");
|
||||
|
||||
for (i = 0; i < N_TIMER_FDS; i++) {
|
||||
fd[i] = -1;
|
||||
|
|
Loading…
Reference in New Issue