config: clock, port: convert 'boundary_clock_jbod' to the new scheme.
Signed-off-by: Richard Cochran <richardcochran@gmail.com>master
parent
eaa70f165f
commit
38c891b2c8
15
config.c
15
config.c
|
@ -93,6 +93,7 @@ struct config_item {
|
||||||
struct config_item config_tab[] = {
|
struct config_item config_tab[] = {
|
||||||
PORT_ITEM_INT("announceReceiptTimeout", 3, 2, UINT8_MAX),
|
PORT_ITEM_INT("announceReceiptTimeout", 3, 2, UINT8_MAX),
|
||||||
GLOB_ITEM_INT("assume_two_step", 0, 0, 1),
|
GLOB_ITEM_INT("assume_two_step", 0, 0, 1),
|
||||||
|
PORT_ITEM_INT("boundary_clock_jbod", 0, 0, 1),
|
||||||
GLOB_ITEM_INT("check_fup_sync", 0, 0, 1),
|
GLOB_ITEM_INT("check_fup_sync", 0, 0, 1),
|
||||||
PORT_ITEM_INT("delayAsymmetry", 0, INT_MIN, INT_MAX),
|
PORT_ITEM_INT("delayAsymmetry", 0, INT_MIN, INT_MAX),
|
||||||
PORT_ITEM_INT("delay_filter_length", 10, 1, INT_MAX),
|
PORT_ITEM_INT("delay_filter_length", 10, 1, INT_MAX),
|
||||||
|
@ -310,7 +311,6 @@ static enum parser_result parse_port_setting(struct config *cfg,
|
||||||
struct interface *iface)
|
struct interface *iface)
|
||||||
{
|
{
|
||||||
enum parser_result r;
|
enum parser_result r;
|
||||||
int val;
|
|
||||||
|
|
||||||
r = parse_pod_setting(option, value, &iface->pod);
|
r = parse_pod_setting(option, value, &iface->pod);
|
||||||
if (r != NOT_PARSED)
|
if (r != NOT_PARSED)
|
||||||
|
@ -356,12 +356,6 @@ static enum parser_result parse_port_setting(struct config *cfg,
|
||||||
else
|
else
|
||||||
return BAD_VALUE;
|
return BAD_VALUE;
|
||||||
|
|
||||||
} else if (!strcmp(option, "boundary_clock_jbod")) {
|
|
||||||
r = get_ranged_int(value, &val, 0, 1);
|
|
||||||
if (r != PARSED_OK)
|
|
||||||
return r;
|
|
||||||
iface->boundary_clock_jbod = val;
|
|
||||||
|
|
||||||
} else
|
} else
|
||||||
return parse_item(cfg, iface->name, option, value);
|
return parse_item(cfg, iface->name, option, value);
|
||||||
|
|
||||||
|
@ -606,12 +600,6 @@ static enum parser_result parse_global_setting(const char *option,
|
||||||
else
|
else
|
||||||
return BAD_VALUE;
|
return BAD_VALUE;
|
||||||
|
|
||||||
} else if (!strcmp(option, "boundary_clock_jbod")) {
|
|
||||||
r = get_ranged_int(value, &val, 0, 1);
|
|
||||||
if (r != PARSED_OK)
|
|
||||||
return r;
|
|
||||||
cfg->dds.boundary_clock_jbod = val;
|
|
||||||
|
|
||||||
} else
|
} else
|
||||||
return parse_item(cfg, NULL, option, value);
|
return parse_item(cfg, NULL, option, value);
|
||||||
|
|
||||||
|
@ -799,7 +787,6 @@ void config_init_interface(struct interface *iface, struct config *cfg)
|
||||||
sk_get_ts_info(iface->name, &iface->ts_info);
|
sk_get_ts_info(iface->name, &iface->ts_info);
|
||||||
|
|
||||||
iface->delay_filter = cfg->dds.delay_filter;
|
iface->delay_filter = cfg->dds.delay_filter;
|
||||||
iface->boundary_clock_jbod = cfg->dds.boundary_clock_jbod;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int config_init(struct config *cfg)
|
int config_init(struct config *cfg)
|
||||||
|
|
1
config.h
1
config.h
|
@ -41,7 +41,6 @@ struct interface {
|
||||||
struct sk_ts_info ts_info;
|
struct sk_ts_info ts_info;
|
||||||
enum tsproc_mode tsproc_mode;
|
enum tsproc_mode tsproc_mode;
|
||||||
enum filter_type delay_filter;
|
enum filter_type delay_filter;
|
||||||
int boundary_clock_jbod;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#define CFG_IGNORE_DM (1 << 0)
|
#define CFG_IGNORE_DM (1 << 0)
|
||||||
|
|
1
ds.h
1
ds.h
|
@ -61,7 +61,6 @@ struct default_ds {
|
||||||
struct clock_description clock_desc;
|
struct clock_description clock_desc;
|
||||||
enum tsproc_mode tsproc_mode;
|
enum tsproc_mode tsproc_mode;
|
||||||
enum filter_type delay_filter;
|
enum filter_type delay_filter;
|
||||||
int boundary_clock_jbod;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
struct dataset {
|
struct dataset {
|
||||||
|
|
4
port.c
4
port.c
|
@ -2513,14 +2513,14 @@ struct port *port_open(int phc_index,
|
||||||
memset(p, 0, sizeof(*p));
|
memset(p, 0, sizeof(*p));
|
||||||
|
|
||||||
p->phc_index = phc_index;
|
p->phc_index = phc_index;
|
||||||
p->jbod = interface->boundary_clock_jbod;
|
p->jbod = config_get_int(cfg, interface->name, "boundary_clock_jbod");
|
||||||
|
|
||||||
if (interface->transport == TRANS_UDS)
|
if (interface->transport == TRANS_UDS)
|
||||||
; /* UDS cannot have a PHC. */
|
; /* UDS cannot have a PHC. */
|
||||||
else if (!interface->ts_info.valid)
|
else if (!interface->ts_info.valid)
|
||||||
pr_warning("port %d: get_ts_info not supported", number);
|
pr_warning("port %d: get_ts_info not supported", number);
|
||||||
else if (phc_index >= 0 && phc_index != interface->ts_info.phc_index) {
|
else if (phc_index >= 0 && phc_index != interface->ts_info.phc_index) {
|
||||||
if (interface->boundary_clock_jbod) {
|
if (p->jbod) {
|
||||||
pr_warning("port %d: just a bunch of devices", number);
|
pr_warning("port %d: just a bunch of devices", number);
|
||||||
p->phc_index = interface->ts_info.phc_index;
|
p->phc_index = interface->ts_info.phc_index;
|
||||||
} else {
|
} else {
|
||||||
|
|
1
ptp4l.c
1
ptp4l.c
|
@ -74,7 +74,6 @@ static struct config cfg_settings = {
|
||||||
},
|
},
|
||||||
.tsproc_mode = TSPROC_FILTER,
|
.tsproc_mode = TSPROC_FILTER,
|
||||||
.delay_filter = FILTER_MOVING_MEDIAN,
|
.delay_filter = FILTER_MOVING_MEDIAN,
|
||||||
.boundary_clock_jbod = 0,
|
|
||||||
},
|
},
|
||||||
|
|
||||||
.timestamping = TS_HARDWARE,
|
.timestamping = TS_HARDWARE,
|
||||||
|
|
Loading…
Reference in New Issue