[PTP] No longer consider clockClass 7 and 135 as locked

PTP-notification was treating clockClass values 7 and 135 as indicators
of a locked status, which is incorrect as per ITU-T G.8275.1. This was
resulting in ptp-notification delivering locked status to clients when
it should instead be transitioning to holdover/freerun.

Removed clockClass 7 and 135 from the list of valid locked clockClasses.
PTP-notification is now able to properly transition states when these
classes are observed.

Test plan:
PASS: Build and deploy image
PASS: Verify correct state transitions when clockClass 6, 7, 135 are
observed

Partial-Bug: 1995014

Signed-off-by: Cole Walker <cole.walker@windriver.com>
Change-Id: If68df991c3d6555f09e19a0d11f2c71e077c2587
This commit is contained in:
Cole Walker 2022-10-28 15:29:36 -04:00
parent 297584e7b9
commit b50b361d9f
2 changed files with 2 additions and 6 deletions

View File

@ -27,9 +27,7 @@ MASTER_MODE = "master"
TIME_IS_TRACEABLE1 = "1"
TIME_IS_TRACEABLE2 = "true"
GM_IS_PRESENT = "true"
CLOCK_CLASS_VALUE1 = "6"
CLOCK_CLASS_VALUE2 = "7"
CLOCK_CLASS_VALUE3 = "135"
CLOCK_CLASS_VALUE6 = "6"
# ts2phc constants
NMEA_SERIALPORT = "ts2phc.nmea_serialport"
GNSS_PIN = "GNSS-1PPS"

View File

@ -86,9 +86,7 @@ def check_results(result, total_ptp_keywords, port_count):
and result[constants.TIME_TRACEABLE].lower != constants.TIME_IS_TRACEABLE2):
sync_state = constants.FREERUN_PHC_STATE
if (result[constants.GM_CLOCK_CLASS] not in
[constants.CLOCK_CLASS_VALUE1,
constants.CLOCK_CLASS_VALUE2,
constants.CLOCK_CLASS_VALUE3]):
[constants.CLOCK_CLASS_VALUE6]):
sync_state = constants.FREERUN_PHC_STATE
return sync_state