Tara Subedi 12e86c6fa5 PTP: smooth/transparent HA switchover
Currently we have following inconsistency between linuxptp and
ptp-notification app.
1) pmc_agent.cc: PMC polling interval (PMC_UPDATE_INTERVAL of 60
sec on pmc_agent_update)
2) ptp-notification app: 'overalltracker_context': {'holdover_seconds':
'15'}

In context of HA switchover, there is pmc polling in 60 sec interval
(pmc_agent_update uses PMC_UPDATE_INTERVAL i.e 60s ). This means when
primary ptp source lost, it would take 60 sec to switchover to secondary
clock.
On ptp-application app side, we have 'ptptracker_context':
{'holdover_seconds': 15} 'overalltracker_context': {'holdover_seconds':
'15'} With this, when the selected ptp source is lost more than 15 sec,
the ptp state and overall state would go holdover and then freerun.

For smooth transition, PMC_UPDATE_INTERVAL should be <<
holdover_seconds. This commit introduces configurable value for
PMC_UPDATE_INTERVAL with "phc2sys .. -p <int value [1, 3600]>",
and without configuration, the default value would be of 7 sec.

TEST PLAN:
PASS: deploy PTP with HA phy2sys parameter of "-p 60"
        or with file global parameter "pmc_update_interval_sec 60"
      stop primary ptp4l instance and check users.log to see
      the "timeout reading pmc" in 60 secs.
PASS: deploy PTP with HA Phy2sys without parameter of "-p"
      stop primary ptp4l instance and check users.log to see
      the "timeout reading pmc" in 7 secs.
      check HA switchover happens in 7 secs, and overall
      state won't change from Locked to holdover/freerun.

Story: 2011370
Task: 52061

Change-Id: I8a9123b15acbbff41954db42822b9f501cd5f2c9
Signed-off-by: Tara Nath Subedi <tara.subedi@windriver.com>
2025-04-29 15:45:08 -04:00
2023-08-29 16:52:04 -03:00
2024-05-01 16:39:19 -04:00
2025-04-28 22:02:42 +08:00
2024-05-01 16:39:19 -04:00
2019-01-08 11:42:04 -05:00
2019-04-19 19:52:31 +00:00
2023-09-06 17:54:55 -03:00
2021-09-09 19:05:36 +03:00
2018-05-31 07:36:35 -07:00
2025-03-10 09:13:52 -03:00

integ

StarlingX Integration

Description
StarlingX Integration and packaging
Readme 53 MiB
Languages
Shell 27.7%
Python 22.8%
JavaScript 21.6%
Perl 12.8%
C++ 5.8%
Other 9.2%