[Linuxptp-devel] [PATCH v3 2/5] clock: Reset clock check on best clock/port change.

2021-05-31 Thread Miroslav Lichvar
Reset the clock check when the best clock or port changes, together with the other state like current estimated delay and frequency. This avoids false positives if the clock is controlled by an external process when not synchronized by PTP (e.g. phc2sys -rr). Reviewed-by: Jacob Keller

[Linuxptp-devel] [PATCH v3 3/5] port: Don't check timestamps from non-slave ports.

2021-05-31 Thread Miroslav Lichvar
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. Reviewed-by: Jacob Keller Signed-off-by: Miroslav Lichvar --- port.c | 5 - 1 file changed, 4

[Linuxptp-devel] [PATCH v3 5/5] clockcheck: Increase minimum interval.

2021-05-31 Thread Miroslav Lichvar
Increase the minimum check interval to 1 second to measure the frequency offset more accurately and with default configuration make false positives less likely due to a heavily overloaded system. Signed-off-by: Miroslav Lichvar --- clockcheck.c | 2 +- 1 file changed, 1 insertion(+), 1

[Linuxptp-devel] [PATCH v3 4/5] port: Don't renew raw transport.

2021-05-31 Thread Miroslav Lichvar
Renewing of the transport on announce/sync timeout is needed in the client-only mode to avoid getting stuck with a broken multicast socket when the link goes down. This shouldn't be necessary with the raw transport. Closing and binding of raw sockets can apparently be so slow that it triggers a

[Linuxptp-devel] [PATCH v3 0/5] Fixes for sanity clock check

2021-05-31 Thread Miroslav Lichvar
v3 - added patch to avoid slow renewal of raw sockets - added patch to increase the minimum check interval v2 - improved commit message - added missing NULL check These patches make the clock check more reliable in several different cases. The first patch is not strictly related to the clock

[Linuxptp-devel] [PATCH v3 1/5] clock: Reset state when switching port with same best clock.

2021-05-31 Thread Miroslav Lichvar
When the best port is changed, but the ID of the best clock doesn't change (e.g. a passive port is activated on link failure), reset the current delay and other master/link-specific state to avoid the switch throwing the clock off. Reviewed-by: Jacob Keller Signed-off-by: Miroslav Lichvar ---