config: Add a configuration option for preventing loops in TC mode.
According to 1588, PTP message loops are simply someone else's problem with respect to transparent clocks. Since we are running the BMCA for syntonization anyway, we might as well go ahead and implement the spanning tree for PTP messages. Signed-off-by: Richard Cochran <richardcochran@gmail.com>master
parent
c8107c8d4b
commit
e6af4608c4
1
config.c
1
config.c
|
@ -254,6 +254,7 @@ struct config_item config_tab[] = {
|
|||
GLOB_ITEM_DBL("step_threshold", 0.0, 0.0, DBL_MAX),
|
||||
GLOB_ITEM_INT("summary_interval", 0, INT_MIN, INT_MAX),
|
||||
PORT_ITEM_INT("syncReceiptTimeout", 0, 0, UINT8_MAX),
|
||||
GLOB_ITEM_INT("tc_spanning_tree", 0, 1, 1),
|
||||
GLOB_ITEM_INT("timeSource", INTERNAL_OSCILLATOR, 0x10, 0xfe),
|
||||
GLOB_ITEM_ENU("time_stamping", TS_HARDWARE, timestamping_enu),
|
||||
PORT_ITEM_INT("transportSpecific", 0, 0, 0x0F),
|
||||
|
|
|
@ -40,6 +40,7 @@ path_trace_enabled 0
|
|||
follow_up_info 0
|
||||
hybrid_e2e 0
|
||||
net_sync_monitor 0
|
||||
tc_spanning_tree 0
|
||||
tx_timestamp_timeout 1
|
||||
use_syslog 1
|
||||
verbose 0
|
||||
|
|
1
port.c
1
port.c
|
@ -2830,6 +2830,7 @@ struct port *port_open(int phc_index,
|
|||
p->hybrid_e2e = config_get_int(cfg, p->name, "hybrid_e2e");
|
||||
p->net_sync_monitor = config_get_int(cfg, p->name, "net_sync_monitor");
|
||||
p->path_trace_enabled = config_get_int(cfg, p->name, "path_trace_enabled");
|
||||
p->tc_spanning_tree = config_get_int(cfg, p->name, "tc_spanning_tree");
|
||||
p->rx_timestamp_offset = config_get_int(cfg, p->name, "ingressLatency");
|
||||
p->rx_timestamp_offset <<= 16;
|
||||
p->tx_timestamp_offset = config_get_int(cfg, p->name, "egressLatency");
|
||||
|
|
6
ptp4l.8
6
ptp4l.8
|
@ -399,6 +399,12 @@ Treat one-step responses as two-step if enabled. It is used to work around
|
|||
buggy 802.1AS switches.
|
||||
The default is 0 (disabled).
|
||||
.TP
|
||||
.B tc_spanning_tree
|
||||
When running as a Transparent Clock, increment the "stepsRemoved"
|
||||
field of Announce messages that pass through the switch. Enabling
|
||||
this option ensures that PTP message loops never form, provided the
|
||||
switches all implement this option together with the BMCA.
|
||||
.TP
|
||||
.B tx_timestamp_timeout
|
||||
The number of milliseconds to poll waiting for the tx time stamp from the kernel
|
||||
when a message has recently been sent.
|
||||
|
|
Loading…
Reference in New Issue