> -----Original Message-----
> From: Richard Cochran [mailto:richardcoch...@gmail.com]
> Sent: Friday, April 20, 2018 10:22 PM
> To: linuxptp-devel@lists.sourceforge.net
> Subject: [Linuxptp-devel] [PATCH V2 6/8] 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.
> 

Do we already get this implementation for free? It seems weird to see that we 
can set the config option, but I don't see how we actually implement it in this 
patch? We set the tc_spanning_tree port variable? Is it actually implemented in 
the patches to add the two TC implementations?

Thanks,
Jake

> Signed-off-by: Richard Cochran <richardcoch...@gmail.com>
> ---
>  config.c    | 1 +
>  default.cfg | 1 +
>  port.c      | 1 +
>  ptp4l.8     | 6 ++++++
>  4 files changed, 9 insertions(+)
> 
> diff --git a/config.c b/config.c
> index e751d40..748529d 100644
> --- a/config.c
> +++ b/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),
> diff --git a/default.cfg b/default.cfg
> index 142675d..456a995 100644
> --- a/default.cfg
> +++ b/default.cfg
> @@ -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
> diff --git a/port.c b/port.c
> index e83f44a..23c1f13 100644
> --- a/port.c
> +++ b/port.c
> @@ -2834,6 +2834,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");
> diff --git a/ptp4l.8 b/ptp4l.8
> index 83549a8..0a35db2 100644
> --- a/ptp4l.8
> +++ b/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.
> --
> 2.11.0
> 
> 
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Linuxptp-devel mailing list
> Linuxptp-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/linuxptp-devel

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Linuxptp-devel mailing list
Linuxptp-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxptp-devel

Reply via email to