integ/base/linuxptp
Cole Walker aca42c6d4c Implement logic to skip updates with offset spike in ts2phc.
This change allows ts2phc to be configured to ignore timing updates that
have a large offset spike in order to mitigate the resulting timing
skew.

In some circumstances on realtime systems with high CPU load, the
timestamp consumed by ts2phc can be delayed in reaching ts2phc and
results in the offset calculation attempting to speed the clock up by a
large margin.

This change causes ts2phc to ignore updates that would greatly skew the
clock when ts2phc is already in a synchronized state.

The global configuration option "max_phc_update_skip_cnt" is provided to
allow users to specify how many consecutive offset spike incidents will
be ignored before adjusting the clock. The default value is 120. The
behaviour can be disabled by setting max_phc_update_skip_cnt to 0.

This code is ported from a proposed upstream patch found here:
https://sourceforge.net/p/linuxptp/mailman/message/44114092/

Test-plan:
Pass: Verify linuxptp package build
Pass: Deploy ts2phc binary and verify system time sync
Pass: Manually trigger offset spike and verify that ts2phc maintains
stable time sync

Closes-bug: https://bugs.launchpad.net/starlingx/+bug/2059955

Change-Id: I13cd5c3440682ec9256e11449fe62d5fe28f66fa
Signed-off-by: Cole Walker <cole.walker@windriver.com>
2024-04-01 14:53:06 -04:00
..
centos Don't exit when reading of PHC fails with EBUSY 2022-08-02 13:19:14 -03:00
debian Implement logic to skip updates with offset spike in ts2phc. 2024-04-01 14:53:06 -04:00
PKG-INFO Add collection of linuxptp patches 2021-06-28 14:15:22 -04:00