From 600ad549b5125df1a2be842d651727271d53f17e Mon Sep 17 00:00:00 2001 From: Andre Mauricio Zelak Date: Wed, 6 Sep 2023 15:09:14 -0300 Subject: [PATCH] Use time traceable flag in HA clock selection A new time traceable flag was added to pmc agent to store the current time traceable status. This flag replaces the utc_offset_traceable flag in the HA clock selection algorithm and status command. Test plan: HA clock selection algorithm PASS: Verify the clock source which time isn't traceable is discarded by the algorithm if ha_gm_timeTraceable is enabled. PASS: Verify the clock source which time is traceable isn't discarded by the algorithm if ha_gm_timeTraceable is enabled. Regression: status command PASS: Verify the response of status command shows the correct GM time traceable. The 'valid sources' command is used to get a list of interfaces which the clock is matching the requirements. The response contains a space separated list of interfaces, or "None" when not a single clock is matching all the requirements. Test plan: valid sources command PASS: Verify that a space separated list of interface is returned when one or more clocks match the requirements. PASS: Verify that the string "None" is returned when not a single clock match the requirements. Now the GM time traceable check is enabled by default as it is an important check for both T-GM and T-BC scenarios. The GM time traceable check is controlled in configuration by using the ha_gm_timeTraceable setting, and it can be disabled using the value 0 (ha_gm_timeTraceable 0). Test plan: default value PASS Verify the check is performed by default. PASS Verify the user can disable the check by configuration. Bonus: Fixed the behavior when none clock is matching the requirements and the active clock source is disabled using the 'disable source ' command. The interface is must be disabled and a new clock source is selected. Test plan: none clock is matching the requirements PASS: Verify that the active source can be disabled and a new one is selected. PASS: Verify that an attempt to disable the last active interface fails and an appopriated message is given as response. PASS: Verify that the interface with higher priority is selected after re-enabling it. PASS: Verify the active clock source doesn't change if another interface is disabled. PASS: Verify the active clock source doesn't change if another interface is re-enabled. Story: 2010723 Task: 48702 Change-Id: I64193575a995e520d36460c0ebb8dd452fa8c2b8 Signed-off-by: Andre Mauricio Zelak --- ...e-when-switching-port-with-same-best.patch | 2 +- ...lock-check-on-best-clock-port-change.patch | 2 +- ...heck-timestamps-from-non-slave-ports.patch | 2 +- .../0004-port-Don-t-renew-raw-transport.patch | 2 +- ...clockcheck-Increase-minimum-interval.patch | 2 +- ...sable-default-port-selection-in-phc2.patch | 2 +- ...hange-sysoff_measure-to-return-errno.patch | 2 +- ...ge-log-level-of-ioctl-error-messages.patch | 2 +- ...-EBUSY-when-probing-supported-ioctls.patch | 2 +- ...it-when-reading-of-PHC-fails-with-EB.patch | 2 +- ...PMC-functionality-into-a-smaller-str.patch | 2 +- ...hc2sys-make-PMC-functions-non-static.patch | 2 +- ...break-out-pmc-code-into-pmc_common.c.patch | 2 +- .../0014-Introduce-the-PMC-agent-module.patch | 2 +- ...-pmc_node-to-something-more-descript.patch | 2 +- ...16-pmc_agent-Hide-the-implementation.patch | 2 +- ...me-for-the-management-TLV-ID-helper-.patch | 2 +- ...me-for-the-management-TLV-data-helpe.patch | 2 +- ...e-error-codes-for-the-run_pmc-method.patch | 2 +- ...t-the-subscribe-method-into-the-cano.patch | 2 +- ...pmc_agent-Simplify-the-update-method.patch | 2 +- ...gent-Simplify-logic-in-update-method.patch | 2 +- ...-bogus-comparison-between-last-updat.patch | 2 +- ...m-time-comparison-using-positive-log.patch | 2 +- ...-the-update-method-and-attempt-to-do.patch | 2 +- ...-pointer-de-reference-in-manual-mode.patch | 2 +- ...t-the-method-that-queries-TAI-UTC-of.patch | 2 +- ...t-the-method-that-queries-the-port-p.patch | 2 +- ...lize-the-method-that-queries-the-loc.patch | 2 +- ...fy-the-method-that-gets-of-the-numbe.patch | 2 +- ...e-update-method-poll-for-push-events.patch | 2 +- ...Fix-regression-in-the-automatic-mode.patch | 2 +- ...push-notification-for-TIME_STATUS_NP.patch | 2 +- ...k-Rename-UDS-variables-to-read-write.patch | 2 +- ...dd-read-only-UDS-port-for-monitoring.patch | 2 +- .../0036-Rename-management-ID-macros.patch | 2 +- ...2sys-to-accept-multiple-ptp4l-inputs.patch | 2 +- ...0038-Best-source-selection-algorithm.patch | 2 +- ...est-source-clock-after-state-changes.patch | 2 +- ...lock-a-clock-source-in-configuration.patch | 2 +- .../patches/0041-HA-phc2sys-com-socket.patch | 2 +- ...ommands-enable-lock-and-disable-lock.patch | 2 +- ...nds-enable-source-and-disable-source.patch | 2 +- .../0044-Stream-type-phc2sys-com-socket.patch | 2 +- ...ctions-starts_with-and-str_at_column.patch | 2 +- ...tness-improvements-to-phc2sys-socket.patch | 2 +- .../0047-phc2sys-without-w-option.patch | 2 +- .../patches/0048-HA-domain-number.patch | 2 +- ...uracy-and-offset-scaled-log-variance.patch | 2 +- ...requirements-clock-if-active-doesn-t.patch | 2 +- .../patches/0051-Time-traceable-flag.patch | 110 ++++++++++++++++++ .../patches/0052-Command-valid-sources.patch | 69 +++++++++++ ...e-traceable-check-enabled-by-default.patch | 40 +++++++ ...054-Disable-active-interface-failing.patch | 59 ++++++++++ base/linuxptp/debian/patches/series | 6 +- 55 files changed, 333 insertions(+), 51 deletions(-) create mode 100644 base/linuxptp/debian/patches/0051-Time-traceable-flag.patch create mode 100644 base/linuxptp/debian/patches/0052-Command-valid-sources.patch create mode 100644 base/linuxptp/debian/patches/0053-GM-time-traceable-check-enabled-by-default.patch create mode 100644 base/linuxptp/debian/patches/0054-Disable-active-interface-failing.patch diff --git a/base/linuxptp/debian/patches/0001-clock-Reset-state-when-switching-port-with-same-best.patch b/base/linuxptp/debian/patches/0001-clock-Reset-state-when-switching-port-with-same-best.patch index 969053284..e1d1b04ae 100644 --- a/base/linuxptp/debian/patches/0001-clock-Reset-state-when-switching-port-with-same-best.patch +++ b/base/linuxptp/debian/patches/0001-clock-Reset-state-when-switching-port-with-same-best.patch @@ -1,7 +1,7 @@ From 63b43924294da6cb177d0509120b2e957580441c Mon Sep 17 00:00:00 2001 From: Miroslav Lichvar Date: Mon, 31 May 2021 11:07:52 +0200 -Subject: [PATCH 1/50] clock: Reset state when switching port with same best clock. +Subject: [PATCH 1/54] clock: Reset state when switching port with same best clock. 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 diff --git a/base/linuxptp/debian/patches/0002-clock-Reset-clock-check-on-best-clock-port-change.patch b/base/linuxptp/debian/patches/0002-clock-Reset-clock-check-on-best-clock-port-change.patch index ccf39dd2b..f0fc2832b 100644 --- a/base/linuxptp/debian/patches/0002-clock-Reset-clock-check-on-best-clock-port-change.patch +++ b/base/linuxptp/debian/patches/0002-clock-Reset-clock-check-on-best-clock-port-change.patch @@ -4,7 +4,7 @@ In-Reply-To: <0389752e3aecf8d2b2743f16ce1408a58088bea9.1630418391.git.Jim.Somerv References: <0389752e3aecf8d2b2743f16ce1408a58088bea9.1630418391.git.Jim.Somerville@windriver.com> From: Miroslav Lichvar Date: Mon, 31 May 2021 11:07:53 +0200 -Subject: [PATCH 2/50] clock: Reset clock check on best clock/port change. +Subject: [PATCH 2/54] clock: Reset clock check on best clock/port change. Reset the clock check when the best clock or port changes, together with the other state like current estimated delay and frequency. This avoids diff --git a/base/linuxptp/debian/patches/0003-port-Don-t-check-timestamps-from-non-slave-ports.patch b/base/linuxptp/debian/patches/0003-port-Don-t-check-timestamps-from-non-slave-ports.patch index 3ba06e3d8..5548326b8 100644 --- a/base/linuxptp/debian/patches/0003-port-Don-t-check-timestamps-from-non-slave-ports.patch +++ b/base/linuxptp/debian/patches/0003-port-Don-t-check-timestamps-from-non-slave-ports.patch @@ -4,7 +4,7 @@ In-Reply-To: <0389752e3aecf8d2b2743f16ce1408a58088bea9.1630418391.git.Jim.Somerv References: <0389752e3aecf8d2b2743f16ce1408a58088bea9.1630418391.git.Jim.Somerville@windriver.com> From: Miroslav Lichvar Date: Mon, 31 May 2021 11:07:54 +0200 -Subject: [PATCH 3/50] port: Don't check timestamps from non-slave ports. +Subject: [PATCH 3/54] 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 diff --git a/base/linuxptp/debian/patches/0004-port-Don-t-renew-raw-transport.patch b/base/linuxptp/debian/patches/0004-port-Don-t-renew-raw-transport.patch index aaa8752f1..aa91d802b 100644 --- a/base/linuxptp/debian/patches/0004-port-Don-t-renew-raw-transport.patch +++ b/base/linuxptp/debian/patches/0004-port-Don-t-renew-raw-transport.patch @@ -4,7 +4,7 @@ In-Reply-To: <0389752e3aecf8d2b2743f16ce1408a58088bea9.1630418391.git.Jim.Somerv References: <0389752e3aecf8d2b2743f16ce1408a58088bea9.1630418391.git.Jim.Somerville@windriver.com> From: Miroslav Lichvar Date: Mon, 31 May 2021 11:07:55 +0200 -Subject: [PATCH 4/50] port: Don't renew raw transport. +Subject: [PATCH 4/54] port: Don't renew raw transport. Renewing of the transport on announce/sync timeout is needed in the client-only mode to avoid getting stuck with a broken multicast socket diff --git a/base/linuxptp/debian/patches/0005-clockcheck-Increase-minimum-interval.patch b/base/linuxptp/debian/patches/0005-clockcheck-Increase-minimum-interval.patch index 30fd6963e..32640cd13 100644 --- a/base/linuxptp/debian/patches/0005-clockcheck-Increase-minimum-interval.patch +++ b/base/linuxptp/debian/patches/0005-clockcheck-Increase-minimum-interval.patch @@ -4,7 +4,7 @@ In-Reply-To: <0389752e3aecf8d2b2743f16ce1408a58088bea9.1630611367.git.Jim.Somerv References: <0389752e3aecf8d2b2743f16ce1408a58088bea9.1630611367.git.Jim.Somerville@windriver.com> From: Miroslav Lichvar Date: Mon, 31 May 2021 11:07:56 +0200 -Subject: [PATCH 5/50] clockcheck: Increase minimum interval. +Subject: [PATCH 5/54] clockcheck: Increase minimum interval. Increase the minimum check interval to 1 second to measure the frequency offset more accurately and with default configuration make false diff --git a/base/linuxptp/debian/patches/0006-Add-option-to-disable-default-port-selection-in-phc2.patch b/base/linuxptp/debian/patches/0006-Add-option-to-disable-default-port-selection-in-phc2.patch index d4fc98235..92860c8ec 100644 --- a/base/linuxptp/debian/patches/0006-Add-option-to-disable-default-port-selection-in-phc2.patch +++ b/base/linuxptp/debian/patches/0006-Add-option-to-disable-default-port-selection-in-phc2.patch @@ -4,7 +4,7 @@ In-Reply-To: <0389752e3aecf8d2b2743f16ce1408a58088bea9.1630418391.git.Jim.Somerv References: <0389752e3aecf8d2b2743f16ce1408a58088bea9.1630418391.git.Jim.Somerville@windriver.com> From: Cole Walker Date: Wed, 23 Jun 2021 11:14:41 -0400 -Subject: [PATCH 6/50] Add option to disable default port selection in phc2sys +Subject: [PATCH 6/54] Add option to disable default port selection in phc2sys This change serves to address an issue in phc2sys where the local ptp clocks are not synced together properly if the local diff --git a/base/linuxptp/debian/patches/0007-sysoff-Change-sysoff_measure-to-return-errno.patch b/base/linuxptp/debian/patches/0007-sysoff-Change-sysoff_measure-to-return-errno.patch index 895c46dc8..48c607a69 100644 --- a/base/linuxptp/debian/patches/0007-sysoff-Change-sysoff_measure-to-return-errno.patch +++ b/base/linuxptp/debian/patches/0007-sysoff-Change-sysoff_measure-to-return-errno.patch @@ -1,7 +1,7 @@ From 6428c2628c013c408ec09355ad37eb12fa6bb20f Mon Sep 17 00:00:00 2001 From: Miroslav Lichvar Date: Wed, 18 May 2022 11:33:35 +0200 -Subject: [PATCH 7/50] sysoff: Change sysoff_measure() to return errno. +Subject: [PATCH 7/54] sysoff: Change sysoff_measure() to return errno. Return -errno from failed ioctl instead of the SYSOFF_* enum from the measurement functions to allow the callers to check for specific errors. diff --git a/base/linuxptp/debian/patches/0008-sysoff-Change-log-level-of-ioctl-error-messages.patch b/base/linuxptp/debian/patches/0008-sysoff-Change-log-level-of-ioctl-error-messages.patch index 9c426e646..47a4d4157 100644 --- a/base/linuxptp/debian/patches/0008-sysoff-Change-log-level-of-ioctl-error-messages.patch +++ b/base/linuxptp/debian/patches/0008-sysoff-Change-log-level-of-ioctl-error-messages.patch @@ -1,7 +1,7 @@ From 38a530d94fc5aa73bde424d05e2e38348e64d7e5 Mon Sep 17 00:00:00 2001 From: Miroslav Lichvar Date: Wed, 18 May 2022 11:33:36 +0200 -Subject: [PATCH 8/50] sysoff: Change log level of ioctl error messages. +Subject: [PATCH 8/54] sysoff: Change log level of ioctl error messages. Change the log level of ioctl error messages to the error level to make them visible in default configuration, with the exception of EOPNOTSUPP diff --git a/base/linuxptp/debian/patches/0009-sysoff-Retry-on-EBUSY-when-probing-supported-ioctls.patch b/base/linuxptp/debian/patches/0009-sysoff-Retry-on-EBUSY-when-probing-supported-ioctls.patch index 695ab4b81..449de44d9 100644 --- a/base/linuxptp/debian/patches/0009-sysoff-Retry-on-EBUSY-when-probing-supported-ioctls.patch +++ b/base/linuxptp/debian/patches/0009-sysoff-Retry-on-EBUSY-when-probing-supported-ioctls.patch @@ -1,7 +1,7 @@ From 11ae077e31d9957df01aacfa17eea5b5d548b249 Mon Sep 17 00:00:00 2001 From: Miroslav Lichvar Date: Wed, 18 May 2022 11:33:37 +0200 -Subject: [PATCH 9/50] sysoff: Retry on EBUSY when probing supported ioctls. +Subject: [PATCH 9/54] sysoff: Retry on EBUSY when probing supported ioctls. Handle EBUSY when probing support for a PTP_SYS_OFFSET ioctl. Try each ioctl up to three times before giving up on it to make the detection diff --git a/base/linuxptp/debian/patches/0010-phc2sys-Don-t-exit-when-reading-of-PHC-fails-with-EB.patch b/base/linuxptp/debian/patches/0010-phc2sys-Don-t-exit-when-reading-of-PHC-fails-with-EB.patch index 2a667426e..357f477e6 100644 --- a/base/linuxptp/debian/patches/0010-phc2sys-Don-t-exit-when-reading-of-PHC-fails-with-EB.patch +++ b/base/linuxptp/debian/patches/0010-phc2sys-Don-t-exit-when-reading-of-PHC-fails-with-EB.patch @@ -1,7 +1,7 @@ From e4fd6a930213e6f0f009eb070d51b1e14db60d1b Mon Sep 17 00:00:00 2001 From: Miroslav Lichvar Date: Wed, 18 May 2022 11:33:38 +0200 -Subject: [PATCH 10/50] phc2sys: Don't exit when reading of PHC fails with EBUSY. +Subject: [PATCH 10/54] phc2sys: Don't exit when reading of PHC fails with EBUSY. Reading of the PHC can occasionally fail with some drivers, e.g. the ice driver returns EBUSY when it fails to get a lock. Continue in the loop diff --git a/base/linuxptp/debian/patches/0011-phc2sys-extract-PMC-functionality-into-a-smaller-str.patch b/base/linuxptp/debian/patches/0011-phc2sys-extract-PMC-functionality-into-a-smaller-str.patch index be1b73463..5199f58a8 100644 --- a/base/linuxptp/debian/patches/0011-phc2sys-extract-PMC-functionality-into-a-smaller-str.patch +++ b/base/linuxptp/debian/patches/0011-phc2sys-extract-PMC-functionality-into-a-smaller-str.patch @@ -1,7 +1,7 @@ From 0c5c39a8cd3675d91e872a75d75854907950957d Mon Sep 17 00:00:00 2001 From: Andre Mauricio Zelak Date: Mon, 12 Jun 2023 13:47:47 -0300 -Subject: [PATCH 11/50] phc2sys: extract PMC functionality into a smaller +Subject: [PATCH 11/54] phc2sys: extract PMC functionality into a smaller struct pmc_node This creates a smaller structure within phc2sys_private, which embeds diff --git a/base/linuxptp/debian/patches/0012-phc2sys-make-PMC-functions-non-static.patch b/base/linuxptp/debian/patches/0012-phc2sys-make-PMC-functions-non-static.patch index e01184164..6036e7d5a 100644 --- a/base/linuxptp/debian/patches/0012-phc2sys-make-PMC-functions-non-static.patch +++ b/base/linuxptp/debian/patches/0012-phc2sys-make-PMC-functions-non-static.patch @@ -1,7 +1,7 @@ From 87d8e7281e3e66813d0c669bea0b5335a8cbb6b6 Mon Sep 17 00:00:00 2001 From: Andre Mauricio Zelak Date: Mon, 12 Jun 2023 13:59:48 -0300 -Subject: [PATCH 12/50] phc2sys: make PMC functions non-static +Subject: [PATCH 12/54] phc2sys: make PMC functions non-static In preparation of a trivial movement of code to pmc_common.c, remove the "static" keyword from the functions that will end up there, since they diff --git a/base/linuxptp/debian/patches/0013-phc2sys-break-out-pmc-code-into-pmc_common.c.patch b/base/linuxptp/debian/patches/0013-phc2sys-break-out-pmc-code-into-pmc_common.c.patch index 5fa14e379..3171c301b 100644 --- a/base/linuxptp/debian/patches/0013-phc2sys-break-out-pmc-code-into-pmc_common.c.patch +++ b/base/linuxptp/debian/patches/0013-phc2sys-break-out-pmc-code-into-pmc_common.c.patch @@ -1,7 +1,7 @@ From ba9c2ea0e1f7a96093bca1147d4745a7d0ce17b6 Mon Sep 17 00:00:00 2001 From: Andre Mauricio Zelak Date: Mon, 12 Jun 2023 14:34:19 -0300 -Subject: [PATCH 13/50] phc2sys: break out pmc code into pmc_common.c +Subject: [PATCH 13/54] phc2sys: break out pmc code into pmc_common.c The code through which phc2sys sends various PTP management messages to ptp4l via pmc can be reused. diff --git a/base/linuxptp/debian/patches/0014-Introduce-the-PMC-agent-module.patch b/base/linuxptp/debian/patches/0014-Introduce-the-PMC-agent-module.patch index 343b77022..75ce8ecc7 100644 --- a/base/linuxptp/debian/patches/0014-Introduce-the-PMC-agent-module.patch +++ b/base/linuxptp/debian/patches/0014-Introduce-the-PMC-agent-module.patch @@ -1,7 +1,7 @@ From c00e75286b2ad882cf8e89549ea58e438c877f95 Mon Sep 17 00:00:00 2001 From: Andre Mauricio Zelak Date: Mon, 12 Jun 2023 14:40:59 -0300 -Subject: [PATCH 14/50] Introduce the PMC agent module. +Subject: [PATCH 14/54] Introduce the PMC agent module. The logic for placing PTP management queries migrated out of phc2sys into pmc_common in order to be shared with other programs in the future. This diff --git a/base/linuxptp/debian/patches/0015-pmc_agent-Rename-pmc_node-to-something-more-descript.patch b/base/linuxptp/debian/patches/0015-pmc_agent-Rename-pmc_node-to-something-more-descript.patch index 8a0ae408b..1478679ee 100644 --- a/base/linuxptp/debian/patches/0015-pmc_agent-Rename-pmc_node-to-something-more-descript.patch +++ b/base/linuxptp/debian/patches/0015-pmc_agent-Rename-pmc_node-to-something-more-descript.patch @@ -1,7 +1,7 @@ From 82258917b8de7110545f3d4f99d3ac88a609f019 Mon Sep 17 00:00:00 2001 From: Andre Mauricio Zelak Date: Mon, 12 Jun 2023 14:47:36 -0300 -Subject: [PATCH 15/50] pmc_agent: Rename pmc_node to something more +Subject: [PATCH 15/54] pmc_agent: Rename pmc_node to something more descriptive. Signed-off-by: Richard Cochran diff --git a/base/linuxptp/debian/patches/0016-pmc_agent-Hide-the-implementation.patch b/base/linuxptp/debian/patches/0016-pmc_agent-Hide-the-implementation.patch index 1aa26d9a6..2decabb81 100644 --- a/base/linuxptp/debian/patches/0016-pmc_agent-Hide-the-implementation.patch +++ b/base/linuxptp/debian/patches/0016-pmc_agent-Hide-the-implementation.patch @@ -1,7 +1,7 @@ From f6d7bb0a62f15fcca0343c42891f7e056f502949 Mon Sep 17 00:00:00 2001 From: Andre Mauricio Zelak Date: Mon, 12 Jun 2023 14:55:29 -0300 -Subject: [PATCH 16/50] pmc_agent: Hide the implementation. +Subject: [PATCH 16/54] pmc_agent: Hide the implementation. The PMC agent's implementation should not be exposed to its users. This patch hides the details and provides a method to create an instance. In diff --git a/base/linuxptp/debian/patches/0017-Find-a-better-home-for-the-management-TLV-ID-helper-.patch b/base/linuxptp/debian/patches/0017-Find-a-better-home-for-the-management-TLV-ID-helper-.patch index 82f4bbe11..833687a80 100644 --- a/base/linuxptp/debian/patches/0017-Find-a-better-home-for-the-management-TLV-ID-helper-.patch +++ b/base/linuxptp/debian/patches/0017-Find-a-better-home-for-the-management-TLV-ID-helper-.patch @@ -1,7 +1,7 @@ From 4ebb69f5c55e7f1f08d1a73df87d42fe70147ec9 Mon Sep 17 00:00:00 2001 From: Andre Mauricio Zelak Date: Mon, 12 Jun 2023 14:58:09 -0300 -Subject: [PATCH 17/50] Find a better home for the management TLV ID helper +Subject: [PATCH 17/54] Find a better home for the management TLV ID helper function. Signed-off-by: Richard Cochran diff --git a/base/linuxptp/debian/patches/0018-Find-a-better-home-for-the-management-TLV-data-helpe.patch b/base/linuxptp/debian/patches/0018-Find-a-better-home-for-the-management-TLV-data-helpe.patch index bbdedad10..007f58cba 100644 --- a/base/linuxptp/debian/patches/0018-Find-a-better-home-for-the-management-TLV-data-helpe.patch +++ b/base/linuxptp/debian/patches/0018-Find-a-better-home-for-the-management-TLV-data-helpe.patch @@ -1,7 +1,7 @@ From 6e4f8ea8531b7678a44a9b3ed021fda94eccdc27 Mon Sep 17 00:00:00 2001 From: Andre Mauricio Zelak Date: Mon, 12 Jun 2023 14:59:57 -0300 -Subject: [PATCH 18/50] Find a better home for the management TLV data helper +Subject: [PATCH 18/54] Find a better home for the management TLV data helper function. Signed-off-by: Richard Cochran diff --git a/base/linuxptp/debian/patches/0019-Introduce-error-codes-for-the-run_pmc-method.patch b/base/linuxptp/debian/patches/0019-Introduce-error-codes-for-the-run_pmc-method.patch index 391e2f0d0..413b3735f 100644 --- a/base/linuxptp/debian/patches/0019-Introduce-error-codes-for-the-run_pmc-method.patch +++ b/base/linuxptp/debian/patches/0019-Introduce-error-codes-for-the-run_pmc-method.patch @@ -1,7 +1,7 @@ From 95e4983c9ab517b9dda1faf171721f0dd877e076 Mon Sep 17 00:00:00 2001 From: Andre Mauricio Zelak Date: Mon, 12 Jun 2023 15:04:11 -0300 -Subject: [PATCH 19/50] Introduce error codes for the run_pmc method. +Subject: [PATCH 19/54] Introduce error codes for the run_pmc method. The run_pmc function is used by several of the PMC agent methods, but it breaks the pattern of returning zero on success. However, the user facing diff --git a/base/linuxptp/debian/patches/0020-pmc_agent-Convert-the-subscribe-method-into-the-cano.patch b/base/linuxptp/debian/patches/0020-pmc_agent-Convert-the-subscribe-method-into-the-cano.patch index ae1475ab9..661659046 100644 --- a/base/linuxptp/debian/patches/0020-pmc_agent-Convert-the-subscribe-method-into-the-cano.patch +++ b/base/linuxptp/debian/patches/0020-pmc_agent-Convert-the-subscribe-method-into-the-cano.patch @@ -1,7 +1,7 @@ From 8c1dd261683d27acba49e047d9f6da52dada3c98 Mon Sep 17 00:00:00 2001 From: Andre Mauricio Zelak Date: Mon, 12 Jun 2023 15:08:01 -0300 -Subject: [PATCH 20/50] pmc_agent: Convert the subscribe method into the +Subject: [PATCH 20/54] pmc_agent: Convert the subscribe method into the canonical form. This patch renames the function to have the module prefix and corrects the diff --git a/base/linuxptp/debian/patches/0021-pmc_agent-Simplify-the-update-method.patch b/base/linuxptp/debian/patches/0021-pmc_agent-Simplify-the-update-method.patch index 722368206..84b2f0584 100644 --- a/base/linuxptp/debian/patches/0021-pmc_agent-Simplify-the-update-method.patch +++ b/base/linuxptp/debian/patches/0021-pmc_agent-Simplify-the-update-method.patch @@ -1,7 +1,7 @@ From 82a369b4fe44a7cea41fb0ccf408c02b1b6aa694 Mon Sep 17 00:00:00 2001 From: Andre Mauricio Zelak Date: Mon, 12 Jun 2023 15:17:26 -0300 -Subject: [PATCH 21/50] pmc_agent: Simplify the update method. +Subject: [PATCH 21/54] pmc_agent: Simplify the update method. The main method that causes the PMC agent to update its status takes a flag that results in different behavior when push notifications are active. diff --git a/base/linuxptp/debian/patches/0022-pmc_agent-Simplify-logic-in-update-method.patch b/base/linuxptp/debian/patches/0022-pmc_agent-Simplify-logic-in-update-method.patch index 20475c65b..68b3fb50e 100644 --- a/base/linuxptp/debian/patches/0022-pmc_agent-Simplify-logic-in-update-method.patch +++ b/base/linuxptp/debian/patches/0022-pmc_agent-Simplify-logic-in-update-method.patch @@ -1,7 +1,7 @@ From 731e8938953e56578007a679dbaa29e9471650ac Mon Sep 17 00:00:00 2001 From: Andre Mauricio Zelak Date: Mon, 12 Jun 2023 15:18:36 -0300 -Subject: [PATCH 22/50] pmc_agent: Simplify logic in update method. +Subject: [PATCH 22/54] pmc_agent: Simplify logic in update method. If the pmc pointer is not set, then there is no need to read the time only to later discard the result. This patch simplifies the flow by returning diff --git a/base/linuxptp/debian/patches/0023-pmc_agent-Remove-bogus-comparison-between-last-updat.patch b/base/linuxptp/debian/patches/0023-pmc_agent-Remove-bogus-comparison-between-last-updat.patch index 0b10435ce..4ea32f7ea 100644 --- a/base/linuxptp/debian/patches/0023-pmc_agent-Remove-bogus-comparison-between-last-updat.patch +++ b/base/linuxptp/debian/patches/0023-pmc_agent-Remove-bogus-comparison-between-last-updat.patch @@ -1,7 +1,7 @@ From 357e24c897e1e2d29cf011b3a38c3a6b2a7943c3 Mon Sep 17 00:00:00 2001 From: Andre Mauricio Zelak Date: Mon, 12 Jun 2023 15:33:43 -0300 -Subject: [PATCH 23/50] pmc_agent: Remove bogus comparison between last update +Subject: [PATCH 23/54] pmc_agent: Remove bogus comparison between last update and now. The monotonic clock can never go backwards. If you take T1 and later T2 diff --git a/base/linuxptp/debian/patches/0024-pmc_agent-Perform-time-comparison-using-positive-log.patch b/base/linuxptp/debian/patches/0024-pmc_agent-Perform-time-comparison-using-positive-log.patch index 46b61050c..b30d299ea 100644 --- a/base/linuxptp/debian/patches/0024-pmc_agent-Perform-time-comparison-using-positive-log.patch +++ b/base/linuxptp/debian/patches/0024-pmc_agent-Perform-time-comparison-using-positive-log.patch @@ -1,7 +1,7 @@ From d5421e4d4d86907648a59810ab9c27e739591971 Mon Sep 17 00:00:00 2001 From: Andre Mauricio Zelak Date: Mon, 12 Jun 2023 15:35:23 -0300 -Subject: [PATCH 24/50] pmc_agent: Perform time comparison using positive +Subject: [PATCH 24/54] pmc_agent: Perform time comparison using positive logic. In the update_pmc_node() method, reduce the expression diff --git a/base/linuxptp/debian/patches/0025-pmc_agent-Rename-the-update-method-and-attempt-to-do.patch b/base/linuxptp/debian/patches/0025-pmc_agent-Rename-the-update-method-and-attempt-to-do.patch index ee9616137..365705bed 100644 --- a/base/linuxptp/debian/patches/0025-pmc_agent-Rename-the-update-method-and-attempt-to-do.patch +++ b/base/linuxptp/debian/patches/0025-pmc_agent-Rename-the-update-method-and-attempt-to-do.patch @@ -1,7 +1,7 @@ From a304d4df86a76c187fc7074755fe9b5ad349efbe Mon Sep 17 00:00:00 2001 From: Andre Mauricio Zelak Date: Mon, 12 Jun 2023 15:36:38 -0300 -Subject: [PATCH 25/50] pmc_agent: Rename the update method and attempt to +Subject: [PATCH 25/54] pmc_agent: Rename the update method and attempt to document it. This patch renames the function to have the module prefix and tries to diff --git a/base/linuxptp/debian/patches/0026-phc2sys-Fix-null-pointer-de-reference-in-manual-mode.patch b/base/linuxptp/debian/patches/0026-phc2sys-Fix-null-pointer-de-reference-in-manual-mode.patch index 921f1bfe5..2262a5f06 100644 --- a/base/linuxptp/debian/patches/0026-phc2sys-Fix-null-pointer-de-reference-in-manual-mode.patch +++ b/base/linuxptp/debian/patches/0026-phc2sys-Fix-null-pointer-de-reference-in-manual-mode.patch @@ -1,7 +1,7 @@ From 5aacbe319db97907a15741005e2790bbf4c742a0 Mon Sep 17 00:00:00 2001 From: Andre Mauricio Zelak Date: Mon, 12 Jun 2023 15:37:46 -0300 -Subject: [PATCH 26/50] phc2sys: Fix null pointer de-reference in manual mode. +Subject: [PATCH 26/54] phc2sys: Fix null pointer de-reference in manual mode. If both the -w and -O command line options are specified (or when using -w when both source and destination clocks are PHCs), then diff --git a/base/linuxptp/debian/patches/0027-pmc_agent-Convert-the-method-that-queries-TAI-UTC-of.patch b/base/linuxptp/debian/patches/0027-pmc_agent-Convert-the-method-that-queries-TAI-UTC-of.patch index 02e6462ca..1e95b09a8 100644 --- a/base/linuxptp/debian/patches/0027-pmc_agent-Convert-the-method-that-queries-TAI-UTC-of.patch +++ b/base/linuxptp/debian/patches/0027-pmc_agent-Convert-the-method-that-queries-TAI-UTC-of.patch @@ -1,7 +1,7 @@ From b8188a4fd51bc8983e5d19f18fe37b8ca39d03a6 Mon Sep 17 00:00:00 2001 From: Andre Mauricio Zelak Date: Mon, 12 Jun 2023 17:20:04 -0300 -Subject: [PATCH 27/50] pmc_agent: Convert the method that queries TAI-UTC +Subject: [PATCH 27/54] pmc_agent: Convert the method that queries TAI-UTC offset into the canonical form. This patch renames the function to have the module prefix and corrects the diff --git a/base/linuxptp/debian/patches/0028-pmc_agent-Convert-the-method-that-queries-the-port-p.patch b/base/linuxptp/debian/patches/0028-pmc_agent-Convert-the-method-that-queries-the-port-p.patch index 7a9286a41..6ac95aef3 100644 --- a/base/linuxptp/debian/patches/0028-pmc_agent-Convert-the-method-that-queries-the-port-p.patch +++ b/base/linuxptp/debian/patches/0028-pmc_agent-Convert-the-method-that-queries-the-port-p.patch @@ -1,7 +1,7 @@ From acdf74df9fa69b81c1e9332f10d4efcd3e9bae48 Mon Sep 17 00:00:00 2001 From: Andre Mauricio Zelak Date: Mon, 12 Jun 2023 17:23:29 -0300 -Subject: [PATCH 28/50] pmc_agent: Convert the method that queries the port +Subject: [PATCH 28/54] pmc_agent: Convert the method that queries the port properties. Prefix the function with the module name and correct the return code diff --git a/base/linuxptp/debian/patches/0029-pmc_agent-Generalize-the-method-that-queries-the-loc.patch b/base/linuxptp/debian/patches/0029-pmc_agent-Generalize-the-method-that-queries-the-loc.patch index 37bcfcbde..f7e46abd4 100644 --- a/base/linuxptp/debian/patches/0029-pmc_agent-Generalize-the-method-that-queries-the-loc.patch +++ b/base/linuxptp/debian/patches/0029-pmc_agent-Generalize-the-method-that-queries-the-loc.patch @@ -1,7 +1,7 @@ From 3e6dd047083625ca03df9b4bbdc781e7dd079ff2 Mon Sep 17 00:00:00 2001 From: Andre Mauricio Zelak Date: Mon, 12 Jun 2023 17:29:30 -0300 -Subject: [PATCH 29/50] pmc_agent: Generalize the method that queries the local +Subject: [PATCH 29/54] pmc_agent: Generalize the method that queries the local clock identity. When started in automatic mode, the phc2sys program first queries the diff --git a/base/linuxptp/debian/patches/0030-pmc_agent-Simplify-the-method-that-gets-of-the-numbe.patch b/base/linuxptp/debian/patches/0030-pmc_agent-Simplify-the-method-that-gets-of-the-numbe.patch index 0a2c6d46d..f6638de7f 100644 --- a/base/linuxptp/debian/patches/0030-pmc_agent-Simplify-the-method-that-gets-of-the-numbe.patch +++ b/base/linuxptp/debian/patches/0030-pmc_agent-Simplify-the-method-that-gets-of-the-numbe.patch @@ -1,7 +1,7 @@ From d3b877cae9576beddb00d4c5db67bf49c944b222 Mon Sep 17 00:00:00 2001 From: Andre Mauricio Zelak Date: Mon, 12 Jun 2023 17:30:57 -0300 -Subject: [PATCH 30/50] pmc_agent: Simplify the method that gets of the number +Subject: [PATCH 30/54] pmc_agent: Simplify the method that gets of the number of local ports. The number of ports is already available in the cached default data diff --git a/base/linuxptp/debian/patches/0031-pmc_agent-Let-the-update-method-poll-for-push-events.patch b/base/linuxptp/debian/patches/0031-pmc_agent-Let-the-update-method-poll-for-push-events.patch index d680a2967..d659d9440 100644 --- a/base/linuxptp/debian/patches/0031-pmc_agent-Let-the-update-method-poll-for-push-events.patch +++ b/base/linuxptp/debian/patches/0031-pmc_agent-Let-the-update-method-poll-for-push-events.patch @@ -1,7 +1,7 @@ From 156728d14591dd2b3131bcff49959e806523c1bb Mon Sep 17 00:00:00 2001 From: Andre Mauricio Zelak Date: Mon, 12 Jun 2023 17:32:27 -0300 -Subject: [PATCH 31/50] pmc_agent: Let the update method poll for push events. +Subject: [PATCH 31/54] pmc_agent: Let the update method poll for push events. Signed-off-by: Richard Cochran diff --git a/base/linuxptp/debian/patches/0032-phc2sys-Fix-regression-in-the-automatic-mode.patch b/base/linuxptp/debian/patches/0032-phc2sys-Fix-regression-in-the-automatic-mode.patch index 82cb2b8ff..8ee299a15 100644 --- a/base/linuxptp/debian/patches/0032-phc2sys-Fix-regression-in-the-automatic-mode.patch +++ b/base/linuxptp/debian/patches/0032-phc2sys-Fix-regression-in-the-automatic-mode.patch @@ -1,7 +1,7 @@ From 0e504e57af6c576202bbe1abe5a99eb24a981b73 Mon Sep 17 00:00:00 2001 From: Andre Mauricio Zelak Date: Mon, 12 Jun 2023 17:51:10 -0300 -Subject: [PATCH 32/50] phc2sys: Fix regression in the automatic mode. +Subject: [PATCH 32/54] phc2sys: Fix regression in the automatic mode. Commit ac7d69bbc476 ("pmc_agent: Convert the method that queries the port properties.") had the well meant intention of the cleaning up the diff --git a/base/linuxptp/debian/patches/0033-Implement-push-notification-for-TIME_STATUS_NP.patch b/base/linuxptp/debian/patches/0033-Implement-push-notification-for-TIME_STATUS_NP.patch index c0af011c8..a9e3600dd 100644 --- a/base/linuxptp/debian/patches/0033-Implement-push-notification-for-TIME_STATUS_NP.patch +++ b/base/linuxptp/debian/patches/0033-Implement-push-notification-for-TIME_STATUS_NP.patch @@ -1,7 +1,7 @@ From 06a6734e3350e4020b4bb7b24a15d43aa42b4ca7 Mon Sep 17 00:00:00 2001 From: Andre Mauricio Zelak Date: Mon, 12 Jun 2023 17:57:11 -0300 -Subject: [PATCH 33/50] Implement push notification for TIME_STATUS_NP +Subject: [PATCH 33/54] Implement push notification for TIME_STATUS_NP Subscribers to NOTIFY_TIME_SYNC will be notified on every clock synchronization. diff --git a/base/linuxptp/debian/patches/0034-clock-Rename-UDS-variables-to-read-write.patch b/base/linuxptp/debian/patches/0034-clock-Rename-UDS-variables-to-read-write.patch index c00adedf9..b0914d336 100644 --- a/base/linuxptp/debian/patches/0034-clock-Rename-UDS-variables-to-read-write.patch +++ b/base/linuxptp/debian/patches/0034-clock-Rename-UDS-variables-to-read-write.patch @@ -1,7 +1,7 @@ From babbe47ab091071e16fcd527bf1aad06e5aec377 Mon Sep 17 00:00:00 2001 From: Andre Mauricio Zelak Date: Mon, 12 Jun 2023 18:16:31 -0300 -Subject: [PATCH 34/50] clock: Rename UDS variables to read-write. +Subject: [PATCH 34/54] clock: Rename UDS variables to read-write. In preparation for a new read-only UDS port, rename variables of the current UDS port to make it clear it is read-write, as opposed to diff --git a/base/linuxptp/debian/patches/0035-clock-Add-read-only-UDS-port-for-monitoring.patch b/base/linuxptp/debian/patches/0035-clock-Add-read-only-UDS-port-for-monitoring.patch index 01612a751..77886c1ae 100644 --- a/base/linuxptp/debian/patches/0035-clock-Add-read-only-UDS-port-for-monitoring.patch +++ b/base/linuxptp/debian/patches/0035-clock-Add-read-only-UDS-port-for-monitoring.patch @@ -1,7 +1,7 @@ From 4af24949b94eda84b4b74d77b9164cf3fe0eccf9 Mon Sep 17 00:00:00 2001 From: Andre Mauricio Zelak Date: Mon, 12 Jun 2023 18:18:29 -0300 -Subject: [PATCH 35/50] clock: Add read-only UDS port for monitoring. +Subject: [PATCH 35/54] clock: Add read-only UDS port for monitoring. Add a second UDS port to allow untrusted applications to monitor ptp4l. On this "read-only" UDS port disable non-GET actions and forwarding. diff --git a/base/linuxptp/debian/patches/0036-Rename-management-ID-macros.patch b/base/linuxptp/debian/patches/0036-Rename-management-ID-macros.patch index 46c0c740c..8984e4401 100644 --- a/base/linuxptp/debian/patches/0036-Rename-management-ID-macros.patch +++ b/base/linuxptp/debian/patches/0036-Rename-management-ID-macros.patch @@ -1,7 +1,7 @@ From 019f50868bc4300c591025d364898035ea9817b9 Mon Sep 17 00:00:00 2001 From: Andre Mauricio Zelak Date: Mon, 12 Jun 2023 18:20:50 -0300 -Subject: [PATCH 36/50] Rename management ID macros. +Subject: [PATCH 36/54] Rename management ID macros. The management ID macros are prefixed with TLV. This is confusing, because the true TLV tags have the same prefix. Make the code more diff --git a/base/linuxptp/debian/patches/0037-Enhance-phc2sys-to-accept-multiple-ptp4l-inputs.patch b/base/linuxptp/debian/patches/0037-Enhance-phc2sys-to-accept-multiple-ptp4l-inputs.patch index f39fc2c64..2c83001cf 100644 --- a/base/linuxptp/debian/patches/0037-Enhance-phc2sys-to-accept-multiple-ptp4l-inputs.patch +++ b/base/linuxptp/debian/patches/0037-Enhance-phc2sys-to-accept-multiple-ptp4l-inputs.patch @@ -1,7 +1,7 @@ From 2a6ddfe1b9700ce8e0c62da8a7a4f2edcd4e1cad Mon Sep 17 00:00:00 2001 From: Andre Mauricio Zelak Date: Sun, 18 Jun 2023 20:58:34 -0300 -Subject: [PATCH 37/50] Enhance phc2sys to accept multiple ptp4l inputs +Subject: [PATCH 37/54] Enhance phc2sys to accept multiple ptp4l inputs A new configuration option called ha_enabled was created. When it is set 1 multiple ptp4l inputs are accepted and the high availability algorithms diff --git a/base/linuxptp/debian/patches/0038-Best-source-selection-algorithm.patch b/base/linuxptp/debian/patches/0038-Best-source-selection-algorithm.patch index ff34c837a..62ab2aeeb 100644 --- a/base/linuxptp/debian/patches/0038-Best-source-selection-algorithm.patch +++ b/base/linuxptp/debian/patches/0038-Best-source-selection-algorithm.patch @@ -1,7 +1,7 @@ From 142b30b1f996a5bd48f0edc9b5fb0f51af0b97fd Mon Sep 17 00:00:00 2001 From: Andre Mauricio Zelak Date: Tue, 4 Jul 2023 17:27:50 -0300 -Subject: [PATCH 38/50] Best source selection algorithm +Subject: [PATCH 38/54] Best source selection algorithm An algorithm to select the best available clock and use it as clock source. diff --git a/base/linuxptp/debian/patches/0039-Select-best-source-clock-after-state-changes.patch b/base/linuxptp/debian/patches/0039-Select-best-source-clock-after-state-changes.patch index 0da3e633a..04b03fa03 100644 --- a/base/linuxptp/debian/patches/0039-Select-best-source-clock-after-state-changes.patch +++ b/base/linuxptp/debian/patches/0039-Select-best-source-clock-after-state-changes.patch @@ -1,7 +1,7 @@ From c61a91f5da1c07a783b0922e713c9f1d32adfa80 Mon Sep 17 00:00:00 2001 From: Andre Mauricio Zelak Date: Sat, 8 Jul 2023 19:02:50 -0300 -Subject: [PATCH 39/50] Select best source clock after state changes +Subject: [PATCH 39/54] Select best source clock after state changes During operation, the clock states might change and require a new clock to be selected. For example, the local clock class of the current active diff --git a/base/linuxptp/debian/patches/0040-Forced-lock-a-clock-source-in-configuration.patch b/base/linuxptp/debian/patches/0040-Forced-lock-a-clock-source-in-configuration.patch index c9243690a..e10efe7cf 100644 --- a/base/linuxptp/debian/patches/0040-Forced-lock-a-clock-source-in-configuration.patch +++ b/base/linuxptp/debian/patches/0040-Forced-lock-a-clock-source-in-configuration.patch @@ -1,7 +1,7 @@ From 7d5061d971a8abc2ba8443edccde38e9a7a6f0ce Mon Sep 17 00:00:00 2001 From: Andre Mauricio Zelak Date: Wed, 26 Jul 2023 15:08:15 -0300 -Subject: [PATCH 40/50] Forced lock a clock source in configuration +Subject: [PATCH 40/54] Forced lock a clock source in configuration To help on maintenance and debuging tasks was implemented a configuration to forced lock to a single clock. It disables the automatic clock diff --git a/base/linuxptp/debian/patches/0041-HA-phc2sys-com-socket.patch b/base/linuxptp/debian/patches/0041-HA-phc2sys-com-socket.patch index 79cd597ca..a6c5fbc37 100644 --- a/base/linuxptp/debian/patches/0041-HA-phc2sys-com-socket.patch +++ b/base/linuxptp/debian/patches/0041-HA-phc2sys-com-socket.patch @@ -1,7 +1,7 @@ From fce993dd36e481aace337a62ff81331cd2411bec Mon Sep 17 00:00:00 2001 From: Andre Mauricio Zelak Date: Thu, 27 Jul 2023 14:22:47 -0300 -Subject: [PATCH 41/50] HA phc2sys com socket +Subject: [PATCH 41/54] HA phc2sys com socket A new communication path was created to retrieve status and to control the high availability algorithm. diff --git a/base/linuxptp/debian/patches/0042-Commands-enable-lock-and-disable-lock.patch b/base/linuxptp/debian/patches/0042-Commands-enable-lock-and-disable-lock.patch index ed406032d..69402a781 100644 --- a/base/linuxptp/debian/patches/0042-Commands-enable-lock-and-disable-lock.patch +++ b/base/linuxptp/debian/patches/0042-Commands-enable-lock-and-disable-lock.patch @@ -1,7 +1,7 @@ From e77783a9873baeeda277cfa59059021ce121a693 Mon Sep 17 00:00:00 2001 From: Andre Mauricio Zelak Date: Fri, 4 Aug 2023 15:44:12 -0300 -Subject: [PATCH 42/50] Commands 'enable lock' and 'disable lock. +Subject: [PATCH 42/54] Commands 'enable lock' and 'disable lock. The 'enable lock' command is used to lock to a single clock source and disable the HA clock selection algorithm. The diff --git a/base/linuxptp/debian/patches/0043-Commands-enable-source-and-disable-source.patch b/base/linuxptp/debian/patches/0043-Commands-enable-source-and-disable-source.patch index 45a458caf..db8ec84df 100644 --- a/base/linuxptp/debian/patches/0043-Commands-enable-source-and-disable-source.patch +++ b/base/linuxptp/debian/patches/0043-Commands-enable-source-and-disable-source.patch @@ -1,7 +1,7 @@ From 27b5c6afff470053b30ade14537be43f1c1c376d Mon Sep 17 00:00:00 2001 From: Andre Mauricio Zelak Date: Fri, 4 Aug 2023 19:01:57 -0300 -Subject: [PATCH 43/50] Commands 'enable source' and 'disable source'. +Subject: [PATCH 43/54] Commands 'enable source' and 'disable source'. These commands controls the list of clocks available to clock selection algorithm. diff --git a/base/linuxptp/debian/patches/0044-Stream-type-phc2sys-com-socket.patch b/base/linuxptp/debian/patches/0044-Stream-type-phc2sys-com-socket.patch index 3b41bf3a1..3d2a8f137 100644 --- a/base/linuxptp/debian/patches/0044-Stream-type-phc2sys-com-socket.patch +++ b/base/linuxptp/debian/patches/0044-Stream-type-phc2sys-com-socket.patch @@ -1,7 +1,7 @@ From 2d40cc7cf52bbf054856c34902e4bda9f13ebb79 Mon Sep 17 00:00:00 2001 From: Andre Mauricio Zelak Date: Mon, 7 Aug 2023 14:55:12 -0300 -Subject: [PATCH 44/50] Stream type phc2sys com socket +Subject: [PATCH 44/54] Stream type phc2sys com socket The type of the socket was changed from datagram to stream. diff --git a/base/linuxptp/debian/patches/0045-Functions-starts_with-and-str_at_column.patch b/base/linuxptp/debian/patches/0045-Functions-starts_with-and-str_at_column.patch index 565027a58..116f960e5 100644 --- a/base/linuxptp/debian/patches/0045-Functions-starts_with-and-str_at_column.patch +++ b/base/linuxptp/debian/patches/0045-Functions-starts_with-and-str_at_column.patch @@ -1,7 +1,7 @@ From 2896553d6dfa975102cba4cc45105b000ec0ae52 Mon Sep 17 00:00:00 2001 From: Andre Mauricio Zelak Date: Tue, 8 Aug 2023 13:10:50 -0300 -Subject: [PATCH 45/50] Functions starts_with and str_at_column +Subject: [PATCH 45/54] Functions starts_with and str_at_column Renaming starts_with and str_at_column functions to match ptp4l code style. diff --git a/base/linuxptp/debian/patches/0046-Robustness-improvements-to-phc2sys-socket.patch b/base/linuxptp/debian/patches/0046-Robustness-improvements-to-phc2sys-socket.patch index b8847e1f4..a232fd7dd 100644 --- a/base/linuxptp/debian/patches/0046-Robustness-improvements-to-phc2sys-socket.patch +++ b/base/linuxptp/debian/patches/0046-Robustness-improvements-to-phc2sys-socket.patch @@ -1,7 +1,7 @@ From f480fb54182da36baeb35bac90154abafcaf854a Mon Sep 17 00:00:00 2001 From: Andre Mauricio Zelak Date: Tue, 8 Aug 2023 14:06:55 -0300 -Subject: [PATCH 46/50] Robustness improvements to phc2sys socket +Subject: [PATCH 46/54] Robustness improvements to phc2sys socket When phc2sys abnormally exits the socket file might remain created. To avoid error when phc2sys is relaunched, the exixting file is diff --git a/base/linuxptp/debian/patches/0047-phc2sys-without-w-option.patch b/base/linuxptp/debian/patches/0047-phc2sys-without-w-option.patch index 4bf47f569..d92432fb8 100644 --- a/base/linuxptp/debian/patches/0047-phc2sys-without-w-option.patch +++ b/base/linuxptp/debian/patches/0047-phc2sys-without-w-option.patch @@ -1,7 +1,7 @@ From c5e1599748877f16bfd1dea6910f6b8b57be7ddd Mon Sep 17 00:00:00 2001 From: Andre Mauricio Zelak Date: Mon, 7 Aug 2023 18:19:37 -0300 -Subject: [PATCH 47/50] phc2sys without -w option. +Subject: [PATCH 47/54] phc2sys without -w option. Fix bad clock and pmc initialization when -w command argument is not provided. diff --git a/base/linuxptp/debian/patches/0048-HA-domain-number.patch b/base/linuxptp/debian/patches/0048-HA-domain-number.patch index b1430e217..2db54bb9c 100644 --- a/base/linuxptp/debian/patches/0048-HA-domain-number.patch +++ b/base/linuxptp/debian/patches/0048-HA-domain-number.patch @@ -1,7 +1,7 @@ From c9a2a5398bace2f000ecc5ae6185b331cefa3a2c Mon Sep 17 00:00:00 2001 From: Andre Mauricio Zelak Date: Mon, 21 Aug 2023 14:28:20 -0300 -Subject: [PATCH 48/50] HA domain number +Subject: [PATCH 48/54] HA domain number Support multiple domain numbers for each uds socket used in HA phc2sys. diff --git a/base/linuxptp/debian/patches/0049-GM-clock-accuracy-and-offset-scaled-log-variance.patch b/base/linuxptp/debian/patches/0049-GM-clock-accuracy-and-offset-scaled-log-variance.patch index a6cdb4167..6d879a42c 100644 --- a/base/linuxptp/debian/patches/0049-GM-clock-accuracy-and-offset-scaled-log-variance.patch +++ b/base/linuxptp/debian/patches/0049-GM-clock-accuracy-and-offset-scaled-log-variance.patch @@ -1,7 +1,7 @@ From 52c6fd7f9212902a2c5195e5a7b2c19a5956633f Mon Sep 17 00:00:00 2001 From: Andre Mauricio Zelak Date: Wed, 23 Aug 2023 19:18:08 -0300 -Subject: [PATCH 49/50] GM clock accuracy and offset scaled log variance +Subject: [PATCH 49/54] GM clock accuracy and offset scaled log variance Include GM clock quality parameters clock accuracy and offset scaled log variance to the clock selection algorithm. Those diff --git a/base/linuxptp/debian/patches/0050-Select-matching-requirements-clock-if-active-doesn-t.patch b/base/linuxptp/debian/patches/0050-Select-matching-requirements-clock-if-active-doesn-t.patch index 1595ad148..975aaa2f5 100644 --- a/base/linuxptp/debian/patches/0050-Select-matching-requirements-clock-if-active-doesn-t.patch +++ b/base/linuxptp/debian/patches/0050-Select-matching-requirements-clock-if-active-doesn-t.patch @@ -1,7 +1,7 @@ From 2155ccb5a4de8cbebb552cf3d0a23874b026a716 Mon Sep 17 00:00:00 2001 From: Andre Mauricio Zelak Date: Tue, 29 Aug 2023 19:06:23 -0300 -Subject: [PATCH 50/50] Select matching requirements clock if active doesn't match +Subject: [PATCH 50/54] Select matching requirements clock if active doesn't match them Fix clock selection algorithm behavior where a clock source starts diff --git a/base/linuxptp/debian/patches/0051-Time-traceable-flag.patch b/base/linuxptp/debian/patches/0051-Time-traceable-flag.patch new file mode 100644 index 000000000..daaeae79d --- /dev/null +++ b/base/linuxptp/debian/patches/0051-Time-traceable-flag.patch @@ -0,0 +1,110 @@ +From 5459f8e2eedcace7478a9c74fb6f73dc78af2c84 Mon Sep 17 00:00:00 2001 +From: Andre Mauricio Zelak +Date: Wed, 30 Aug 2023 13:28:34 -0300 +Subject: [PATCH 51/54] Time traceable flag + +A new time traceable flag was added to pmc agent to store the current +time traceable status. + +This flag replaces the utc_offset_traceable flag in the HA clock +selection algorithm and status command. + +Test plan: HA clock selection algorithm +PASS: Verify the clock source which time isn't traceable is discarded +by the algorithm if ha_gm_timeTraceable is enabled. +PASS: Verify the clock source which time is traceable isn't discarded +by the algorithm if ha_gm_timeTraceable is enabled. + +Regression: status command +PASS: Verify the response of status command shows the correct GM time +traceable. + +Story: 2010723 +Task: 48702 + +Signed-off-by: Andre Mauricio Zelak +--- + phc2sys.c | 4 ++-- + pmc_agent.c | 5 +++++ + pmc_agent.h | 1 + + 3 files changed, 8 insertions(+), 2 deletions(-) + +diff --git a/phc2sys.c b/phc2sys.c +index 5df89e5..27ba630 100644 +--- a/phc2sys.c ++++ b/phc2sys.c +@@ -361,7 +361,7 @@ static bool clock_match_ha_tpds_requirements(struct clock *clock, struct config + } + + /* is time traceable */ +- if (check_time_traceable && !clock->node->utc_offset_traceable) { ++ if (check_time_traceable && !clock->node->time_traceable) { + pr_debug("clock %s time is not traceable", clock->device); + return false; + } +@@ -1336,7 +1336,7 @@ static int ha_handle_status_msg(struct phc2sys_private *priv, char *response, + clock->node->dds.clockQuality.clockClass, + clock->node->dds.clockQuality.clockAccuracy, + clock->node->dds.clockQuality.offsetScaledLogVariance, +- clock->node->utc_offset_traceable ? "yes" : "no ", ++ clock->node->time_traceable ? "yes" : "no ", + clock->node->freq_traceable ? "yes" : "no ", + clock->node->pds.grandmasterClockQuality.clockClass, + clock->node->pds.grandmasterClockQuality.clockAccuracy, +diff --git a/pmc_agent.c b/pmc_agent.c +index 92fc14c..bf65897 100644 +--- a/pmc_agent.c ++++ b/pmc_agent.c +@@ -344,6 +344,7 @@ int pmc_agent_query_utc_offset(struct pmc_agent *node, int timeout) + struct ptp_message *msg; + int res; + int sync_offset, leap, utc_offset_traceable, freq_traceable; ++ int time_traceable; + + res = run_pmc(node, timeout, MID_TIME_PROPERTIES_DATA_SET, &msg); + if (is_run_pmc_error(res)) { +@@ -354,6 +355,7 @@ int pmc_agent_query_utc_offset(struct pmc_agent *node, int timeout) + sync_offset = node->sync_offset; + leap = node->leap; + utc_offset_traceable = node->utc_offset_traceable; ++ time_traceable = node->time_traceable; + freq_traceable = node->freq_traceable; + + tds = (struct timePropertiesDS *) management_tlv_data(msg); +@@ -367,11 +369,13 @@ int pmc_agent_query_utc_offset(struct pmc_agent *node, int timeout) + node->leap = 0; + node->utc_offset_traceable = tds->flags & UTC_OFF_VALID && + tds->flags & TIME_TRACEABLE; ++ node->time_traceable = tds->flags & TIME_TRACEABLE; + node->freq_traceable = tds->flags & FREQ_TRACEABLE; + } else { + node->sync_offset = 0; + node->leap = 0; + node->utc_offset_traceable = 0; ++ node->time_traceable = 0; + node->freq_traceable = 0; + } + +@@ -379,6 +383,7 @@ int pmc_agent_query_utc_offset(struct pmc_agent *node, int timeout) + if ((sync_offset != node->sync_offset) || + (leap != node->leap) || + (utc_offset_traceable != node->utc_offset_traceable) || ++ (time_traceable != node->time_traceable) || + (freq_traceable != node->freq_traceable)) { + node->new_tpds = true; + } +diff --git a/pmc_agent.h b/pmc_agent.h +index 38951b1..4e70606 100644 +--- a/pmc_agent.h ++++ b/pmc_agent.h +@@ -43,6 +43,7 @@ struct pmc_agent { + bool stay_subscribed; + int sync_offset; + int utc_offset_traceable; ++ int time_traceable; + int freq_traceable; + bool new_tpds; + unsigned int index; +-- +2.25.1 + diff --git a/base/linuxptp/debian/patches/0052-Command-valid-sources.patch b/base/linuxptp/debian/patches/0052-Command-valid-sources.patch new file mode 100644 index 000000000..8527e9793 --- /dev/null +++ b/base/linuxptp/debian/patches/0052-Command-valid-sources.patch @@ -0,0 +1,69 @@ +From 146da924d87830de29a8f261636e5311fa8997ac Mon Sep 17 00:00:00 2001 +From: Andre Mauricio Zelak +Date: Wed, 30 Aug 2023 15:43:42 -0300 +Subject: [PATCH 51/54] Command 'valid sources' + +The 'valid sources' command is used to get a list of interfaces which +the clock is matching the requirements. The response contains a space +separated list of interfaces, or "None" when not a single clock is +matching all the requirements. + +Test plan: valid sources command +PASS: Verify that a space separated list of interface is returned when +one or more clocks match the requirements. +PASS: Verify that the string "None" is returned when not a single clock +match the requirements. + +Story: 2010723 +Task: 48702 + +Signed-off-by: Andre Mauricio Zelak +--- + phc2sys.c | 24 ++++++++++++++++++++++++ + 1 file changed, 24 insertions(+) + +diff --git a/phc2sys.c b/phc2sys.c +index 27ba630..9893675 100644 +--- a/phc2sys.c ++++ b/phc2sys.c +@@ -1499,6 +1499,27 @@ static int ha_handle_disable_source_msg(struct phc2sys_private *priv, + return curlen; + } + ++static int ha_handle_valid_sources_msg(struct phc2sys_private *priv, ++ struct config *cfg, char *response, size_t resplen) ++{ ++ size_t curlen = 0; ++ struct clock *clock = NULL; ++ ++ LIST_FOREACH(clock, &priv->clocks, list) { ++ if (clock_match_ha_requirements(clock, cfg)) { ++ curlen += snprintf(response + curlen, resplen - curlen, ++ "%s ", clock->device); ++ } ++ } ++ ++ /* no clock is matching requirements */ ++ if (0 == curlen) { ++ curlen = snprintf(response, resplen, "None"); ++ } ++ ++ return curlen; ++} ++ + static int ha_com_socket_handle_msg(struct phc2sys_private *priv, + struct config *cfg) + { +@@ -1567,6 +1588,9 @@ static int ha_com_socket_handle_msg(struct phc2sys_private *priv, + } else if (starts_with("disable source", buffer)) { + cnt = ha_handle_disable_source_msg(priv, cfg, buffer, response, + HA_SCK_BUFFER_SIZE); ++ } else if (strcmp((const char*)buffer, "valid sources") == 0) { ++ cnt = ha_handle_valid_sources_msg(priv, cfg, response, ++ HA_SCK_BUFFER_SIZE); + } else { + cnt = snprintf((char*)response, HA_SCK_BUFFER_SIZE, + "Error: Invalid command"); +-- +2.25.1 + diff --git a/base/linuxptp/debian/patches/0053-GM-time-traceable-check-enabled-by-default.patch b/base/linuxptp/debian/patches/0053-GM-time-traceable-check-enabled-by-default.patch new file mode 100644 index 000000000..36b44bdc7 --- /dev/null +++ b/base/linuxptp/debian/patches/0053-GM-time-traceable-check-enabled-by-default.patch @@ -0,0 +1,40 @@ +From a304feefd0c9f6e6319eb643b82f70a8b122f58a Mon Sep 17 00:00:00 2001 +From: Andre Mauricio Zelak +Date: Thu, 31 Aug 2023 12:36:02 -0300 +Subject: [PATCH 52/54] GM time traceable check enabled by default + +Now the GM time traceable check is enabled by default as it is an +important check for both T-GM and T-BC scenarios. + +The GM time traceable check is controlled in configuration by using +the ha_gm_timeTraceable setting, and it can be disabled using the +value 0 (ha_gm_timeTraceable 0). + +Test plan: default value +PASS Verify the check is performed by default. +PASS Verify the user can disable the check by configuration. + +Story: 2010723 +Task: 48702 + +Signed-off-by: Andre Mauricio Zelak +--- + config.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/config.c b/config.c +index d405589..ef17463 100644 +--- a/config.c ++++ b/config.c +@@ -253,7 +253,7 @@ struct config_item config_tab[] = { + PORT_ITEM_INT("ha_domainNumber", 0, 0, 127), + GLOB_ITEM_INT("ha_enabled", 0, 0, 1), + GLOB_ITEM_INT("ha_gm_frequencyTraceable", 0, 0, 1), +- GLOB_ITEM_INT("ha_gm_timeTraceable", 0, 0, 1), ++ GLOB_ITEM_INT("ha_gm_timeTraceable", 1, 0, 1), + GLOB_ITEM_INT("ha_max_gm_clockAccuracy", 0xfe, 0, 0xff), + GLOB_ITEM_INT("ha_max_gm_clockClass", 6, 6, 255), + GLOB_ITEM_INT("ha_max_gm_offsetScaledLogVar", 0xffff, 0, 0xffff), +-- +2.25.1 + diff --git a/base/linuxptp/debian/patches/0054-Disable-active-interface-failing.patch b/base/linuxptp/debian/patches/0054-Disable-active-interface-failing.patch new file mode 100644 index 000000000..e62b6fadd --- /dev/null +++ b/base/linuxptp/debian/patches/0054-Disable-active-interface-failing.patch @@ -0,0 +1,59 @@ +From e74d268ac5432c0e41dc14fb0ea648a432d8e340 Mon Sep 17 00:00:00 2001 +From: Andre Mauricio Zelak +Date: Thu, 31 Aug 2023 16:05:15 -0300 +Subject: [PATCH 53/54] Disable active interface failing + +Fixed the behavior when none clock is matching the requirements and the +active clock source is disabled using the 'disable source ' +command. The interface is must be disabled and a new clock source is +selected. + +Test plan: none clock is matching the requirements +PASS: Verify that the active source can be disabled and a new one is +selected. +PASS: Verify that an attempt to disable the last active interface +fails and an appopriated message is given as response. +PASS: Verify that the interface with higher priority is selected after +re-enabling it. +PASS: Verify the active clock source doesn't change if another +interface is disabled. +PASS: Verify the active clock source doesn't change if another +interface is re-enabled. + +Story: 2010723 +Task: 48702 + +Signed-off-by: Andre Mauricio Zelak +--- + phc2sys.c | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/phc2sys.c b/phc2sys.c +index 9893675..4120568 100644 +--- a/phc2sys.c ++++ b/phc2sys.c +@@ -1115,6 +1115,10 @@ static struct clock* ha_select_clock(struct phc2sys_private *priv, struct config + if (clock->node == NULL) + continue; + ++ /* clock disabled */ ++ if (!clock->enabled) ++ continue; ++ + /* get clock class */ + clock_class = clock->node->dds.clockQuality.clockClass; + if (clock_class <= lowest_clock_class) { +@@ -1137,6 +1141,10 @@ static struct clock* ha_select_clock(struct phc2sys_private *priv, struct config + if (clock->node == NULL) + continue; + ++ /* clock disabled */ ++ if (!clock->enabled) ++ continue; ++ + best = clock; + } + } +-- +2.25.1 + diff --git a/base/linuxptp/debian/patches/series b/base/linuxptp/debian/patches/series index b62fb58c5..babd6f72f 100644 --- a/base/linuxptp/debian/patches/series +++ b/base/linuxptp/debian/patches/series @@ -47,4 +47,8 @@ 0047-phc2sys-without-w-option.patch 0048-HA-domain-number.patch 0049-GM-clock-accuracy-and-offset-scaled-log-variance.patch -0050-Select-matching-requirements-clock-if-active-doesn-t.patch \ No newline at end of file +0050-Select-matching-requirements-clock-if-active-doesn-t.patch +0051-Time-traceable-flag.patch +0052-Command-valid-sources.patch +0053-GM-time-traceable-check-enabled-by-default.patch +0054-Disable-active-interface-failing.patch \ No newline at end of file