> -----Original Message-----
> From: Miroslav Lichvar <mlich...@redhat.com>
> Sent: Wednesday, May 26, 2021 1:24 AM
> To: linuxptp-devel@lists.sourceforge.net
> Subject: [Linuxptp-devel] [PATCH v2 3/3] port: Don't check timestamps from 
> non-
> slave ports.
> 
> Don't perform the sanity check on receive timestamps from ports in
> non-slave states to avoid false positives in the jbod mode, where
> the timestamps can be generated by different clocks.
> 

Makes sense.

Reviewed-by: Jacob Keller <jacob.e.kel...@intel.com>

> Reported-by: Amar Subramanyam <asubraman...@altiostar.com>
> Signed-off-by: Miroslav Lichvar <mlich...@redhat.com>
> ---
>  port.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/port.c b/port.c
> index 10bb9e1..fb420fb 100644
> --- a/port.c
> +++ b/port.c
> @@ -2744,7 +2744,10 @@ static enum fsm_event bc_event(struct port *p, int
> fd_index)
>       }
>       if (msg_sots_valid(msg)) {
>               ts_add(&msg->hwts.ts, -p->rx_timestamp_offset);
> -             clock_check_ts(p->clock, tmv_to_nanoseconds(msg->hwts.ts));
> +             if (p->state == PS_SLAVE) {
> +                     clock_check_ts(p->clock,
> +                                    tmv_to_nanoseconds(msg->hwts.ts));
> +             }
>       }
> 
>       switch (msg_type(msg)) {
> --
> 2.26.3
> 
> 
> 
> _______________________________________________
> Linuxptp-devel mailing list
> Linuxptp-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/linuxptp-devel


_______________________________________________
Linuxptp-devel mailing list
Linuxptp-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxptp-devel

Reply via email to