From 36a7f8907801f93e0410a0474ed0fd76735479cc Mon Sep 17 00:00:00 2001 From: Cole Walker Date: Wed, 1 May 2024 14:05:11 -0400 Subject: [PATCH] ptp4l: Downgrade log message about failed uds forward Integrate a change from upstream linuxptp to downgrade the ptp4l log message to debug when dus forward fails. Update the linuxptp patch series accordingly. If multiple management clients are used in the network and ptp4l responded at least once over UDS, it will try to forward all management responses received from network to the last UDS client. ptp4l doesn't track the messages and doesn't know if they are responses to the UDS client or other clients in the network. If the UDS client is no longer running (receiving messages on its address), ptp4l logs "uds port: management forward failed" error message. With frequent management requests in the network this can lead to flooding of the system log. Downgrade the error message to debug to disable it in the default log level. Test plan: Pass: Verify package build Pass: Verify ptp4l startup and basic operation Pass: Verfiy "uds port" message is printed as at debug level Closes-bug: 2064654 Change-Id: Ic778914d834f0d022d1c9f1df218940962ef93fe Signed-off-by: Cole Walker --- ...e-when-switching-port-with-same-best.patch | 6 +-- ...lock-check-on-best-clock-port-change.patch | 6 +-- ...heck-timestamps-from-non-slave-ports.patch | 6 +-- .../0004-port-Don-t-renew-raw-transport.patch | 6 +-- ...clockcheck-Increase-minimum-interval.patch | 6 +-- ...sable-default-port-selection-in-phc2.patch | 7 +--- ...hange-sysoff_measure-to-return-errno.patch | 6 +-- ...ge-log-level-of-ioctl-error-messages.patch | 6 +-- ...-EBUSY-when-probing-supported-ioctls.patch | 6 +-- ...it-when-reading-of-PHC-fails-with-EB.patch | 6 +-- ...PMC-functionality-into-a-smaller-str.patch | 8 +--- ...hc2sys-make-PMC-functions-non-static.patch | 6 +-- ...break-out-pmc-code-into-pmc_common.c.patch | 12 ++---- .../0014-Introduce-the-PMC-agent-module.patch | 14 +++---- ...-pmc_node-to-something-more-descript.patch | 6 +-- ...16-pmc_agent-Hide-the-implementation.patch | 12 ++---- ...me-for-the-management-TLV-ID-helper-.patch | 6 +-- ...me-for-the-management-TLV-data-helpe.patch | 6 +-- ...e-error-codes-for-the-run_pmc-method.patch | 6 +-- ...t-the-subscribe-method-into-the-cano.patch | 6 +-- ...pmc_agent-Simplify-the-update-method.patch | 6 +-- ...gent-Simplify-logic-in-update-method.patch | 6 +-- ...-bogus-comparison-between-last-updat.patch | 6 +-- ...m-time-comparison-using-positive-log.patch | 6 +-- ...-the-update-method-and-attempt-to-do.patch | 6 +-- ...-pointer-de-reference-in-manual-mode.patch | 6 +-- ...t-the-method-that-queries-TAI-UTC-of.patch | 12 ++---- ...t-the-method-that-queries-the-port-p.patch | 12 ++---- ...lize-the-method-that-queries-the-loc.patch | 8 +--- ...fy-the-method-that-gets-of-the-numbe.patch | 6 +-- ...e-update-method-poll-for-push-events.patch | 6 +-- ...Fix-regression-in-the-automatic-mode.patch | 6 +-- ...push-notification-for-TIME_STATUS_NP.patch | 6 +-- ...k-Rename-UDS-variables-to-read-write.patch | 6 +-- ...dd-read-only-UDS-port-for-monitoring.patch | 10 ++--- .../0036-Rename-management-ID-macros.patch | 18 ++++----- ...2sys-to-accept-multiple-ptp4l-inputs.patch | 10 ++--- ...0038-Best-source-selection-algorithm.patch | 12 ++---- ...est-source-clock-after-state-changes.patch | 10 ++--- ...lock-a-clock-source-in-configuration.patch | 8 +--- .../patches/0041-HA-phc2sys-com-socket.patch | 8 +--- ...ommands-enable-lock-and-disable-lock.patch | 8 +--- ...nds-enable-source-and-disable-source.patch | 8 +--- .../0044-Stream-type-phc2sys-com-socket.patch | 8 +--- ...ctions-starts_with-and-str_at_column.patch | 6 +-- ...tness-improvements-to-phc2sys-socket.patch | 6 +-- .../0047-phc2sys-without-w-option.patch | 6 +-- .../patches/0048-HA-domain-number.patch | 6 +-- ...uracy-and-offset-scaled-log-variance.patch | 10 ++--- ...requirements-clock-if-active-doesn-t.patch | 6 +-- .../patches/0051-Time-traceable-flag.patch | 6 +-- .../patches/0052-Command-valid-sources.patch | 6 +-- ...e-traceable-check-enabled-by-default.patch | 6 +-- ...054-Disable-active-interface-failing.patch | 6 +-- ...ace-in-conf-file-when-HA-is-disabled.patch | 6 +-- .../0056-Fixed-event-port-id-map.patch | 6 +-- ...nitialized-variable-in-nmea_scan_rmc.patch | 8 +--- ...2phc-skip-updates-after-offset-spike.patch | 12 +++--- ...log-message-about-failed-uds-forward.patch | 38 +++++++++++++++++++ base/linuxptp/debian/patches/series | 3 +- 60 files changed, 144 insertions(+), 334 deletions(-) create mode 100644 base/linuxptp/debian/patches/0059-clock-Downgrade-log-message-about-failed-uds-forward.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 d59f0c93a..eff0e86c7 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,6 @@ -From edb8d92c8e3379c6b764eb033a1d872dee3c8802 Mon Sep 17 00:00:00 2001 From: Miroslav Lichvar Date: Mon, 31 May 2021 11:07:52 +0200 -Subject: [PATCH 01/58] clock: Reset state when switching port with same best +Subject: [PATCH 01/59] 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 @@ -31,6 +30,3 @@ index a66d189..96453f4 100644 clock_freq_est_reset(c); tsproc_reset(c->tsproc, 1); if (!tmv_is_zero(c->initial_delay)) --- -2.30.2 - 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 f5c688f20..415491dec 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 @@ -1,7 +1,6 @@ -From cef81731404b339517e277bab9c0285ee239f065 Mon Sep 17 00:00:00 2001 From: Miroslav Lichvar Date: Mon, 31 May 2021 11:07:53 +0200 -Subject: [PATCH 02/58] clock: Reset clock check on best clock/port change. +Subject: [PATCH 02/59] 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 @@ -71,6 +70,3 @@ index 78aca48..1ff86eb 100644 /** * Perform the sanity check on a time stamp. * @param cc Pointer to a clock check obtained via @ref clockcheck_create(). --- -2.30.2 - 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 5adf4dae4..0d538b219 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 @@ -1,7 +1,6 @@ -From 7a507ff333c3c8046e84ca605ba4d386614c3a99 Mon Sep 17 00:00:00 2001 From: Miroslav Lichvar Date: Mon, 31 May 2021 11:07:54 +0200 -Subject: [PATCH 03/58] port: Don't check timestamps from non-slave ports. +Subject: [PATCH 03/59] 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 @@ -32,6 +31,3 @@ index fa49663..8cf3f59 100644 } switch (msg_type(msg)) { --- -2.30.2 - 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 a20cc04cd..1544ad1e3 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 @@ -1,7 +1,6 @@ -From ab617c7f70e8d8bc66673412a536fc1a8cf3584c Mon Sep 17 00:00:00 2001 From: Miroslav Lichvar Date: Mon, 31 May 2021 11:07:55 +0200 -Subject: [PATCH 04/58] port: Don't renew raw transport. +Subject: [PATCH 04/59] 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 @@ -38,6 +37,3 @@ index 8cf3f59..f22bff4 100644 transport_close(p->trp, &p->fda); port_clear_fda(p, FD_FIRST_TIMER); res = transport_open(p->trp, p->iface, &p->fda, p->timestamping); --- -2.30.2 - 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 daf1f9a0e..d5510b85f 100644 --- a/base/linuxptp/debian/patches/0005-clockcheck-Increase-minimum-interval.patch +++ b/base/linuxptp/debian/patches/0005-clockcheck-Increase-minimum-interval.patch @@ -1,7 +1,6 @@ -From 01abb33c0851f89e4f96c757c928366df75484ab Mon Sep 17 00:00:00 2001 From: Miroslav Lichvar Date: Mon, 31 May 2021 11:07:56 +0200 -Subject: [PATCH 05/58] clockcheck: Increase minimum interval. +Subject: [PATCH 05/59] 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 @@ -29,6 +28,3 @@ index d0b4714..f0141be 100644 #define CHECK_MAX_FREQ 900000000 struct clockcheck { --- -2.30.2 - 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 5870e4d18..1c78e977a 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 @@ -1,7 +1,7 @@ -From 901b4f776d7cf483e0f229eb10f78d14b9be5f17 Mon Sep 17 00:00:00 2001 From: Cole Walker Date: Wed, 23 Jun 2021 11:14:41 -0400 -Subject: [PATCH 06/58] Add option to disable default port selection in phc2sys +Subject: [PATCH 06/59] 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 @@ -114,6 +114,3 @@ index a36cbe0..44d6872 100644 if (autocfg) { if (init_pmc(cfg, &priv)) --- -2.30.2 - 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 660850371..6f73ddb78 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,6 @@ -From 347548500e39e21037b4afea6179d5101695b28f Mon Sep 17 00:00:00 2001 From: Miroslav Lichvar Date: Wed, 18 May 2022 11:33:35 +0200 -Subject: [PATCH 07/58] sysoff: Change sysoff_measure() to return errno. +Subject: [PATCH 07/59] 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. @@ -89,6 +88,3 @@ index e4de919..5480f8f 100644 */ int sysoff_measure(int fd, int method, int n_samples, int64_t *result, uint64_t *ts, int64_t *delay); --- -2.30.2 - 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 40569e3ca..38f76d4fe 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,6 @@ -From 583e206c66f7af8847851530daf0728f9074b3a3 Mon Sep 17 00:00:00 2001 From: Miroslav Lichvar Date: Wed, 18 May 2022 11:33:36 +0200 -Subject: [PATCH 08/58] sysoff: Change log level of ioctl error messages. +Subject: [PATCH 08/59] 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 @@ -62,6 +61,3 @@ index 5d3b907..a425275 100644 return -errno; } *result = sysoff_estimate(pso.ts, 0, n_samples, ts, delay); --- -2.30.2 - 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 fb54479b4..b7eb4c2f8 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,6 @@ -From c36e970db481dc1d5482386418f046f46b25f645 Mon Sep 17 00:00:00 2001 From: Miroslav Lichvar Date: Wed, 18 May 2022 11:33:37 +0200 -Subject: [PATCH 09/58] sysoff: Retry on EBUSY when probing supported ioctls. +Subject: [PATCH 09/59] 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 @@ -48,6 +47,3 @@ index a425275..fc1f7ca 100644 } return SYSOFF_RUN_TIME_MISSING; --- -2.30.2 - 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 c9e579d50..e8beed7e3 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,6 @@ -From 2df24f632e8bde2022cc2005f4a8f2cb25181ee1 Mon Sep 17 00:00:00 2001 From: Miroslav Lichvar Date: Wed, 18 May 2022 11:33:38 +0200 -Subject: [PATCH 10/58] phc2sys: Don't exit when reading of PHC fails with +Subject: [PATCH 10/59] 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 @@ -80,6 +79,3 @@ index 44d6872..7959015 100644 update_clock(priv, clock, offset, ts, delay); } } --- -2.30.2 - 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 19b86d7d0..e41481e8c 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,6 @@ -From df691061d979ba6aa921b455f570365417e5700e Mon Sep 17 00:00:00 2001 From: Andre Mauricio Zelak Date: Mon, 12 Jun 2023 13:47:47 -0300 -Subject: [PATCH 11/58] phc2sys: extract PMC functionality into a smaller +Subject: [PATCH 11/59] phc2sys: extract PMC functionality into a smaller struct pmc_node This creates a smaller structure within phc2sys_private, which embeds @@ -25,7 +24,7 @@ Signed-off-by: Vladimir Oltean [commit 1ca1419ad7e6cc04cf893f5a9ca449a90f39f4e0 upstream] Signed-off-by: Andre Mauricio Zelak --- - phc2sys.c | 228 ++++++++++++++++++++++++++++++------------------------ + phc2sys.c | 228 ++++++++++++++++++++++++++++++++++---------------------------- 1 file changed, 125 insertions(+), 103 deletions(-) diff --git a/phc2sys.c b/phc2sys.c @@ -636,6 +635,3 @@ index 7959015..86b9822 100644 clock_cleanup(&priv); port_cleanup(&priv); config_destroy(cfg); --- -2.30.2 - 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 8a8180754..b9d69e2dd 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,6 @@ -From ab9b7dfcc503c21bce09ec4096498bc689c6a9ff Mon Sep 17 00:00:00 2001 From: Andre Mauricio Zelak Date: Mon, 12 Jun 2023 13:59:48 -0300 -Subject: [PATCH 12/58] phc2sys: make PMC functions non-static +Subject: [PATCH 12/59] 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 @@ -138,6 +137,3 @@ index 86b9822..d5b8e71 100644 { struct timespec tp; uint64_t ts; --- -2.30.2 - 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 d422fa5db..8637a3540 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,6 @@ -From 6f7e16dac861cb6bc1d2063c3fb47a9e6da4dc75 Mon Sep 17 00:00:00 2001 From: Andre Mauricio Zelak Date: Mon, 12 Jun 2023 14:34:19 -0300 -Subject: [PATCH 13/58] phc2sys: break out pmc code into pmc_common.c +Subject: [PATCH 13/59] 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. @@ -16,9 +15,9 @@ Reviewed-by: Jacob Keller [commit abc75482332752b630b023178ccdf636f5fe7de7 upstream] Signed-off-by: Andre Mauricio Zelak --- - phc2sys.c | 354 --------------------------------------------------- - pmc_common.c | 337 ++++++++++++++++++++++++++++++++++++++++++++++++ - pmc_common.h | 35 +++++ + phc2sys.c | 354 ----------------------------------------------------------- + pmc_common.c | 337 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + pmc_common.h | 35 ++++++ 3 files changed, 372 insertions(+), 354 deletions(-) diff --git a/phc2sys.c b/phc2sys.c @@ -836,6 +835,3 @@ index 9fa72de..476ccea 100644 +void *get_mgt_data(struct ptp_message *msg); + #endif --- -2.30.2 - 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 f938c0d10..b7d64f229 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,6 @@ -From 4d8fa2e0d4ed8c0ca79ee9123d8a5963a2a13ce5 Mon Sep 17 00:00:00 2001 From: Andre Mauricio Zelak Date: Mon, 12 Jun 2023 14:40:59 -0300 -Subject: [PATCH 14/58] Introduce the PMC agent module. +Subject: [PATCH 14/59] 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 @@ -18,10 +17,10 @@ Signed-off-by: Andre Mauricio Zelak --- makefile | 6 +- phc2sys.c | 2 +- - pmc_agent.c | 361 +++++++++++++++++++++++++++++++++++++++++++++++++++ - pmc_agent.h | 62 +++++++++ - pmc_common.c | 338 ----------------------------------------------- - pmc_common.h | 34 ----- + pmc_agent.c | 361 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + pmc_agent.h | 62 ++++++++++ + pmc_common.c | 338 ------------------------------------------------------- + pmc_common.h | 34 ------ 6 files changed, 427 insertions(+), 376 deletions(-) create mode 100644 pmc_agent.c create mode 100644 pmc_agent.h @@ -908,6 +907,3 @@ index 476ccea..8bea2e0 100644 -void *get_mgt_data(struct ptp_message *msg); - #endif --- -2.30.2 - 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 4240c6509..747d27128 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,6 @@ -From 77a246c6d6a865f11fe2fac14cdc9fa2746a06a2 Mon Sep 17 00:00:00 2001 From: Andre Mauricio Zelak Date: Mon, 12 Jun 2023 14:47:36 -0300 -Subject: [PATCH 15/58] pmc_agent: Rename pmc_node to something more +Subject: [PATCH 15/59] pmc_agent: Rename pmc_node to something more descriptive. Signed-off-by: Richard Cochran @@ -207,6 +206,3 @@ index 90245b1..10ef4b5 100644 int get_mgt_id(struct ptp_message *msg); void *get_mgt_data(struct ptp_message *msg); --- -2.30.2 - 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 7a3021fce..1ff82bef0 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,6 @@ -From f6de4c4e2c1ae6d9762778baf18031fc42251657 Mon Sep 17 00:00:00 2001 From: Andre Mauricio Zelak Date: Mon, 12 Jun 2023 14:55:29 -0300 -Subject: [PATCH 16/58] pmc_agent: Hide the implementation. +Subject: [PATCH 16/59] 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 @@ -13,9 +12,9 @@ Signed-off-by: Richard Cochran [commit 826698791769e0ba4431fe98f02d4d09c109542e upstream] Signed-off-by: Andre Mauricio Zelak --- - phc2sys.c | 76 +++++++++++++++++++++++++++++------------------------ - pmc_agent.c | 58 +++++++++++++++++++++++++++++++++++----- - pmc_agent.h | 62 +++++++++++++++++++++++++++++++------------ + phc2sys.c | 76 ++++++++++++++++++++++++++++++++++--------------------------- + pmc_agent.c | 58 ++++++++++++++++++++++++++++++++++++++++------ + pmc_agent.h | 62 +++++++++++++++++++++++++++++++++++-------------- 3 files changed, 138 insertions(+), 58 deletions(-) diff --git a/phc2sys.c b/phc2sys.c @@ -443,6 +442,3 @@ index 10ef4b5..c0b4525 100644 +bool pmc_agent_utc_offset_traceable(struct pmc_agent *agent); + +#endif --- -2.30.2 - 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 968b6f16b..2bd66fae3 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,6 @@ -From 8946d8e8eba908a213ba46844d697d7ff26e9bb6 Mon Sep 17 00:00:00 2001 From: Andre Mauricio Zelak Date: Mon, 12 Jun 2023 14:58:09 -0300 -Subject: [PATCH 17/58] Find a better home for the management TLV ID helper +Subject: [PATCH 17/59] Find a better home for the management TLV ID helper function. Signed-off-by: Richard Cochran @@ -91,6 +90,3 @@ index c0b4525..09249ff 100644 void *get_mgt_data(struct ptp_message *msg); --- -2.30.2 - 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 360902b46..cc9017c3b 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,6 @@ -From cd72c765ee2acc49ca5b78cd0e2c9659f456434c Mon Sep 17 00:00:00 2001 From: Andre Mauricio Zelak Date: Mon, 12 Jun 2023 14:59:57 -0300 -Subject: [PATCH 18/58] Find a better home for the management TLV data helper +Subject: [PATCH 18/59] Find a better home for the management TLV data helper function. Signed-off-by: Richard Cochran @@ -127,6 +126,3 @@ index 09249ff..f3a26fe 100644 /** --- -2.30.2 - 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 45d9645d7..4bac0481f 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,6 @@ -From d798a871a0b27a953a80afa7b696a44cd8a93fdf Mon Sep 17 00:00:00 2001 From: Andre Mauricio Zelak Date: Mon, 12 Jun 2023 15:04:11 -0300 -Subject: [PATCH 19/58] Introduce error codes for the run_pmc method. +Subject: [PATCH 19/59] 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 @@ -76,6 +75,3 @@ index 6e9c023..22d9c5b 100644 } } --- -2.30.2 - 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 4abfc62d4..c3a67e987 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,6 @@ -From 479301925d24906f03b13821ee8bd6cafb58c8c5 Mon Sep 17 00:00:00 2001 From: Andre Mauricio Zelak Date: Mon, 12 Jun 2023 15:08:01 -0300 -Subject: [PATCH 20/58] pmc_agent: Convert the subscribe method into the +Subject: [PATCH 20/59] pmc_agent: Convert the subscribe method into the canonical form. This patch renames the function to have the module prefix and corrects the @@ -148,6 +147,3 @@ index f3a26fe..9dc684e 100644 /** * Tests whether the current UTC offset is traceable. * @param agent Pointer to a PMC instance obtained via @ref pmc_agent_create(). --- -2.30.2 - 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 d38aad97d..730732d5c 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,6 @@ -From f221d3e5b7d5ebac532a1d02f0cfb74fda6a237c Mon Sep 17 00:00:00 2001 From: Andre Mauricio Zelak Date: Mon, 12 Jun 2023 15:17:26 -0300 -Subject: [PATCH 21/58] pmc_agent: Simplify the update method. +Subject: [PATCH 21/59] 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. @@ -128,6 +127,3 @@ index 9dc684e..743818f 100644 int run_pmc_clock_identity(struct pmc_agent *agent, int timeout); int run_pmc_wait_sync(struct pmc_agent *agent, int timeout); int run_pmc_get_number_ports(struct pmc_agent *agent, int timeout); --- -2.30.2 - 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 384a839e7..8aed6e52c 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,6 @@ -From f692885fbb0e1a1a379314b08d3108c1e54d3f4f Mon Sep 17 00:00:00 2001 From: Andre Mauricio Zelak Date: Mon, 12 Jun 2023 15:18:36 -0300 -Subject: [PATCH 22/58] pmc_agent: Simplify logic in update method. +Subject: [PATCH 22/59] 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 @@ -40,6 +39,3 @@ index dd509af..f30f174 100644 ts - node->pmc_last_update < PMC_UPDATE_INTERVAL)) { if (node->stay_subscribed) { renew_subscription(node, 0); --- -2.30.2 - 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 60b918d3a..c126ad8ce 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,6 @@ -From 20cb57a86671fd1e60479de9e6ac0a5586ad5acd Mon Sep 17 00:00:00 2001 From: Andre Mauricio Zelak Date: Mon, 12 Jun 2023 15:33:43 -0300 -Subject: [PATCH 23/58] pmc_agent: Remove bogus comparison between last update +Subject: [PATCH 23/59] pmc_agent: Remove bogus comparison between last update and now. The monotonic clock can never go backwards. If you take T1 and later T2 @@ -35,6 +34,3 @@ index f30f174..df3a562 100644 if (node->stay_subscribed) { renew_subscription(node, 0); } --- -2.30.2 - 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 fa4ea5e30..52e133247 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,6 @@ -From 4321cff2b53512d4027bc096bdef5df2610b18cf Mon Sep 17 00:00:00 2001 From: Andre Mauricio Zelak Date: Mon, 12 Jun 2023 15:35:23 -0300 -Subject: [PATCH 24/58] pmc_agent: Perform time comparison using positive +Subject: [PATCH 24/59] pmc_agent: Perform time comparison using positive logic. In the update_pmc_node() method, reduce the expression @@ -38,6 +37,3 @@ index df3a562..ea6b3b7 100644 } return 0; --- -2.30.2 - 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 889236583..9948d885f 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,6 @@ -From 9136345c69038a22d9b548863fb6afe64e54958d Mon Sep 17 00:00:00 2001 From: Andre Mauricio Zelak Date: Mon, 12 Jun 2023 15:36:38 -0300 -Subject: [PATCH 25/58] pmc_agent: Rename the update method and attempt to +Subject: [PATCH 25/59] pmc_agent: Rename the update method and attempt to document it. This patch renames the function to have the module prefix and tries to @@ -150,6 +149,3 @@ index 743818f..483a21b 100644 /** * Tests whether the current UTC offset is traceable. * @param agent Pointer to a PMC instance obtained via @ref pmc_agent_create(). --- -2.30.2 - 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 982756a06..3fea29da7 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,6 @@ -From 95d2fad84edea1397f3484e6570bcbb29509bacd Mon Sep 17 00:00:00 2001 From: Andre Mauricio Zelak Date: Mon, 12 Jun 2023 15:37:46 -0300 -Subject: [PATCH 26/58] phc2sys: Fix null pointer de-reference in manual mode. +Subject: [PATCH 26/59] 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 @@ -86,6 +85,3 @@ index 483a21b..0ed10f8 100644 /** * Gets the current leap adjustment. * @param agent Pointer to a PMC instance obtained via @ref pmc_agent_create(). --- -2.30.2 - 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 a2aea2c1d..63f90cf3d 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,6 @@ -From 4f37561dad0e8b163691f68cfd101e798d39248a Mon Sep 17 00:00:00 2001 From: Andre Mauricio Zelak Date: Mon, 12 Jun 2023 17:20:04 -0300 -Subject: [PATCH 27/58] pmc_agent: Convert the method that queries TAI-UTC +Subject: [PATCH 27/59] 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 @@ -17,9 +16,9 @@ Reviewed-by: Jacob Keller [commit 943c8f51c56acb72277d1a9459bbf7b7a5ac5fe7 upstream] Signed-off-by: Andre Mauricio Zelak --- - phc2sys.c | 8 +++---- - pmc_agent.c | 63 +++++++++++++++++++++++++++-------------------------- - pmc_agent.h | 16 ++++++++++++-- + phc2sys.c | 8 ++++---- + pmc_agent.c | 63 +++++++++++++++++++++++++++++++------------------------------ + pmc_agent.h | 16 ++++++++++++++-- 3 files changed, 50 insertions(+), 37 deletions(-) diff --git a/phc2sys.c b/phc2sys.c @@ -177,6 +176,3 @@ index 0ed10f8..44326d2 100644 /** * Sets the TAI-UTC offset. * @param agent Pointer to a PMC instance obtained via @ref pmc_agent_create(). --- -2.30.2 - 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 67bc85f61..617884c33 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,6 @@ -From b469ea325783cfe906bd7e28e63a7eb26b4cad96 Mon Sep 17 00:00:00 2001 From: Andre Mauricio Zelak Date: Mon, 12 Jun 2023 17:23:29 -0300 -Subject: [PATCH 28/58] pmc_agent: Convert the method that queries the port +Subject: [PATCH 28/59] pmc_agent: Convert the method that queries the port properties. Prefix the function with the module name and correct the return code @@ -16,9 +15,9 @@ Signed-off-by: Richard Cochran [commit ac7d69bbc476b94d76e5cee4992b9682f003feaf upstream] Signed-off-by: Andre Mauricio Zelak --- - phc2sys.c | 41 +++++++++++++++-------------- - pmc_agent.c | 74 ++++++++++++++++++++++++++--------------------------- - pmc_agent.h | 22 +++++++++++++--- + phc2sys.c | 41 ++++++++++++++++++---------------- + pmc_agent.c | 74 ++++++++++++++++++++++++++++++------------------------------- + pmc_agent.h | 22 +++++++++++++++--- 3 files changed, 78 insertions(+), 59 deletions(-) diff --git a/phc2sys.c b/phc2sys.c @@ -239,6 +238,3 @@ index 44326d2..ea37bf9 100644 /** * Queries the TAI-UTC offset and the current leap adjustment from the * ptp4l service. --- -2.30.2 - 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 14b377b1a..fb5fbd42c 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,8 +1,7 @@ -From adb2a1eeb1083c72b4ae8d0c987a1bcbc64f2434 Mon Sep 17 00:00:00 2001 From: Andre Mauricio Zelak Date: Mon, 12 Jun 2023 17:29:30 -0300 -Subject: [PATCH 29/58] pmc_agent: Generalize the method that queries the local - clock identity. +Subject: [PATCH 29/59] pmc_agent: Generalize the method that queries the + local clock identity. When started in automatic mode, the phc2sys program first queries the local clock identification and then the number of ports immediately @@ -178,6 +177,3 @@ index ea37bf9..9d8bd1c 100644 /** * Queries the port properties of a given port from the ptp4l service. * --- -2.30.2 - 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 f1849e4a5..462034041 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,6 @@ -From 7acbb86b5d95709a6d87b898df5783c25fbb2d26 Mon Sep 17 00:00:00 2001 From: Andre Mauricio Zelak Date: Mon, 12 Jun 2023 17:30:57 -0300 -Subject: [PATCH 30/58] pmc_agent: Simplify the method that gets of the number +Subject: [PATCH 30/59] 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 @@ -101,6 +100,3 @@ index 9d8bd1c..f0e2c7a 100644 /** * Gets the TAI-UTC offset. * @param agent Pointer to a PMC instance obtained via @ref pmc_agent_create(). --- -2.30.2 - 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 ac11e4b9a..9e9ce958f 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,6 @@ -From 25d6be54bba7b2e9871da9700103a483ff355892 Mon Sep 17 00:00:00 2001 From: Andre Mauricio Zelak Date: Mon, 12 Jun 2023 17:32:27 -0300 -Subject: [PATCH 31/58] pmc_agent: Let the update method poll for push events. +Subject: [PATCH 31/59] pmc_agent: Let the update method poll for push events. Signed-off-by: Richard Cochran @@ -52,6 +51,3 @@ index f0e2c7a..dd34d30 100644 * - Any active port state subscription will be renewed. * - The port state notification callback might be invoked. * --- -2.30.2 - 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 800a9bcf9..35d032211 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,6 @@ -From fdccd5ec965dee65d021eba76a1e75d28197be02 Mon Sep 17 00:00:00 2001 From: Andre Mauricio Zelak Date: Mon, 12 Jun 2023 17:51:10 -0300 -Subject: [PATCH 32/58] phc2sys: Fix regression in the automatic mode. +Subject: [PATCH 32/59] 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 @@ -32,6 +31,3 @@ index 6e6627d..623f300 100644 break; } out: --- -2.30.2 - 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 9dc99458d..b68b7be60 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,6 @@ -From 844bd2a0cb524079e5878cbdd7b24b1539970aaa Mon Sep 17 00:00:00 2001 From: Andre Mauricio Zelak Date: Mon, 12 Jun 2023 17:57:11 -0300 -Subject: [PATCH 33/58] Implement push notification for TIME_STATUS_NP +Subject: [PATCH 33/59] Implement push notification for TIME_STATUS_NP Subscribers to NOTIFY_TIME_SYNC will be notified on every clock synchronization. @@ -183,6 +182,3 @@ index a117904..c5cd992 100644 } pmc_send_set_action(pmc, code, &sen, sizeof(sen)); break; --- -2.30.2 - 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 65026ce73..2dc4f5abe 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,6 @@ -From 2a1a37e5617f9db8b7da67b87544afee2096cf69 Mon Sep 17 00:00:00 2001 From: Andre Mauricio Zelak Date: Mon, 12 Jun 2023 18:16:31 -0300 -Subject: [PATCH 34/58] clock: Rename UDS variables to read-write. +Subject: [PATCH 34/59] 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 @@ -209,6 +208,3 @@ index f048771..d653c33 100644 if (EV_STATE_DECISION_EVENT == event) { c->sde = 1; } --- -2.30.2 - 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 398dd5150..aee032750 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,6 @@ -From c0f92de7977b4e11870865eabdb1b7d0b8a9d725 Mon Sep 17 00:00:00 2001 From: Andre Mauricio Zelak Date: Mon, 12 Jun 2023 18:18:29 -0300 -Subject: [PATCH 35/58] clock: Add read-only UDS port for monitoring. +Subject: [PATCH 35/59] 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. @@ -19,10 +18,10 @@ Signed-off-by: Miroslav Lichvar [commit 6823e077b2466dcc3c7cbce8ab384b0ef9a62811 upstream] Signed-off-by: Andre Mauricio Zelak --- - clock.c | 72 +++++++++++++++++++++++++++++++++++++-------- + clock.c | 72 +++++++++++++++++++++++++++++++++++++++++++---------- config.c | 1 + configs/default.cfg | 1 + - ptp4l.8 | 6 ++++ + ptp4l.8 | 6 +++++ 4 files changed, 67 insertions(+), 13 deletions(-) diff --git a/clock.c b/clock.c @@ -287,6 +286,3 @@ index b179b81..f9bd228 100644 .B dscp_event Defines the Differentiated Services Codepoint (DSCP) to be used for PTP event messages. Must be a value between 0 and 63. There are several media --- -2.30.2 - 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 dd2375235..97c050af2 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,6 @@ -From 8307227fcd921d1025361d0c345b491258f9d190 Mon Sep 17 00:00:00 2001 From: Andre Mauricio Zelak Date: Mon, 12 Jun 2023 18:20:50 -0300 -Subject: [PATCH 36/58] Rename management ID macros. +Subject: [PATCH 36/59] 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 @@ -12,14 +11,14 @@ Signed-off-by: Richard Cochran [commit d86eaa157a0af7d807fc44ce6d91c34084e6902f upstream] Signed-off-by: Andre Mauricio Zelak --- - clock.c | 130 +++++++++++++++++++------------------- + clock.c | 130 ++++++++++++++++++++++---------------------- phc2sys.c | 2 +- - pmc.c | 61 +++++++++--------- + pmc.c | 61 +++++++++++---------- pmc_agent.c | 14 ++--- - pmc_common.c | 172 ++++++++++++++++++++++++++------------------------- - port.c | 72 +++++++++++---------- - tlv.c | 62 +++++++++---------- - tlv.h | 132 +++++++++++++++++++-------------------- + pmc_common.c | 172 ++++++++++++++++++++++++++++++----------------------------- + port.c | 72 +++++++++++++------------ + tlv.c | 62 ++++++++++----------- + tlv.h | 132 ++++++++++++++++++++++----------------------- 8 files changed, 329 insertions(+), 316 deletions(-) diff --git a/clock.c b/clock.c @@ -1383,6 +1382,3 @@ index a205119..97615fd 100644 /* Values for the SYNCHRONIZATION_UNCERTAIN_NP management TLV */ #define SYNC_UNCERTAIN_DONTCARE 0xff --- -2.30.2 - 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 25b12105d..edfe020d3 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,6 @@ -From 644c90c0e341624e55ef49ab5b4c5a4d4008f63d Mon Sep 17 00:00:00 2001 From: Andre Mauricio Zelak Date: Sun, 18 Jun 2023 20:58:34 -0300 -Subject: [PATCH 37/58] Enhance phc2sys to accept multiple ptp4l inputs +Subject: [PATCH 37/59] 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 @@ -56,10 +55,10 @@ Signed-off-by: Andre Mauricio Zelak --- config.c | 17 +++ config.h | 2 + - phc2sys.c | 337 +++++++++++++++++++++++++++++++++++++--------------- + phc2sys.c | 337 ++++++++++++++++++++++++++++++++++++++++++------------------ pmc_agent.c | 17 --- pmc_agent.h | 21 +++- - uds.c | 19 ++- + uds.c | 19 +++- 6 files changed, 294 insertions(+), 119 deletions(-) diff --git a/config.c b/config.c @@ -759,6 +758,3 @@ index 641a672..57d4796 100644 strncpy(sa.sun_path, uds_path, sizeof(sa.sun_path) - 1); uds->address.sun = sa; uds->address.len = sizeof(sa); --- -2.30.2 - 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 6f4077c5d..3dde71b87 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,6 @@ -From c2dedaa40232ac3df88df6774d249e687f2f4e16 Mon Sep 17 00:00:00 2001 From: Andre Mauricio Zelak Date: Tue, 4 Jul 2023 17:27:50 -0300 -Subject: [PATCH 38/58] Best source selection algorithm +Subject: [PATCH 38/59] Best source selection algorithm An algorithm to select the best available clock and use it as clock source. @@ -84,9 +83,9 @@ Reviewed-by: Andre Fernando Zanella Kantek --- config.c | 7 ++ - phc2sys.c | 231 ++++++++++++++++++++++++++++++++++++++++++++++++++++ - pmc_agent.c | 20 +++++ - pmc_agent.h | 13 +++ + phc2sys.c | 231 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + pmc_agent.c | 20 ++++++ + pmc_agent.h | 13 ++++ 4 files changed, 271 insertions(+) diff --git a/config.c b/config.c @@ -436,6 +435,3 @@ index 5f25984..2bd7f02 100644 /** * Sets the TAI-UTC offset. * @param agent Pointer to a PMC instance obtained via @ref pmc_agent_create(). --- -2.30.2 - 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 eafce0c7d..dfd914e7c 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,6 @@ -From a7ecd33822f5d76918ccc0148249b7fdb05d11da Mon Sep 17 00:00:00 2001 From: Andre Mauricio Zelak Date: Sat, 8 Jul 2023 19:02:50 -0300 -Subject: [PATCH 39/58] Select best source clock after state changes +Subject: [PATCH 39/59] 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 @@ -65,8 +64,8 @@ Reviewed-by: Andre Fernando Zanella Kantek --- config.c | 1 + - phc2sys.c | 672 ++++++++++++++++++++++++++++++++++------------------ - pmc_agent.c | 39 ++- + phc2sys.c | 672 +++++++++++++++++++++++++++++++++++++++--------------------- + pmc_agent.c | 39 +++- pmc_agent.h | 6 +- 4 files changed, 481 insertions(+), 237 deletions(-) @@ -1031,6 +1030,3 @@ index 2bd7f02..8207c46 100644 /* Callback on message reception */ pmc_node_recv_subscribed_t *recv_subscribed; --- -2.30.2 - 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 ad5ab07b6..100ffbcb8 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,6 @@ -From e269f17d01c324e70fb3ef8b8e88c0e57ac78eb1 Mon Sep 17 00:00:00 2001 From: Andre Mauricio Zelak Date: Wed, 26 Jul 2023 15:08:15 -0300 -Subject: [PATCH 40/58] Forced lock a clock source in configuration +Subject: [PATCH 40/59] 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 @@ -32,7 +31,7 @@ Reviewed-by: Andre Fernando Zanella Kantek --- config.c | 2 +- - phc2sys.c | 105 ++++++++++++++++++++++++++++++++++++++---------------- + phc2sys.c | 105 +++++++++++++++++++++++++++++++++++++++++++------------------- 2 files changed, 75 insertions(+), 32 deletions(-) diff --git a/config.c b/config.c @@ -251,6 +250,3 @@ index 152e783..0b3f724 100644 } } --- -2.30.2 - 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 0f1cf7b87..9d6897cfc 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,6 @@ -From bf767f48955399f27294d15e8f14a1ab0f3223bd Mon Sep 17 00:00:00 2001 From: Andre Mauricio Zelak Date: Thu, 27 Jul 2023 14:22:47 -0300 -Subject: [PATCH 41/58] HA phc2sys com socket +Subject: [PATCH 41/59] HA phc2sys com socket A new communication path was created to retrieve status and to control the high availability algorithm. @@ -71,7 +70,7 @@ Reviewed-by: Andre Fernando Zanella Kantek --- config.c | 1 + - phc2sys.c | 231 ++++++++++++++++++++++++++++++++++++++++++++++++++---- + phc2sys.c | 231 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++----- 2 files changed, 216 insertions(+), 16 deletions(-) diff --git a/config.c b/config.c @@ -446,6 +445,3 @@ index 0b3f724..0bc3709 100644 pmc_agent_cleanup(&priv); clock_cleanup(&priv); port_cleanup(&priv); --- -2.30.2 - 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 4457cd80e..243b3c6ef 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,6 @@ -From 509fb3bfe38d8fafc6d4d14855d34bb985a15493 Mon Sep 17 00:00:00 2001 From: Andre Mauricio Zelak Date: Fri, 4 Aug 2023 15:44:12 -0300 -Subject: [PATCH 42/58] Commands 'enable lock' and 'disable lock. +Subject: [PATCH 42/59] 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 @@ -32,7 +31,7 @@ clock to be selected again. Signed-off-by: Andre Mauricio Zelak --- - phc2sys.c | 110 +++++++++++++++++++++++++++++++++++++++++++++--------- + phc2sys.c | 110 ++++++++++++++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 93 insertions(+), 17 deletions(-) diff --git a/phc2sys.c b/phc2sys.c @@ -188,6 +187,3 @@ index 0bc3709..f89dc23 100644 if (priv->forced_source_clock) { /* HA automatic clock selection is disabled */ --- -2.30.2 - 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 12ff88d62..80811c19a 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,6 @@ -From 6323af225d205564a16fefefda9674feaf53ead5 Mon Sep 17 00:00:00 2001 From: Andre Mauricio Zelak Date: Fri, 4 Aug 2023 19:01:57 -0300 -Subject: [PATCH 43/58] Commands 'enable source' and 'disable source'. +Subject: [PATCH 43/59] Commands 'enable source' and 'disable source'. These commands controls the list of clocks available to clock selection algorithm. @@ -47,7 +46,7 @@ Reviewed-by: Andre Fernando Zanella Kantek Signed-off-by: Andre Mauricio Zelak --- - phc2sys.c | 146 +++++++++++++++++++++++++++++++++++++++++++++++------- + phc2sys.c | 146 ++++++++++++++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 127 insertions(+), 19 deletions(-) diff --git a/phc2sys.c b/phc2sys.c @@ -283,6 +282,3 @@ index f89dc23..035ee21 100644 } } } --- -2.30.2 - 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 ebf377ce3..e26f16ffb 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,6 @@ -From 6384ddb80bf82998d058f61adc4350c88820fe5a Mon Sep 17 00:00:00 2001 From: Andre Mauricio Zelak Date: Mon, 7 Aug 2023 14:55:12 -0300 -Subject: [PATCH 44/58] Stream type phc2sys com socket +Subject: [PATCH 44/59] Stream type phc2sys com socket The type of the socket was changed from datagram to stream. @@ -30,7 +29,7 @@ Reviewed-by: Andre Fernando Zanella Kantek Signed-off-by: Andre Mauricio Zelak --- - phc2sys.c | 76 +++++++++++++++++++++++++++---------------------------- + phc2sys.c | 76 +++++++++++++++++++++++++++++++-------------------------------- 1 file changed, 38 insertions(+), 38 deletions(-) diff --git a/phc2sys.c b/phc2sys.c @@ -196,6 +195,3 @@ index 035ee21..a597014 100644 } free(buffer); --- -2.30.2 - 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 ae4774f06..e97e2a213 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,6 @@ -From 1c518663448b8c8aaf914151f54b860bd946cea4 Mon Sep 17 00:00:00 2001 From: Andre Mauricio Zelak Date: Tue, 8 Aug 2023 13:10:50 -0300 -Subject: [PATCH 45/58] Functions starts_with and str_at_column +Subject: [PATCH 45/59] Functions starts_with and str_at_column Renaming starts_with and str_at_column functions to match ptp4l code style. @@ -87,6 +86,3 @@ index a597014..6965162 100644 cnt = ha_handle_disable_source_msg(priv, cfg, buffer, response, HA_SCK_BUFFER_SIZE); } else { --- -2.30.2 - 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 5c08b05f6..57c94b588 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,6 @@ -From d14df9d1f0b239c2a5fbe587875448a2d10b12a6 Mon Sep 17 00:00:00 2001 From: Andre Mauricio Zelak Date: Tue, 8 Aug 2023 14:06:55 -0300 -Subject: [PATCH 46/58] Robustness improvements to phc2sys socket +Subject: [PATCH 46/59] 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 @@ -73,6 +72,3 @@ index 6965162..edc626f 100644 if (cnt < 0) { pr_err("ha_com_socket: send failed: %m"); return -errno; --- -2.30.2 - 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 981a8efcc..95e6c6857 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,6 @@ -From c20f9c9b992b7ecf0f5d2ac9f137b369352bbba2 Mon Sep 17 00:00:00 2001 From: Andre Mauricio Zelak Date: Mon, 7 Aug 2023 18:19:37 -0300 -Subject: [PATCH 47/58] phc2sys without -w option. +Subject: [PATCH 47/59] phc2sys without -w option. Fix bad clock and pmc initialization when -w command argument is not provided. @@ -105,6 +104,3 @@ index edc626f..065b7f0 100644 } if (ha_enabled && !priv.forced_source_clock) { --- -2.30.2 - diff --git a/base/linuxptp/debian/patches/0048-HA-domain-number.patch b/base/linuxptp/debian/patches/0048-HA-domain-number.patch index 1cdf1ce15..99a53219c 100644 --- a/base/linuxptp/debian/patches/0048-HA-domain-number.patch +++ b/base/linuxptp/debian/patches/0048-HA-domain-number.patch @@ -1,7 +1,6 @@ -From 2b78be90379bf767961bec1b3f99462c54036cbf Mon Sep 17 00:00:00 2001 From: Andre Mauricio Zelak Date: Mon, 21 Aug 2023 14:28:20 -0300 -Subject: [PATCH 48/58] HA domain number +Subject: [PATCH 48/59] HA domain number Support multiple domain numbers for each uds socket used in HA phc2sys. @@ -140,6 +139,3 @@ index 8207c46..38951b1 100644 int run_pmc_wait_sync(struct pmc_agent *agent, int timeout); void run_pmc_events(struct pmc_agent *agent); --- -2.30.2 - 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 c4e1fd489..9cf752241 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,6 @@ -From afb5e76b98d7528bb36b860f9f0a6a8f04b094f8 Mon Sep 17 00:00:00 2001 From: Andre Mauricio Zelak Date: Wed, 23 Aug 2023 19:18:08 -0300 -Subject: [PATCH 49/58] GM clock accuracy and offset scaled log variance +Subject: [PATCH 49/59] 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 @@ -66,8 +65,8 @@ is accepted. Signed-off-by: Andre Mauricio Zelak --- - config.c | 15 +++++------ - phc2sys.c | 75 +++++++++++++++++++++++++++++++++++-------------------- + config.c | 15 +++++++------ + phc2sys.c | 75 ++++++++++++++++++++++++++++++++++++++++----------------------- 2 files changed, 56 insertions(+), 34 deletions(-) diff --git a/config.c b/config.c @@ -258,6 +257,3 @@ index be7b07a..1dd8c0f 100644 } curlen += snprintf(response + curlen, resplen - curlen, --- -2.30.2 - 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 28bd1e824..509b3f610 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,6 @@ -From 0d36e8812291f5912d7344ff894976715baba53b Mon Sep 17 00:00:00 2001 From: Andre Mauricio Zelak Date: Tue, 29 Aug 2023 19:06:23 -0300 -Subject: [PATCH 50/58] Select matching requirements clock if active doesn't +Subject: [PATCH 50/59] Select matching requirements clock if active doesn't match them Fix clock selection algorithm behavior where a clock source starts @@ -75,6 +74,3 @@ index 1dd8c0f..5df89e5 100644 return NULL; } --- -2.30.2 - diff --git a/base/linuxptp/debian/patches/0051-Time-traceable-flag.patch b/base/linuxptp/debian/patches/0051-Time-traceable-flag.patch index e8ee090a4..43fbb709b 100644 --- a/base/linuxptp/debian/patches/0051-Time-traceable-flag.patch +++ b/base/linuxptp/debian/patches/0051-Time-traceable-flag.patch @@ -1,7 +1,6 @@ -From 9ecbddcccbeadabb8cef295dd540dadc26f03d5b Mon Sep 17 00:00:00 2001 From: Andre Mauricio Zelak Date: Wed, 30 Aug 2023 13:28:34 -0300 -Subject: [PATCH 51/58] Time traceable flag +Subject: [PATCH 51/59] Time traceable flag A new time traceable flag was added to pmc agent to store the current time traceable status. @@ -105,6 +104,3 @@ index 38951b1..4e70606 100644 int freq_traceable; bool new_tpds; unsigned int index; --- -2.30.2 - diff --git a/base/linuxptp/debian/patches/0052-Command-valid-sources.patch b/base/linuxptp/debian/patches/0052-Command-valid-sources.patch index 6c1bc1552..35e4ad06c 100644 --- a/base/linuxptp/debian/patches/0052-Command-valid-sources.patch +++ b/base/linuxptp/debian/patches/0052-Command-valid-sources.patch @@ -1,7 +1,6 @@ -From 2f4339ab555fdd90d5c5fd11296d5c17b19c37e3 Mon Sep 17 00:00:00 2001 From: Andre Mauricio Zelak Date: Wed, 30 Aug 2023 15:43:42 -0300 -Subject: [PATCH 52/58] Command 'valid sources' +Subject: [PATCH 52/59] 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 @@ -64,6 +63,3 @@ index 27ba630..9893675 100644 } else { cnt = snprintf((char*)response, HA_SCK_BUFFER_SIZE, "Error: Invalid command"); --- -2.30.2 - 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 index c90503f62..cb2babdd8 100644 --- 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 @@ -1,7 +1,6 @@ -From 76f07fac7536b525b74858dacc3e37f28583c703 Mon Sep 17 00:00:00 2001 From: Andre Mauricio Zelak Date: Thu, 31 Aug 2023 12:36:02 -0300 -Subject: [PATCH 53/58] GM time traceable check enabled by default +Subject: [PATCH 53/59] 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. @@ -35,6 +34,3 @@ index d405589..ef17463 100644 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.30.2 - diff --git a/base/linuxptp/debian/patches/0054-Disable-active-interface-failing.patch b/base/linuxptp/debian/patches/0054-Disable-active-interface-failing.patch index ce929345c..0643c3304 100644 --- a/base/linuxptp/debian/patches/0054-Disable-active-interface-failing.patch +++ b/base/linuxptp/debian/patches/0054-Disable-active-interface-failing.patch @@ -1,7 +1,6 @@ -From d43854295382f20697ffb067dde9b6f8d610d1f9 Mon Sep 17 00:00:00 2001 From: Andre Mauricio Zelak Date: Thu, 31 Aug 2023 16:05:15 -0300 -Subject: [PATCH 54/58] Disable active interface failing +Subject: [PATCH 54/59] 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 ' @@ -54,6 +53,3 @@ index 9893675..4120568 100644 best = clock; } } --- -2.30.2 - diff --git a/base/linuxptp/debian/patches/0055-Ignore-interface-in-conf-file-when-HA-is-disabled.patch b/base/linuxptp/debian/patches/0055-Ignore-interface-in-conf-file-when-HA-is-disabled.patch index 4cdc06bf8..4da33e202 100644 --- a/base/linuxptp/debian/patches/0055-Ignore-interface-in-conf-file-when-HA-is-disabled.patch +++ b/base/linuxptp/debian/patches/0055-Ignore-interface-in-conf-file-when-HA-is-disabled.patch @@ -1,7 +1,6 @@ -From a61444e795236013bfca2e45100a45e14f0474c9 Mon Sep 17 00:00:00 2001 From: Andre Mauricio Zelak Date: Thu, 4 Jan 2024 13:27:09 -0300 -Subject: [PATCH 55/58] Ignore interface in conf file when HA is disabled +Subject: [PATCH 55/59] Ignore interface in conf file when HA is disabled Fixed the behavior when HA is disabled, one interface has been configured and '-a' autoconfiguration option is enabled. The behavior before HA feature was @@ -47,6 +46,3 @@ index 4120568..1f6b6c2 100644 if (!ha_enabled && src_cnt > 1) { fprintf(stderr, "too many source clocks\n"); fprintf(stderr, "Use 'ha_enabled 1' to accept more than one source clock\n"); --- -2.30.2 - diff --git a/base/linuxptp/debian/patches/0056-Fixed-event-port-id-map.patch b/base/linuxptp/debian/patches/0056-Fixed-event-port-id-map.patch index 60123ac44..881a2a5d4 100644 --- a/base/linuxptp/debian/patches/0056-Fixed-event-port-id-map.patch +++ b/base/linuxptp/debian/patches/0056-Fixed-event-port-id-map.patch @@ -1,7 +1,6 @@ -From adfe866226b758f789a3127447d37e19f442311f Mon Sep 17 00:00:00 2001 From: Andre Mauricio Zelak Date: Mon, 15 Jan 2024 16:19:59 -0300 -Subject: [PATCH 56/58] Fixed event port id map +Subject: [PATCH 56/59] Fixed event port id map Fixed the port id map in the Port Data Set event handling. The port id is composed by port number and node index after the HA implementation. @@ -77,6 +76,3 @@ index 1f6b6c2..d89fb23 100644 if (!port) return -1; port->state = normalize_state(state); --- -2.30.2 - diff --git a/base/linuxptp/debian/patches/0057-Fix-uninitialized-variable-in-nmea_scan_rmc.patch b/base/linuxptp/debian/patches/0057-Fix-uninitialized-variable-in-nmea_scan_rmc.patch index 82c39d1d8..00fcfd834 100644 --- a/base/linuxptp/debian/patches/0057-Fix-uninitialized-variable-in-nmea_scan_rmc.patch +++ b/base/linuxptp/debian/patches/0057-Fix-uninitialized-variable-in-nmea_scan_rmc.patch @@ -1,7 +1,6 @@ -From 8dd4e2b6c8b99952296319a0e0c0e0f3e6160e32 Mon Sep 17 00:00:00 2001 From: cwalker Date: Fri, 1 Mar 2024 17:50:29 +0000 -Subject: [PATCH 57/58] Fix uninitialized variable in nmea_scan_rmc +Subject: [PATCH 57/59] Fix uninitialized variable in nmea_scan_rmc Initialize the tm_isdst variable to ensure that mktime does not fail on recent versions of glibc. @@ -19,7 +18,7 @@ Signed-off-by: cwalker 1 file changed, 1 insertion(+) diff --git a/nmea.c b/nmea.c -index dc865d0..d86d81c 100644 +index dc865d0..44c7c01 100644 --- a/nmea.c +++ b/nmea.c @@ -157,6 +157,7 @@ static int nmea_scan_rmc(struct nmea_parser *np, struct nmea_rmc *result) @@ -30,6 +29,3 @@ index dc865d0..d86d81c 100644 result->ts.tv_sec = mktime(&tm); result->ts.tv_nsec = msec * 1000000UL; result->fix_valid = status == 'A' ? true : false; --- -2.30.2 - diff --git a/base/linuxptp/debian/patches/0058-ts2phc-skip-updates-after-offset-spike.patch b/base/linuxptp/debian/patches/0058-ts2phc-skip-updates-after-offset-spike.patch index e235cb81a..200f0b94c 100644 --- a/base/linuxptp/debian/patches/0058-ts2phc-skip-updates-after-offset-spike.patch +++ b/base/linuxptp/debian/patches/0058-ts2phc-skip-updates-after-offset-spike.patch @@ -1,7 +1,6 @@ -From 0cb3bd52e6dd3680aa900045d3c837d1098d8da8 Mon Sep 17 00:00:00 2001 From: cwalker Date: Tue, 20 Feb 2024 17:25:17 +0000 -Subject: [PATCH 58/58] Implement logic to skip updates with offset spike. +Subject: [PATCH 58/59] Implement logic to skip updates with offset spike. This change allows ts2phc to be configured to ignore timing updates that have a large offset spike in order to mitigate the resulting timing @@ -29,8 +28,9 @@ Signed-off-by: cwalker ts2phc.c | 3 +++ ts2phc_slave.c | 26 ++++++++++++++++++++++++-- 3 files changed, 28 insertions(+), 2 deletions(-) + diff --git a/config.c b/config.c -index ef17463..b53d8f4 100644 +index ef17463..249c9ca 100644 --- a/config.c +++ b/config.c @@ -347,6 +347,7 @@ struct config_item config_tab[] = { @@ -42,7 +42,7 @@ index ef17463..b53d8f4 100644 static struct unicast_master_table *current_uc_mtab; diff --git a/ts2phc.c b/ts2phc.c -index 2342858..a59dc5f 100644 +index 2342858..5687c9b 100644 --- a/ts2phc.c +++ b/ts2phc.c @@ -15,6 +15,8 @@ @@ -63,7 +63,7 @@ index 2342858..a59dc5f 100644 STAILQ_FOREACH(iface, &cfg->interfaces, list) { if (1 == config_get_int(cfg, interface_name(iface), "ts2phc.master")) { diff --git a/ts2phc_slave.c b/ts2phc_slave.c -index 749efe5..126c502 100644 +index 749efe5..ab3f13b 100644 --- a/ts2phc_slave.c +++ b/ts2phc_slave.c @@ -29,6 +29,8 @@ @@ -136,5 +136,3 @@ index 749efe5..126c502 100644 return EXTTS_OK; } --- -2.30.2 diff --git a/base/linuxptp/debian/patches/0059-clock-Downgrade-log-message-about-failed-uds-forward.patch b/base/linuxptp/debian/patches/0059-clock-Downgrade-log-message-about-failed-uds-forward.patch new file mode 100644 index 000000000..ec79a3e40 --- /dev/null +++ b/base/linuxptp/debian/patches/0059-clock-Downgrade-log-message-about-failed-uds-forward.patch @@ -0,0 +1,38 @@ +From: Cole Walker +Date: Wed, 1 May 2024 17:56:14 +0000 +Subject: [PATCH 59/59] clock: Downgrade log message about failed uds forward. + +If multiple management clients are used in the network and ptp4l +responded at least once over UDS, it will try to forward all management +responses received from network to the last UDS client. ptp4l doesn't +track the messages and doesn't know if they are responses to the UDS +client or other clients in the network. If the UDS client is no longer +running (receiving messages on its address), ptp4l logs "uds port: +management forward failed" error message. With frequent management +requests in the network this can lead to flooding of the system log. + +Downgrade the error message to debug to disable it in the default log +level. + +Upstream linuxptp commit is: +772ec62f8e54dc3a4a10b7a5d92fa45f5994b807 + +Signed-off-by: Miroslav Lichvar +Signed-off-by: Cole Walker +--- + clock.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/clock.c b/clock.c +index 534b7e1..480901c 100644 +--- a/clock.c ++++ b/clock.c +@@ -1401,7 +1401,7 @@ static void clock_forward_mgmt_msg(struct clock *c, struct port *p, struct ptp_m + port_number(piter)); + } + if (clock_do_forward_mgmt(c, p, c->uds_rw_port, msg, &msg_ready)) +- pr_err("uds port: management forward failed"); ++ pr_debug("uds port: management forward failed"); + if (msg_ready) { + msg_post_recv(msg, pdulen); + msg->management.boundaryHops++; diff --git a/base/linuxptp/debian/patches/series b/base/linuxptp/debian/patches/series index 8f7252e07..fef7a1e80 100644 --- a/base/linuxptp/debian/patches/series +++ b/base/linuxptp/debian/patches/series @@ -55,4 +55,5 @@ 0055-Ignore-interface-in-conf-file-when-HA-is-disabled.patch 0056-Fixed-event-port-id-map.patch 0057-Fix-uninitialized-variable-in-nmea_scan_rmc.patch -0058-ts2phc-skip-updates-after-offset-spike.patch \ No newline at end of file +0058-ts2phc-skip-updates-after-offset-spike.patch +0059-clock-Downgrade-log-message-about-failed-uds-forward.patch