Merge "Fix uninitialized ts2phc variable in nmea_scan_rmc"

This commit is contained in:
Zuul 2024-03-04 17:15:44 +00:00 committed by Gerrit Code Review
commit 10ebdfe1c2
58 changed files with 216 additions and 193 deletions

View File

@ -1,7 +1,8 @@
From 63b43924294da6cb177d0509120b2e957580441c Mon Sep 17 00:00:00 2001 From edb8d92c8e3379c6b764eb033a1d872dee3c8802 Mon Sep 17 00:00:00 2001
From: Miroslav Lichvar <mlichvar@redhat.com> From: Miroslav Lichvar <mlichvar@redhat.com>
Date: Mon, 31 May 2021 11:07:52 +0200 Date: Mon, 31 May 2021 11:07:52 +0200
Subject: [PATCH 1/56] clock: Reset state when switching port with same best clock. Subject: [PATCH 01/57] 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 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 change (e.g. a passive port is activated on link failure), reset the
@ -31,5 +32,5 @@ index a66d189..96453f4 100644
tsproc_reset(c->tsproc, 1); tsproc_reset(c->tsproc, 1);
if (!tmv_is_zero(c->initial_delay)) if (!tmv_is_zero(c->initial_delay))
-- --
2.25.1 2.30.2

View File

@ -1,10 +1,7 @@
From 1779482f39e6513995b13fdbd350f7aee8495b7e Mon Sep 17 00:00:00 2001 From cef81731404b339517e277bab9c0285ee239f065 Mon Sep 17 00:00:00 2001
Message-Id: <1779482f39e6513995b13fdbd350f7aee8495b7e.1630418391.git.Jim.Somerville@windriver.com>
In-Reply-To: <0389752e3aecf8d2b2743f16ce1408a58088bea9.1630418391.git.Jim.Somerville@windriver.com>
References: <0389752e3aecf8d2b2743f16ce1408a58088bea9.1630418391.git.Jim.Somerville@windriver.com>
From: Miroslav Lichvar <mlichvar@redhat.com> From: Miroslav Lichvar <mlichvar@redhat.com>
Date: Mon, 31 May 2021 11:07:53 +0200 Date: Mon, 31 May 2021 11:07:53 +0200
Subject: [PATCH 2/56] clock: Reset clock check on best clock/port change. Subject: [PATCH 02/57] clock: Reset clock check on best clock/port change.
Reset the clock check when the best clock or port changes, together with Reset the clock check when the best clock or port changes, together with
the other state like current estimated delay and frequency. This avoids the other state like current estimated delay and frequency. This avoids
@ -23,10 +20,10 @@ Signed-off-by: Andre Mauricio Zelak <andre.zelak@windriver.com>
3 files changed, 16 insertions(+), 1 deletion(-) 3 files changed, 16 insertions(+), 1 deletion(-)
diff --git a/clock.c b/clock.c diff --git a/clock.c b/clock.c
index d955710..49bd4a9 100644 index 96453f4..437cd1c 100644
--- a/clock.c --- a/clock.c
+++ b/clock.c +++ b/clock.c
@@ -1911,6 +1911,8 @@ static void handle_state_decision_event(struct clock *c) @@ -1859,6 +1859,8 @@ static void handle_state_decision_event(struct clock *c)
if (!cid_eq(&best_id, &c->best_id) || best != c->best) { if (!cid_eq(&best_id, &c->best_id) || best != c->best) {
clock_freq_est_reset(c); clock_freq_est_reset(c);
@ -75,5 +72,5 @@ index 78aca48..1ff86eb 100644
* Perform the sanity check on a time stamp. * Perform the sanity check on a time stamp.
* @param cc Pointer to a clock check obtained via @ref clockcheck_create(). * @param cc Pointer to a clock check obtained via @ref clockcheck_create().
-- --
2.29.2 2.30.2

View File

@ -1,10 +1,7 @@
From a1ed560a712d611edf8b47756bc56542a57bff7d Mon Sep 17 00:00:00 2001 From 7a507ff333c3c8046e84ca605ba4d386614c3a99 Mon Sep 17 00:00:00 2001
Message-Id: <a1ed560a712d611edf8b47756bc56542a57bff7d.1630418391.git.Jim.Somerville@windriver.com>
In-Reply-To: <0389752e3aecf8d2b2743f16ce1408a58088bea9.1630418391.git.Jim.Somerville@windriver.com>
References: <0389752e3aecf8d2b2743f16ce1408a58088bea9.1630418391.git.Jim.Somerville@windriver.com>
From: Miroslav Lichvar <mlichvar@redhat.com> From: Miroslav Lichvar <mlichvar@redhat.com>
Date: Mon, 31 May 2021 11:07:54 +0200 Date: Mon, 31 May 2021 11:07:54 +0200
Subject: [PATCH 3/56] port: Don't check timestamps from non-slave ports. Subject: [PATCH 03/57] port: Don't check timestamps from non-slave ports.
Don't perform the sanity check on receive timestamps from ports in Don't perform the sanity check on receive timestamps from ports in
non-slave states to avoid false positives in the jbod mode, where non-slave states to avoid false positives in the jbod mode, where
@ -20,10 +17,10 @@ Signed-off-by: Andre Mauricio Zelak <andre.zelak@windriver.com>
1 file changed, 4 insertions(+), 1 deletion(-) 1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/port.c b/port.c diff --git a/port.c b/port.c
index 9e9d484..387d5a2 100644 index fa49663..8cf3f59 100644
--- a/port.c --- a/port.c
+++ b/port.c +++ b/port.c
@@ -2731,7 +2731,10 @@ static enum fsm_event bc_event(struct port *p, int fd_index) @@ -2714,7 +2714,10 @@ static enum fsm_event bc_event(struct port *p, int fd_index)
} }
if (msg_sots_valid(msg)) { if (msg_sots_valid(msg)) {
ts_add(&msg->hwts.ts, -p->rx_timestamp_offset); ts_add(&msg->hwts.ts, -p->rx_timestamp_offset);
@ -36,5 +33,5 @@ index 9e9d484..387d5a2 100644
switch (msg_type(msg)) { switch (msg_type(msg)) {
-- --
2.29.2 2.30.2

View File

@ -1,10 +1,7 @@
From 5caa4d0a9161e6a33e269c8e445b322e4437e6b3 Mon Sep 17 00:00:00 2001 From ab617c7f70e8d8bc66673412a536fc1a8cf3584c Mon Sep 17 00:00:00 2001
Message-Id: <5caa4d0a9161e6a33e269c8e445b322e4437e6b3.1630418391.git.Jim.Somerville@windriver.com>
In-Reply-To: <0389752e3aecf8d2b2743f16ce1408a58088bea9.1630418391.git.Jim.Somerville@windriver.com>
References: <0389752e3aecf8d2b2743f16ce1408a58088bea9.1630418391.git.Jim.Somerville@windriver.com>
From: Miroslav Lichvar <mlichvar@redhat.com> From: Miroslav Lichvar <mlichvar@redhat.com>
Date: Mon, 31 May 2021 11:07:55 +0200 Date: Mon, 31 May 2021 11:07:55 +0200
Subject: [PATCH 4/56] port: Don't renew raw transport. Subject: [PATCH 04/57] port: Don't renew raw transport.
Renewing of the transport on announce/sync timeout is needed in the Renewing of the transport on announce/sync timeout is needed in the
client-only mode to avoid getting stuck with a broken multicast socket client-only mode to avoid getting stuck with a broken multicast socket
@ -25,10 +22,10 @@ Signed-off-by: Andre Mauricio Zelak <andre.zelak@windriver.com>
1 file changed, 6 insertions(+) 1 file changed, 6 insertions(+)
diff --git a/port.c b/port.c diff --git a/port.c b/port.c
index 387d5a2..d26b87f 100644 index 8cf3f59..f22bff4 100644
--- a/port.c --- a/port.c
+++ b/port.c +++ b/port.c
@@ -1805,6 +1805,12 @@ static int port_renew_transport(struct port *p) @@ -1796,6 +1796,12 @@ static int port_renew_transport(struct port *p)
if (!port_is_enabled(p)) { if (!port_is_enabled(p)) {
return 0; return 0;
} }
@ -42,5 +39,5 @@ index 387d5a2..d26b87f 100644
port_clear_fda(p, FD_FIRST_TIMER); port_clear_fda(p, FD_FIRST_TIMER);
res = transport_open(p->trp, p->iface, &p->fda, p->timestamping); res = transport_open(p->trp, p->iface, &p->fda, p->timestamping);
-- --
2.29.2 2.30.2

View File

@ -1,10 +1,7 @@
From 3bf4f1784fa0a03a252961f400a78d963773f8f5 Mon Sep 17 00:00:00 2001 From 01abb33c0851f89e4f96c757c928366df75484ab Mon Sep 17 00:00:00 2001
Message-Id: <3bf4f1784fa0a03a252961f400a78d963773f8f5.1630611367.git.Jim.Somerville@windriver.com>
In-Reply-To: <0389752e3aecf8d2b2743f16ce1408a58088bea9.1630611367.git.Jim.Somerville@windriver.com>
References: <0389752e3aecf8d2b2743f16ce1408a58088bea9.1630611367.git.Jim.Somerville@windriver.com>
From: Miroslav Lichvar <mlichvar@redhat.com> From: Miroslav Lichvar <mlichvar@redhat.com>
Date: Mon, 31 May 2021 11:07:56 +0200 Date: Mon, 31 May 2021 11:07:56 +0200
Subject: [PATCH 5/56] clockcheck: Increase minimum interval. Subject: [PATCH 05/57] clockcheck: Increase minimum interval.
Increase the minimum check interval to 1 second to measure the frequency Increase the minimum check interval to 1 second to measure the frequency
offset more accurately and with default configuration make false offset more accurately and with default configuration make false
@ -33,5 +30,5 @@ index d0b4714..f0141be 100644
struct clockcheck { struct clockcheck {
-- --
2.29.2 2.30.2

View File

@ -1,10 +1,7 @@
From 3a6de7b6208ccc64a20474db15abaac08e99d10b Mon Sep 17 00:00:00 2001 From 901b4f776d7cf483e0f229eb10f78d14b9be5f17 Mon Sep 17 00:00:00 2001
Message-Id: <3a6de7b6208ccc64a20474db15abaac08e99d10b.1630418391.git.Jim.Somerville@windriver.com>
In-Reply-To: <0389752e3aecf8d2b2743f16ce1408a58088bea9.1630418391.git.Jim.Somerville@windriver.com>
References: <0389752e3aecf8d2b2743f16ce1408a58088bea9.1630418391.git.Jim.Somerville@windriver.com>
From: Cole Walker <cole.walker@windriver.com> From: Cole Walker <cole.walker@windriver.com>
Date: Wed, 23 Jun 2021 11:14:41 -0400 Date: Wed, 23 Jun 2021 11:14:41 -0400
Subject: [PATCH 6/56] Add option to disable default port selection in phc2sys Subject: [PATCH 06/57] Add option to disable default port selection in phc2sys
This change serves to address an issue in phc2sys This change serves to address an issue in phc2sys
where the local ptp clocks are not synced together properly if the local where the local ptp clocks are not synced together properly if the local
@ -38,10 +35,10 @@ Signed-off-by: Andre Mauricio Zelak <andre.zelak@windriver.com>
2 files changed, 13 insertions(+), 3 deletions(-) 2 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/config.c b/config.c diff --git a/config.c b/config.c
index ef5e833..cab7e4f 100644 index d237de9..fea7f67 100644
--- a/config.c --- a/config.c
+++ b/config.c +++ b/config.c
@@ -333,6 +333,7 @@ struct config_item config_tab[] = { @@ -331,6 +331,7 @@ struct config_item config_tab[] = {
GLOB_ITEM_INT("utc_offset", CURRENT_UTC_OFFSET, 0, INT_MAX), GLOB_ITEM_INT("utc_offset", CURRENT_UTC_OFFSET, 0, INT_MAX),
GLOB_ITEM_INT("verbose", 0, 0, 1), GLOB_ITEM_INT("verbose", 0, 0, 1),
GLOB_ITEM_INT("write_phase_mode", 0, 0, 1), GLOB_ITEM_INT("write_phase_mode", 0, 0, 1),
@ -118,5 +115,5 @@ index a36cbe0..44d6872 100644
if (autocfg) { if (autocfg) {
if (init_pmc(cfg, &priv)) if (init_pmc(cfg, &priv))
-- --
2.29.2 2.30.2

View File

@ -1,7 +1,7 @@
From 6428c2628c013c408ec09355ad37eb12fa6bb20f Mon Sep 17 00:00:00 2001 From 347548500e39e21037b4afea6179d5101695b28f Mon Sep 17 00:00:00 2001
From: Miroslav Lichvar <mlichvar@redhat.com> From: Miroslav Lichvar <mlichvar@redhat.com>
Date: Wed, 18 May 2022 11:33:35 +0200 Date: Wed, 18 May 2022 11:33:35 +0200
Subject: [PATCH 7/56] sysoff: Change sysoff_measure() to return errno. Subject: [PATCH 07/57] sysoff: Change sysoff_measure() to return errno.
Return -errno from failed ioctl instead of the SYSOFF_* enum from the Return -errno from failed ioctl instead of the SYSOFF_* enum from the
measurement functions to allow the callers to check for specific errors. measurement functions to allow the callers to check for specific errors.
@ -90,5 +90,5 @@ index e4de919..5480f8f 100644
int sysoff_measure(int fd, int method, int n_samples, int sysoff_measure(int fd, int method, int n_samples,
int64_t *result, uint64_t *ts, int64_t *delay); int64_t *result, uint64_t *ts, int64_t *delay);
-- --
2.29.2 2.30.2

View File

@ -1,7 +1,7 @@
From 38a530d94fc5aa73bde424d05e2e38348e64d7e5 Mon Sep 17 00:00:00 2001 From 583e206c66f7af8847851530daf0728f9074b3a3 Mon Sep 17 00:00:00 2001
From: Miroslav Lichvar <mlichvar@redhat.com> From: Miroslav Lichvar <mlichvar@redhat.com>
Date: Wed, 18 May 2022 11:33:36 +0200 Date: Wed, 18 May 2022 11:33:36 +0200
Subject: [PATCH 8/56] sysoff: Change log level of ioctl error messages. Subject: [PATCH 08/57] sysoff: Change log level of ioctl error messages.
Change the log level of ioctl error messages to the error level to make Change the log level of ioctl error messages to the error level to make
them visible in default configuration, with the exception of EOPNOTSUPP them visible in default configuration, with the exception of EOPNOTSUPP
@ -63,5 +63,5 @@ index 5d3b907..a425275 100644
} }
*result = sysoff_estimate(pso.ts, 0, n_samples, ts, delay); *result = sysoff_estimate(pso.ts, 0, n_samples, ts, delay);
-- --
2.29.2 2.30.2

View File

@ -1,7 +1,7 @@
From 11ae077e31d9957df01aacfa17eea5b5d548b249 Mon Sep 17 00:00:00 2001 From c36e970db481dc1d5482386418f046f46b25f645 Mon Sep 17 00:00:00 2001
From: Miroslav Lichvar <mlichvar@redhat.com> From: Miroslav Lichvar <mlichvar@redhat.com>
Date: Wed, 18 May 2022 11:33:37 +0200 Date: Wed, 18 May 2022 11:33:37 +0200
Subject: [PATCH 9/56] sysoff: Retry on EBUSY when probing supported ioctls. Subject: [PATCH 09/57] sysoff: Retry on EBUSY when probing supported ioctls.
Handle EBUSY when probing support for a PTP_SYS_OFFSET ioctl. Try each 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 ioctl up to three times before giving up on it to make the detection
@ -49,5 +49,5 @@ index a425275..fc1f7ca 100644
return SYSOFF_RUN_TIME_MISSING; return SYSOFF_RUN_TIME_MISSING;
-- --
2.29.2 2.30.2

View File

@ -1,7 +1,8 @@
From e4fd6a930213e6f0f009eb070d51b1e14db60d1b Mon Sep 17 00:00:00 2001 From 2df24f632e8bde2022cc2005f4a8f2cb25181ee1 Mon Sep 17 00:00:00 2001
From: Miroslav Lichvar <mlichvar@redhat.com> From: Miroslav Lichvar <mlichvar@redhat.com>
Date: Wed, 18 May 2022 11:33:38 +0200 Date: Wed, 18 May 2022 11:33:38 +0200
Subject: [PATCH 10/56] phc2sys: Don't exit when reading of PHC fails with EBUSY. Subject: [PATCH 10/57] 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 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 driver returns EBUSY when it fails to get a lock. Continue in the loop
@ -80,5 +81,5 @@ index 44d6872..7959015 100644
} }
} }
-- --
2.29.2 2.30.2

View File

@ -1,7 +1,7 @@
From 0c5c39a8cd3675d91e872a75d75854907950957d Mon Sep 17 00:00:00 2001 From df691061d979ba6aa921b455f570365417e5700e Mon Sep 17 00:00:00 2001
From: Andre Mauricio Zelak <andre.zelak@windriver.com> From: Andre Mauricio Zelak <andre.zelak@windriver.com>
Date: Mon, 12 Jun 2023 13:47:47 -0300 Date: Mon, 12 Jun 2023 13:47:47 -0300
Subject: [PATCH 11/56] phc2sys: extract PMC functionality into a smaller Subject: [PATCH 11/57] phc2sys: extract PMC functionality into a smaller
struct pmc_node struct pmc_node
This creates a smaller structure within phc2sys_private, which embeds This creates a smaller structure within phc2sys_private, which embeds
@ -637,5 +637,5 @@ index 7959015..86b9822 100644
port_cleanup(&priv); port_cleanup(&priv);
config_destroy(cfg); config_destroy(cfg);
-- --
2.25.1 2.30.2

View File

@ -1,7 +1,7 @@
From 87d8e7281e3e66813d0c669bea0b5335a8cbb6b6 Mon Sep 17 00:00:00 2001 From ab9b7dfcc503c21bce09ec4096498bc689c6a9ff Mon Sep 17 00:00:00 2001
From: Andre Mauricio Zelak <andre.zelak@windriver.com> From: Andre Mauricio Zelak <andre.zelak@windriver.com>
Date: Mon, 12 Jun 2023 13:59:48 -0300 Date: Mon, 12 Jun 2023 13:59:48 -0300
Subject: [PATCH 12/56] phc2sys: make PMC functions non-static Subject: [PATCH 12/57] phc2sys: make PMC functions non-static
In preparation of a trivial movement of code to pmc_common.c, remove the 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 "static" keyword from the functions that will end up there, since they
@ -139,5 +139,5 @@ index 86b9822..d5b8e71 100644
struct timespec tp; struct timespec tp;
uint64_t ts; uint64_t ts;
-- --
2.25.1 2.30.2

View File

@ -1,7 +1,7 @@
From ba9c2ea0e1f7a96093bca1147d4745a7d0ce17b6 Mon Sep 17 00:00:00 2001 From 6f7e16dac861cb6bc1d2063c3fb47a9e6da4dc75 Mon Sep 17 00:00:00 2001
From: Andre Mauricio Zelak <andre.zelak@windriver.com> From: Andre Mauricio Zelak <andre.zelak@windriver.com>
Date: Mon, 12 Jun 2023 14:34:19 -0300 Date: Mon, 12 Jun 2023 14:34:19 -0300
Subject: [PATCH 13/56] phc2sys: break out pmc code into pmc_common.c Subject: [PATCH 13/57] phc2sys: break out pmc code into pmc_common.c
The code through which phc2sys sends various PTP management messages to The code through which phc2sys sends various PTP management messages to
ptp4l via pmc can be reused. ptp4l via pmc can be reused.
@ -837,5 +837,5 @@ index 9fa72de..476ccea 100644
+ +
#endif #endif
-- --
2.25.1 2.30.2

View File

@ -1,7 +1,7 @@
From c00e75286b2ad882cf8e89549ea58e438c877f95 Mon Sep 17 00:00:00 2001 From 4d8fa2e0d4ed8c0ca79ee9123d8a5963a2a13ce5 Mon Sep 17 00:00:00 2001
From: Andre Mauricio Zelak <andre.zelak@windriver.com> From: Andre Mauricio Zelak <andre.zelak@windriver.com>
Date: Mon, 12 Jun 2023 14:40:59 -0300 Date: Mon, 12 Jun 2023 14:40:59 -0300
Subject: [PATCH 14/56] Introduce the PMC agent module. Subject: [PATCH 14/57] Introduce the PMC agent module.
The logic for placing PTP management queries migrated out of phc2sys into 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 pmc_common in order to be shared with other programs in the future. This
@ -909,5 +909,5 @@ index 476ccea..8bea2e0 100644
- -
#endif #endif
-- --
2.25.1 2.30.2

View File

@ -1,7 +1,7 @@
From 82258917b8de7110545f3d4f99d3ac88a609f019 Mon Sep 17 00:00:00 2001 From 77a246c6d6a865f11fe2fac14cdc9fa2746a06a2 Mon Sep 17 00:00:00 2001
From: Andre Mauricio Zelak <andre.zelak@windriver.com> From: Andre Mauricio Zelak <andre.zelak@windriver.com>
Date: Mon, 12 Jun 2023 14:47:36 -0300 Date: Mon, 12 Jun 2023 14:47:36 -0300
Subject: [PATCH 15/56] pmc_agent: Rename pmc_node to something more Subject: [PATCH 15/57] pmc_agent: Rename pmc_node to something more
descriptive. descriptive.
Signed-off-by: Richard Cochran <richardcochran@gmail.com> Signed-off-by: Richard Cochran <richardcochran@gmail.com>
@ -208,5 +208,5 @@ index 90245b1..10ef4b5 100644
void *get_mgt_data(struct ptp_message *msg); void *get_mgt_data(struct ptp_message *msg);
-- --
2.25.1 2.30.2

View File

@ -1,7 +1,7 @@
From f6d7bb0a62f15fcca0343c42891f7e056f502949 Mon Sep 17 00:00:00 2001 From f6de4c4e2c1ae6d9762778baf18031fc42251657 Mon Sep 17 00:00:00 2001
From: Andre Mauricio Zelak <andre.zelak@windriver.com> From: Andre Mauricio Zelak <andre.zelak@windriver.com>
Date: Mon, 12 Jun 2023 14:55:29 -0300 Date: Mon, 12 Jun 2023 14:55:29 -0300
Subject: [PATCH 16/56] pmc_agent: Hide the implementation. Subject: [PATCH 16/57] pmc_agent: Hide the implementation.
The PMC agent's implementation should not be exposed to its users. This 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 patch hides the details and provides a method to create an instance. In
@ -444,5 +444,5 @@ index 10ef4b5..c0b4525 100644
+ +
+#endif +#endif
-- --
2.25.1 2.30.2

View File

@ -1,7 +1,7 @@
From 4ebb69f5c55e7f1f08d1a73df87d42fe70147ec9 Mon Sep 17 00:00:00 2001 From 8946d8e8eba908a213ba46844d697d7ff26e9bb6 Mon Sep 17 00:00:00 2001
From: Andre Mauricio Zelak <andre.zelak@windriver.com> From: Andre Mauricio Zelak <andre.zelak@windriver.com>
Date: Mon, 12 Jun 2023 14:58:09 -0300 Date: Mon, 12 Jun 2023 14:58:09 -0300
Subject: [PATCH 17/56] Find a better home for the management TLV ID helper Subject: [PATCH 17/57] Find a better home for the management TLV ID helper
function. function.
Signed-off-by: Richard Cochran <richardcochran@gmail.com> Signed-off-by: Richard Cochran <richardcochran@gmail.com>
@ -92,5 +92,5 @@ index c0b4525..09249ff 100644
-- --
2.25.1 2.30.2

View File

@ -1,7 +1,7 @@
From 6e4f8ea8531b7678a44a9b3ed021fda94eccdc27 Mon Sep 17 00:00:00 2001 From cd72c765ee2acc49ca5b78cd0e2c9659f456434c Mon Sep 17 00:00:00 2001
From: Andre Mauricio Zelak <andre.zelak@windriver.com> From: Andre Mauricio Zelak <andre.zelak@windriver.com>
Date: Mon, 12 Jun 2023 14:59:57 -0300 Date: Mon, 12 Jun 2023 14:59:57 -0300
Subject: [PATCH 18/56] Find a better home for the management TLV data helper Subject: [PATCH 18/57] Find a better home for the management TLV data helper
function. function.
Signed-off-by: Richard Cochran <richardcochran@gmail.com> Signed-off-by: Richard Cochran <richardcochran@gmail.com>
@ -128,5 +128,5 @@ index 09249ff..f3a26fe 100644
/** /**
-- --
2.25.1 2.30.2

View File

@ -1,7 +1,7 @@
From 95e4983c9ab517b9dda1faf171721f0dd877e076 Mon Sep 17 00:00:00 2001 From d798a871a0b27a953a80afa7b696a44cd8a93fdf Mon Sep 17 00:00:00 2001
From: Andre Mauricio Zelak <andre.zelak@windriver.com> From: Andre Mauricio Zelak <andre.zelak@windriver.com>
Date: Mon, 12 Jun 2023 15:04:11 -0300 Date: Mon, 12 Jun 2023 15:04:11 -0300
Subject: [PATCH 19/56] Introduce error codes for the run_pmc method. Subject: [PATCH 19/57] Introduce error codes for the run_pmc method.
The run_pmc function is used by several of the PMC agent methods, but it 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 breaks the pattern of returning zero on success. However, the user facing
@ -77,5 +77,5 @@ index 6e9c023..22d9c5b 100644
} }
-- --
2.25.1 2.30.2

View File

@ -1,7 +1,7 @@
From 8c1dd261683d27acba49e047d9f6da52dada3c98 Mon Sep 17 00:00:00 2001 From 479301925d24906f03b13821ee8bd6cafb58c8c5 Mon Sep 17 00:00:00 2001
From: Andre Mauricio Zelak <andre.zelak@windriver.com> From: Andre Mauricio Zelak <andre.zelak@windriver.com>
Date: Mon, 12 Jun 2023 15:08:01 -0300 Date: Mon, 12 Jun 2023 15:08:01 -0300
Subject: [PATCH 20/56] pmc_agent: Convert the subscribe method into the Subject: [PATCH 20/57] pmc_agent: Convert the subscribe method into the
canonical form. canonical form.
This patch renames the function to have the module prefix and corrects the This patch renames the function to have the module prefix and corrects the
@ -149,5 +149,5 @@ index f3a26fe..9dc684e 100644
* Tests whether the current UTC offset is traceable. * Tests whether the current UTC offset is traceable.
* @param agent Pointer to a PMC instance obtained via @ref pmc_agent_create(). * @param agent Pointer to a PMC instance obtained via @ref pmc_agent_create().
-- --
2.25.1 2.30.2

View File

@ -1,7 +1,7 @@
From 82a369b4fe44a7cea41fb0ccf408c02b1b6aa694 Mon Sep 17 00:00:00 2001 From f221d3e5b7d5ebac532a1d02f0cfb74fda6a237c Mon Sep 17 00:00:00 2001
From: Andre Mauricio Zelak <andre.zelak@windriver.com> From: Andre Mauricio Zelak <andre.zelak@windriver.com>
Date: Mon, 12 Jun 2023 15:17:26 -0300 Date: Mon, 12 Jun 2023 15:17:26 -0300
Subject: [PATCH 21/56] pmc_agent: Simplify the update method. Subject: [PATCH 21/57] pmc_agent: Simplify the update method.
The main method that causes the PMC agent to update its status takes a flag 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. that results in different behavior when push notifications are active.
@ -129,5 +129,5 @@ index 9dc684e..743818f 100644
int run_pmc_wait_sync(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); int run_pmc_get_number_ports(struct pmc_agent *agent, int timeout);
-- --
2.25.1 2.30.2

View File

@ -1,7 +1,7 @@
From 731e8938953e56578007a679dbaa29e9471650ac Mon Sep 17 00:00:00 2001 From f692885fbb0e1a1a379314b08d3108c1e54d3f4f Mon Sep 17 00:00:00 2001
From: Andre Mauricio Zelak <andre.zelak@windriver.com> From: Andre Mauricio Zelak <andre.zelak@windriver.com>
Date: Mon, 12 Jun 2023 15:18:36 -0300 Date: Mon, 12 Jun 2023 15:18:36 -0300
Subject: [PATCH 22/56] pmc_agent: Simplify logic in update method. Subject: [PATCH 22/57] pmc_agent: Simplify logic in update method.
If the pmc pointer is not set, then there is no need to read the time only 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 to later discard the result. This patch simplifies the flow by returning
@ -41,5 +41,5 @@ index dd509af..f30f174 100644
if (node->stay_subscribed) { if (node->stay_subscribed) {
renew_subscription(node, 0); renew_subscription(node, 0);
-- --
2.25.1 2.30.2

View File

@ -1,7 +1,7 @@
From 357e24c897e1e2d29cf011b3a38c3a6b2a7943c3 Mon Sep 17 00:00:00 2001 From 20cb57a86671fd1e60479de9e6ac0a5586ad5acd Mon Sep 17 00:00:00 2001
From: Andre Mauricio Zelak <andre.zelak@windriver.com> From: Andre Mauricio Zelak <andre.zelak@windriver.com>
Date: Mon, 12 Jun 2023 15:33:43 -0300 Date: Mon, 12 Jun 2023 15:33:43 -0300
Subject: [PATCH 23/56] pmc_agent: Remove bogus comparison between last update Subject: [PATCH 23/57] pmc_agent: Remove bogus comparison between last update
and now. and now.
The monotonic clock can never go backwards. If you take T1 and later T2 The monotonic clock can never go backwards. If you take T1 and later T2
@ -36,5 +36,5 @@ index f30f174..df3a562 100644
renew_subscription(node, 0); renew_subscription(node, 0);
} }
-- --
2.25.1 2.30.2

View File

@ -1,7 +1,7 @@
From d5421e4d4d86907648a59810ab9c27e739591971 Mon Sep 17 00:00:00 2001 From 4321cff2b53512d4027bc096bdef5df2610b18cf Mon Sep 17 00:00:00 2001
From: Andre Mauricio Zelak <andre.zelak@windriver.com> From: Andre Mauricio Zelak <andre.zelak@windriver.com>
Date: Mon, 12 Jun 2023 15:35:23 -0300 Date: Mon, 12 Jun 2023 15:35:23 -0300
Subject: [PATCH 24/56] pmc_agent: Perform time comparison using positive Subject: [PATCH 24/57] pmc_agent: Perform time comparison using positive
logic. logic.
In the update_pmc_node() method, reduce the expression In the update_pmc_node() method, reduce the expression
@ -39,5 +39,5 @@ index df3a562..ea6b3b7 100644
return 0; return 0;
-- --
2.25.1 2.30.2

View File

@ -1,7 +1,7 @@
From a304d4df86a76c187fc7074755fe9b5ad349efbe Mon Sep 17 00:00:00 2001 From 9136345c69038a22d9b548863fb6afe64e54958d Mon Sep 17 00:00:00 2001
From: Andre Mauricio Zelak <andre.zelak@windriver.com> From: Andre Mauricio Zelak <andre.zelak@windriver.com>
Date: Mon, 12 Jun 2023 15:36:38 -0300 Date: Mon, 12 Jun 2023 15:36:38 -0300
Subject: [PATCH 25/56] pmc_agent: Rename the update method and attempt to Subject: [PATCH 25/57] pmc_agent: Rename the update method and attempt to
document it. document it.
This patch renames the function to have the module prefix and tries to This patch renames the function to have the module prefix and tries to
@ -151,5 +151,5 @@ index 743818f..483a21b 100644
* Tests whether the current UTC offset is traceable. * Tests whether the current UTC offset is traceable.
* @param agent Pointer to a PMC instance obtained via @ref pmc_agent_create(). * @param agent Pointer to a PMC instance obtained via @ref pmc_agent_create().
-- --
2.25.1 2.30.2

View File

@ -1,7 +1,7 @@
From 5aacbe319db97907a15741005e2790bbf4c742a0 Mon Sep 17 00:00:00 2001 From 95d2fad84edea1397f3484e6570bcbb29509bacd Mon Sep 17 00:00:00 2001
From: Andre Mauricio Zelak <andre.zelak@windriver.com> From: Andre Mauricio Zelak <andre.zelak@windriver.com>
Date: Mon, 12 Jun 2023 15:37:46 -0300 Date: Mon, 12 Jun 2023 15:37:46 -0300
Subject: [PATCH 26/56] phc2sys: Fix null pointer de-reference in manual mode. Subject: [PATCH 26/57] phc2sys: Fix null pointer de-reference in manual mode.
If both the -w and -O command line options are specified (or when If both the -w and -O command line options are specified (or when
using -w when both source and destination clocks are PHCs), then using -w when both source and destination clocks are PHCs), then
@ -87,5 +87,5 @@ index 483a21b..0ed10f8 100644
* Gets the current leap adjustment. * Gets the current leap adjustment.
* @param agent Pointer to a PMC instance obtained via @ref pmc_agent_create(). * @param agent Pointer to a PMC instance obtained via @ref pmc_agent_create().
-- --
2.25.1 2.30.2

View File

@ -1,7 +1,7 @@
From b8188a4fd51bc8983e5d19f18fe37b8ca39d03a6 Mon Sep 17 00:00:00 2001 From 4f37561dad0e8b163691f68cfd101e798d39248a Mon Sep 17 00:00:00 2001
From: Andre Mauricio Zelak <andre.zelak@windriver.com> From: Andre Mauricio Zelak <andre.zelak@windriver.com>
Date: Mon, 12 Jun 2023 17:20:04 -0300 Date: Mon, 12 Jun 2023 17:20:04 -0300
Subject: [PATCH 27/56] pmc_agent: Convert the method that queries TAI-UTC Subject: [PATCH 27/57] pmc_agent: Convert the method that queries TAI-UTC
offset into the canonical form. offset into the canonical form.
This patch renames the function to have the module prefix and corrects the This patch renames the function to have the module prefix and corrects the
@ -178,5 +178,5 @@ index 0ed10f8..44326d2 100644
* Sets the TAI-UTC offset. * Sets the TAI-UTC offset.
* @param agent Pointer to a PMC instance obtained via @ref pmc_agent_create(). * @param agent Pointer to a PMC instance obtained via @ref pmc_agent_create().
-- --
2.25.1 2.30.2

View File

@ -1,7 +1,7 @@
From acdf74df9fa69b81c1e9332f10d4efcd3e9bae48 Mon Sep 17 00:00:00 2001 From b469ea325783cfe906bd7e28e63a7eb26b4cad96 Mon Sep 17 00:00:00 2001
From: Andre Mauricio Zelak <andre.zelak@windriver.com> From: Andre Mauricio Zelak <andre.zelak@windriver.com>
Date: Mon, 12 Jun 2023 17:23:29 -0300 Date: Mon, 12 Jun 2023 17:23:29 -0300
Subject: [PATCH 28/56] pmc_agent: Convert the method that queries the port Subject: [PATCH 28/57] pmc_agent: Convert the method that queries the port
properties. properties.
Prefix the function with the module name and correct the return code Prefix the function with the module name and correct the return code
@ -240,5 +240,5 @@ index 44326d2..ea37bf9 100644
* Queries the TAI-UTC offset and the current leap adjustment from the * Queries the TAI-UTC offset and the current leap adjustment from the
* ptp4l service. * ptp4l service.
-- --
2.25.1 2.30.2

View File

@ -1,7 +1,7 @@
From 3e6dd047083625ca03df9b4bbdc781e7dd079ff2 Mon Sep 17 00:00:00 2001 From adb2a1eeb1083c72b4ae8d0c987a1bcbc64f2434 Mon Sep 17 00:00:00 2001
From: Andre Mauricio Zelak <andre.zelak@windriver.com> From: Andre Mauricio Zelak <andre.zelak@windriver.com>
Date: Mon, 12 Jun 2023 17:29:30 -0300 Date: Mon, 12 Jun 2023 17:29:30 -0300
Subject: [PATCH 29/56] pmc_agent: Generalize the method that queries the local Subject: [PATCH 29/57] pmc_agent: Generalize the method that queries the local
clock identity. clock identity.
When started in automatic mode, the phc2sys program first queries the When started in automatic mode, the phc2sys program first queries the
@ -179,5 +179,5 @@ index ea37bf9..9d8bd1c 100644
* Queries the port properties of a given port from the ptp4l service. * Queries the port properties of a given port from the ptp4l service.
* *
-- --
2.25.1 2.30.2

View File

@ -1,7 +1,7 @@
From d3b877cae9576beddb00d4c5db67bf49c944b222 Mon Sep 17 00:00:00 2001 From 7acbb86b5d95709a6d87b898df5783c25fbb2d26 Mon Sep 17 00:00:00 2001
From: Andre Mauricio Zelak <andre.zelak@windriver.com> From: Andre Mauricio Zelak <andre.zelak@windriver.com>
Date: Mon, 12 Jun 2023 17:30:57 -0300 Date: Mon, 12 Jun 2023 17:30:57 -0300
Subject: [PATCH 30/56] pmc_agent: Simplify the method that gets of the number Subject: [PATCH 30/57] pmc_agent: Simplify the method that gets of the number
of local ports. of local ports.
The number of ports is already available in the cached default data The number of ports is already available in the cached default data
@ -102,5 +102,5 @@ index 9d8bd1c..f0e2c7a 100644
* Gets the TAI-UTC offset. * Gets the TAI-UTC offset.
* @param agent Pointer to a PMC instance obtained via @ref pmc_agent_create(). * @param agent Pointer to a PMC instance obtained via @ref pmc_agent_create().
-- --
2.25.1 2.30.2

View File

@ -1,7 +1,7 @@
From 156728d14591dd2b3131bcff49959e806523c1bb Mon Sep 17 00:00:00 2001 From 25d6be54bba7b2e9871da9700103a483ff355892 Mon Sep 17 00:00:00 2001
From: Andre Mauricio Zelak <andre.zelak@windriver.com> From: Andre Mauricio Zelak <andre.zelak@windriver.com>
Date: Mon, 12 Jun 2023 17:32:27 -0300 Date: Mon, 12 Jun 2023 17:32:27 -0300
Subject: [PATCH 31/56] pmc_agent: Let the update method poll for push events. Subject: [PATCH 31/57] pmc_agent: Let the update method poll for push events.
Signed-off-by: Richard Cochran <richardcochran@gmail.com> Signed-off-by: Richard Cochran <richardcochran@gmail.com>
@ -53,5 +53,5 @@ index f0e2c7a..dd34d30 100644
* - The port state notification callback might be invoked. * - The port state notification callback might be invoked.
* *
-- --
2.25.1 2.30.2

View File

@ -1,7 +1,7 @@
From 0e504e57af6c576202bbe1abe5a99eb24a981b73 Mon Sep 17 00:00:00 2001 From fdccd5ec965dee65d021eba76a1e75d28197be02 Mon Sep 17 00:00:00 2001
From: Andre Mauricio Zelak <andre.zelak@windriver.com> From: Andre Mauricio Zelak <andre.zelak@windriver.com>
Date: Mon, 12 Jun 2023 17:51:10 -0300 Date: Mon, 12 Jun 2023 17:51:10 -0300
Subject: [PATCH 32/56] phc2sys: Fix regression in the automatic mode. Subject: [PATCH 32/57] phc2sys: Fix regression in the automatic mode.
Commit ac7d69bbc476 ("pmc_agent: Convert the method that queries the Commit ac7d69bbc476 ("pmc_agent: Convert the method that queries the
port properties.") had the well meant intention of the cleaning up the port properties.") had the well meant intention of the cleaning up the
@ -33,5 +33,5 @@ index 6e6627d..623f300 100644
} }
out: out:
-- --
2.25.1 2.30.2

View File

@ -1,7 +1,7 @@
From 06a6734e3350e4020b4bb7b24a15d43aa42b4ca7 Mon Sep 17 00:00:00 2001 From 844bd2a0cb524079e5878cbdd7b24b1539970aaa Mon Sep 17 00:00:00 2001
From: Andre Mauricio Zelak <andre.zelak@windriver.com> From: Andre Mauricio Zelak <andre.zelak@windriver.com>
Date: Mon, 12 Jun 2023 17:57:11 -0300 Date: Mon, 12 Jun 2023 17:57:11 -0300
Subject: [PATCH 33/56] Implement push notification for TIME_STATUS_NP Subject: [PATCH 33/57] Implement push notification for TIME_STATUS_NP
Subscribers to NOTIFY_TIME_SYNC will be notified on every clock Subscribers to NOTIFY_TIME_SYNC will be notified on every clock
synchronization. synchronization.
@ -184,5 +184,5 @@ index a117904..c5cd992 100644
pmc_send_set_action(pmc, code, &sen, sizeof(sen)); pmc_send_set_action(pmc, code, &sen, sizeof(sen));
break; break;
-- --
2.25.1 2.30.2

View File

@ -1,7 +1,7 @@
From babbe47ab091071e16fcd527bf1aad06e5aec377 Mon Sep 17 00:00:00 2001 From 2a1a37e5617f9db8b7da67b87544afee2096cf69 Mon Sep 17 00:00:00 2001
From: Andre Mauricio Zelak <andre.zelak@windriver.com> From: Andre Mauricio Zelak <andre.zelak@windriver.com>
Date: Mon, 12 Jun 2023 18:16:31 -0300 Date: Mon, 12 Jun 2023 18:16:31 -0300
Subject: [PATCH 34/56] clock: Rename UDS variables to read-write. Subject: [PATCH 34/57] clock: Rename UDS variables to read-write.
In preparation for a new read-only UDS port, rename variables of the 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 current UDS port to make it clear it is read-write, as opposed to
@ -210,5 +210,5 @@ index f048771..d653c33 100644
c->sde = 1; c->sde = 1;
} }
-- --
2.25.1 2.30.2

View File

@ -1,7 +1,7 @@
From 4af24949b94eda84b4b74d77b9164cf3fe0eccf9 Mon Sep 17 00:00:00 2001 From c0f92de7977b4e11870865eabdb1b7d0b8a9d725 Mon Sep 17 00:00:00 2001
From: Andre Mauricio Zelak <andre.zelak@windriver.com> From: Andre Mauricio Zelak <andre.zelak@windriver.com>
Date: Mon, 12 Jun 2023 18:18:29 -0300 Date: Mon, 12 Jun 2023 18:18:29 -0300
Subject: [PATCH 35/56] clock: Add read-only UDS port for monitoring. Subject: [PATCH 35/57] clock: Add read-only UDS port for monitoring.
Add a second UDS port to allow untrusted applications to monitor ptp4l. Add a second UDS port to allow untrusted applications to monitor ptp4l.
On this "read-only" UDS port disable non-GET actions and forwarding. On this "read-only" UDS port disable non-GET actions and forwarding.
@ -288,5 +288,5 @@ index b179b81..f9bd228 100644
Defines the Differentiated Services Codepoint (DSCP) to be used for PTP 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 event messages. Must be a value between 0 and 63. There are several media
-- --
2.25.1 2.30.2

View File

@ -1,7 +1,7 @@
From 019f50868bc4300c591025d364898035ea9817b9 Mon Sep 17 00:00:00 2001 From 8307227fcd921d1025361d0c345b491258f9d190 Mon Sep 17 00:00:00 2001
From: Andre Mauricio Zelak <andre.zelak@windriver.com> From: Andre Mauricio Zelak <andre.zelak@windriver.com>
Date: Mon, 12 Jun 2023 18:20:50 -0300 Date: Mon, 12 Jun 2023 18:20:50 -0300
Subject: [PATCH 36/56] Rename management ID macros. Subject: [PATCH 36/57] Rename management ID macros.
The management ID macros are prefixed with TLV. This is confusing, The management ID macros are prefixed with TLV. This is confusing,
because the true TLV tags have the same prefix. Make the code more because the true TLV tags have the same prefix. Make the code more
@ -1384,5 +1384,5 @@ index a205119..97615fd 100644
/* Values for the SYNCHRONIZATION_UNCERTAIN_NP management TLV */ /* Values for the SYNCHRONIZATION_UNCERTAIN_NP management TLV */
#define SYNC_UNCERTAIN_DONTCARE 0xff #define SYNC_UNCERTAIN_DONTCARE 0xff
-- --
2.25.1 2.30.2

View File

@ -1,7 +1,7 @@
From 2a6ddfe1b9700ce8e0c62da8a7a4f2edcd4e1cad Mon Sep 17 00:00:00 2001 From 644c90c0e341624e55ef49ab5b4c5a4d4008f63d Mon Sep 17 00:00:00 2001
From: Andre Mauricio Zelak <andre.zelak@windriver.com> From: Andre Mauricio Zelak <andre.zelak@windriver.com>
Date: Sun, 18 Jun 2023 20:58:34 -0300 Date: Sun, 18 Jun 2023 20:58:34 -0300
Subject: [PATCH 37/56] Enhance phc2sys to accept multiple ptp4l inputs Subject: [PATCH 37/57] Enhance phc2sys to accept multiple ptp4l inputs
A new configuration option called ha_enabled was created. When it is set 1 A new configuration option called ha_enabled was created. When it is set 1
multiple ptp4l inputs are accepted and the high availability algorithms multiple ptp4l inputs are accepted and the high availability algorithms
@ -760,5 +760,5 @@ index 641a672..57d4796 100644
uds->address.sun = sa; uds->address.sun = sa;
uds->address.len = sizeof(sa); uds->address.len = sizeof(sa);
-- --
2.25.1 2.30.2

View File

@ -1,7 +1,7 @@
From 142b30b1f996a5bd48f0edc9b5fb0f51af0b97fd Mon Sep 17 00:00:00 2001 From c2dedaa40232ac3df88df6774d249e687f2f4e16 Mon Sep 17 00:00:00 2001
From: Andre Mauricio Zelak <andre.zelak@windriver.com> From: Andre Mauricio Zelak <andre.zelak@windriver.com>
Date: Tue, 4 Jul 2023 17:27:50 -0300 Date: Tue, 4 Jul 2023 17:27:50 -0300
Subject: [PATCH 38/56] Best source selection algorithm Subject: [PATCH 38/57] Best source selection algorithm
An algorithm to select the best available clock and use it An algorithm to select the best available clock and use it
as clock source. as clock source.
@ -437,5 +437,5 @@ index 5f25984..2bd7f02 100644
* Sets the TAI-UTC offset. * Sets the TAI-UTC offset.
* @param agent Pointer to a PMC instance obtained via @ref pmc_agent_create(). * @param agent Pointer to a PMC instance obtained via @ref pmc_agent_create().
-- --
2.25.1 2.30.2

View File

@ -1,7 +1,7 @@
From c61a91f5da1c07a783b0922e713c9f1d32adfa80 Mon Sep 17 00:00:00 2001 From a7ecd33822f5d76918ccc0148249b7fdb05d11da Mon Sep 17 00:00:00 2001
From: Andre Mauricio Zelak <andre.zelak@windriver.com> From: Andre Mauricio Zelak <andre.zelak@windriver.com>
Date: Sat, 8 Jul 2023 19:02:50 -0300 Date: Sat, 8 Jul 2023 19:02:50 -0300
Subject: [PATCH 39/56] Select best source clock after state changes Subject: [PATCH 39/57] Select best source clock after state changes
During operation, the clock states might change and require a new clock 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 to be selected. For example, the local clock class of the current active
@ -1032,5 +1032,5 @@ index 2bd7f02..8207c46 100644
/* Callback on message reception */ /* Callback on message reception */
pmc_node_recv_subscribed_t *recv_subscribed; pmc_node_recv_subscribed_t *recv_subscribed;
-- --
2.25.1 2.30.2

View File

@ -1,7 +1,7 @@
From 7d5061d971a8abc2ba8443edccde38e9a7a6f0ce Mon Sep 17 00:00:00 2001 From e269f17d01c324e70fb3ef8b8e88c0e57ac78eb1 Mon Sep 17 00:00:00 2001
From: Andre Mauricio Zelak <andre.zelak@windriver.com> From: Andre Mauricio Zelak <andre.zelak@windriver.com>
Date: Wed, 26 Jul 2023 15:08:15 -0300 Date: Wed, 26 Jul 2023 15:08:15 -0300
Subject: [PATCH 40/56] Forced lock a clock source in configuration Subject: [PATCH 40/57] Forced lock a clock source in configuration
To help on maintenance and debuging tasks was implemented a configuration To help on maintenance and debuging tasks was implemented a configuration
to forced lock to a single clock. It disables the automatic clock to forced lock to a single clock. It disables the automatic clock
@ -252,5 +252,5 @@ index 152e783..0b3f724 100644
} }
-- --
2.25.1 2.30.2

View File

@ -1,7 +1,7 @@
From fce993dd36e481aace337a62ff81331cd2411bec Mon Sep 17 00:00:00 2001 From bf767f48955399f27294d15e8f14a1ab0f3223bd Mon Sep 17 00:00:00 2001
From: Andre Mauricio Zelak <andre.zelak@windriver.com> From: Andre Mauricio Zelak <andre.zelak@windriver.com>
Date: Thu, 27 Jul 2023 14:22:47 -0300 Date: Thu, 27 Jul 2023 14:22:47 -0300
Subject: [PATCH 41/56] HA phc2sys com socket Subject: [PATCH 41/57] HA phc2sys com socket
A new communication path was created to retrieve status and to control A new communication path was created to retrieve status and to control
the high availability algorithm. the high availability algorithm.
@ -447,5 +447,5 @@ index 0b3f724..0bc3709 100644
clock_cleanup(&priv); clock_cleanup(&priv);
port_cleanup(&priv); port_cleanup(&priv);
-- --
2.25.1 2.30.2

View File

@ -1,7 +1,7 @@
From e77783a9873baeeda277cfa59059021ce121a693 Mon Sep 17 00:00:00 2001 From 509fb3bfe38d8fafc6d4d14855d34bb985a15493 Mon Sep 17 00:00:00 2001
From: Andre Mauricio Zelak <andre.zelak@windriver.com> From: Andre Mauricio Zelak <andre.zelak@windriver.com>
Date: Fri, 4 Aug 2023 15:44:12 -0300 Date: Fri, 4 Aug 2023 15:44:12 -0300
Subject: [PATCH 42/56] Commands 'enable lock' and 'disable lock. Subject: [PATCH 42/57] Commands 'enable lock' and 'disable lock.
The 'enable lock' command is used to lock to a single clock The 'enable lock' command is used to lock to a single clock
source and disable the HA clock selection algorithm. The source and disable the HA clock selection algorithm. The
@ -189,5 +189,5 @@ index 0bc3709..f89dc23 100644
if (priv->forced_source_clock) { if (priv->forced_source_clock) {
/* HA automatic clock selection is disabled */ /* HA automatic clock selection is disabled */
-- --
2.25.1 2.30.2

View File

@ -1,7 +1,7 @@
From 27b5c6afff470053b30ade14537be43f1c1c376d Mon Sep 17 00:00:00 2001 From 6323af225d205564a16fefefda9674feaf53ead5 Mon Sep 17 00:00:00 2001
From: Andre Mauricio Zelak <andre.zelak@windriver.com> From: Andre Mauricio Zelak <andre.zelak@windriver.com>
Date: Fri, 4 Aug 2023 19:01:57 -0300 Date: Fri, 4 Aug 2023 19:01:57 -0300
Subject: [PATCH 43/56] Commands 'enable source' and 'disable source'. Subject: [PATCH 43/57] Commands 'enable source' and 'disable source'.
These commands controls the list of clocks available to clock These commands controls the list of clocks available to clock
selection algorithm. selection algorithm.
@ -284,5 +284,5 @@ index f89dc23..035ee21 100644
} }
} }
-- --
2.25.1 2.30.2

View File

@ -1,7 +1,7 @@
From 2d40cc7cf52bbf054856c34902e4bda9f13ebb79 Mon Sep 17 00:00:00 2001 From 6384ddb80bf82998d058f61adc4350c88820fe5a Mon Sep 17 00:00:00 2001
From: Andre Mauricio Zelak <andre.zelak@windriver.com> From: Andre Mauricio Zelak <andre.zelak@windriver.com>
Date: Mon, 7 Aug 2023 14:55:12 -0300 Date: Mon, 7 Aug 2023 14:55:12 -0300
Subject: [PATCH 44/56] Stream type phc2sys com socket Subject: [PATCH 44/57] Stream type phc2sys com socket
The type of the socket was changed from datagram to stream. The type of the socket was changed from datagram to stream.
@ -197,5 +197,5 @@ index 035ee21..a597014 100644
free(buffer); free(buffer);
-- --
2.25.1 2.30.2

View File

@ -1,7 +1,7 @@
From 2896553d6dfa975102cba4cc45105b000ec0ae52 Mon Sep 17 00:00:00 2001 From 1c518663448b8c8aaf914151f54b860bd946cea4 Mon Sep 17 00:00:00 2001
From: Andre Mauricio Zelak <andre.zelak@windriver.com> From: Andre Mauricio Zelak <andre.zelak@windriver.com>
Date: Tue, 8 Aug 2023 13:10:50 -0300 Date: Tue, 8 Aug 2023 13:10:50 -0300
Subject: [PATCH 45/56] Functions starts_with and str_at_column Subject: [PATCH 45/57] Functions starts_with and str_at_column
Renaming starts_with and str_at_column functions to match ptp4l code Renaming starts_with and str_at_column functions to match ptp4l code
style. style.
@ -88,5 +88,5 @@ index a597014..6965162 100644
HA_SCK_BUFFER_SIZE); HA_SCK_BUFFER_SIZE);
} else { } else {
-- --
2.25.1 2.30.2

View File

@ -1,7 +1,7 @@
From f480fb54182da36baeb35bac90154abafcaf854a Mon Sep 17 00:00:00 2001 From d14df9d1f0b239c2a5fbe587875448a2d10b12a6 Mon Sep 17 00:00:00 2001
From: Andre Mauricio Zelak <andre.zelak@windriver.com> From: Andre Mauricio Zelak <andre.zelak@windriver.com>
Date: Tue, 8 Aug 2023 14:06:55 -0300 Date: Tue, 8 Aug 2023 14:06:55 -0300
Subject: [PATCH 46/56] Robustness improvements to phc2sys socket Subject: [PATCH 46/57] Robustness improvements to phc2sys socket
When phc2sys abnormally exits the socket file might remain created. When phc2sys abnormally exits the socket file might remain created.
To avoid error when phc2sys is relaunched, the exixting file is To avoid error when phc2sys is relaunched, the exixting file is
@ -74,5 +74,5 @@ index 6965162..edc626f 100644
pr_err("ha_com_socket: send failed: %m"); pr_err("ha_com_socket: send failed: %m");
return -errno; return -errno;
-- --
2.25.1 2.30.2

View File

@ -1,7 +1,7 @@
From c5e1599748877f16bfd1dea6910f6b8b57be7ddd Mon Sep 17 00:00:00 2001 From c20f9c9b992b7ecf0f5d2ac9f137b369352bbba2 Mon Sep 17 00:00:00 2001
From: Andre Mauricio Zelak <andre.zelak@windriver.com> From: Andre Mauricio Zelak <andre.zelak@windriver.com>
Date: Mon, 7 Aug 2023 18:19:37 -0300 Date: Mon, 7 Aug 2023 18:19:37 -0300
Subject: [PATCH 47/56] phc2sys without -w option. Subject: [PATCH 47/57] phc2sys without -w option.
Fix bad clock and pmc initialization when -w command argument Fix bad clock and pmc initialization when -w command argument
is not provided. is not provided.
@ -106,5 +106,5 @@ index edc626f..065b7f0 100644
if (ha_enabled && !priv.forced_source_clock) { if (ha_enabled && !priv.forced_source_clock) {
-- --
2.25.1 2.30.2

View File

@ -1,7 +1,7 @@
From c9a2a5398bace2f000ecc5ae6185b331cefa3a2c Mon Sep 17 00:00:00 2001 From 2b78be90379bf767961bec1b3f99462c54036cbf Mon Sep 17 00:00:00 2001
From: Andre Mauricio Zelak <andre.zelak@windriver.com> From: Andre Mauricio Zelak <andre.zelak@windriver.com>
Date: Mon, 21 Aug 2023 14:28:20 -0300 Date: Mon, 21 Aug 2023 14:28:20 -0300
Subject: [PATCH 48/56] HA domain number Subject: [PATCH 48/57] HA domain number
Support multiple domain numbers for each uds socket used in HA phc2sys. Support multiple domain numbers for each uds socket used in HA phc2sys.
@ -141,5 +141,5 @@ index 8207c46..38951b1 100644
void run_pmc_events(struct pmc_agent *agent); void run_pmc_events(struct pmc_agent *agent);
-- --
2.25.1 2.30.2

View File

@ -1,7 +1,7 @@
From 52c6fd7f9212902a2c5195e5a7b2c19a5956633f Mon Sep 17 00:00:00 2001 From afb5e76b98d7528bb36b860f9f0a6a8f04b094f8 Mon Sep 17 00:00:00 2001
From: Andre Mauricio Zelak <andre.zelak@windriver.com> From: Andre Mauricio Zelak <andre.zelak@windriver.com>
Date: Wed, 23 Aug 2023 19:18:08 -0300 Date: Wed, 23 Aug 2023 19:18:08 -0300
Subject: [PATCH 49/56] GM clock accuracy and offset scaled log variance Subject: [PATCH 49/57] GM clock accuracy and offset scaled log variance
Include GM clock quality parameters clock accuracy and offset Include GM clock quality parameters clock accuracy and offset
scaled log variance to the clock selection algorithm. Those scaled log variance to the clock selection algorithm. Those
@ -259,5 +259,5 @@ index be7b07a..1dd8c0f 100644
curlen += snprintf(response + curlen, resplen - curlen, curlen += snprintf(response + curlen, resplen - curlen,
-- --
2.25.1 2.30.2

View File

@ -1,8 +1,8 @@
From 2155ccb5a4de8cbebb552cf3d0a23874b026a716 Mon Sep 17 00:00:00 2001 From 0d36e8812291f5912d7344ff894976715baba53b Mon Sep 17 00:00:00 2001
From: Andre Mauricio Zelak <andre.zelak@windriver.com> From: Andre Mauricio Zelak <andre.zelak@windriver.com>
Date: Tue, 29 Aug 2023 19:06:23 -0300 Date: Tue, 29 Aug 2023 19:06:23 -0300
Subject: [PATCH 50/56] Select matching requirements clock if active doesn't match Subject: [PATCH 50/57] Select matching requirements clock if active doesn't
them match them
Fix clock selection algorithm behavior where a clock source starts Fix clock selection algorithm behavior where a clock source starts
to match requirements but is not selected because it has the same to match requirements but is not selected because it has the same
@ -76,5 +76,5 @@ index 1dd8c0f..5df89e5 100644
} }
-- --
2.25.1 2.30.2

View File

@ -1,7 +1,7 @@
From 5459f8e2eedcace7478a9c74fb6f73dc78af2c84 Mon Sep 17 00:00:00 2001 From 9ecbddcccbeadabb8cef295dd540dadc26f03d5b Mon Sep 17 00:00:00 2001
From: Andre Mauricio Zelak <andre.zelak@windriver.com> From: Andre Mauricio Zelak <andre.zelak@windriver.com>
Date: Wed, 30 Aug 2023 13:28:34 -0300 Date: Wed, 30 Aug 2023 13:28:34 -0300
Subject: [PATCH 51/56] Time traceable flag Subject: [PATCH 51/57] Time traceable flag
A new time traceable flag was added to pmc agent to store the current A new time traceable flag was added to pmc agent to store the current
time traceable status. time traceable status.
@ -106,5 +106,5 @@ index 38951b1..4e70606 100644
bool new_tpds; bool new_tpds;
unsigned int index; unsigned int index;
-- --
2.25.1 2.30.2

View File

@ -1,7 +1,7 @@
From 146da924d87830de29a8f261636e5311fa8997ac Mon Sep 17 00:00:00 2001 From 2f4339ab555fdd90d5c5fd11296d5c17b19c37e3 Mon Sep 17 00:00:00 2001
From: Andre Mauricio Zelak <andre.zelak@windriver.com> From: Andre Mauricio Zelak <andre.zelak@windriver.com>
Date: Wed, 30 Aug 2023 15:43:42 -0300 Date: Wed, 30 Aug 2023 15:43:42 -0300
Subject: [PATCH 52/56] Command 'valid sources' Subject: [PATCH 52/57] Command 'valid sources'
The 'valid sources' command is used to get a list of interfaces which The 'valid sources' command is used to get a list of interfaces which
the clock is matching the requirements. The response contains a space the clock is matching the requirements. The response contains a space
@ -65,5 +65,5 @@ index 27ba630..9893675 100644
cnt = snprintf((char*)response, HA_SCK_BUFFER_SIZE, cnt = snprintf((char*)response, HA_SCK_BUFFER_SIZE,
"Error: Invalid command"); "Error: Invalid command");
-- --
2.25.1 2.30.2

View File

@ -1,7 +1,7 @@
From a304feefd0c9f6e6319eb643b82f70a8b122f58a Mon Sep 17 00:00:00 2001 From 76f07fac7536b525b74858dacc3e37f28583c703 Mon Sep 17 00:00:00 2001
From: Andre Mauricio Zelak <andre.zelak@windriver.com> From: Andre Mauricio Zelak <andre.zelak@windriver.com>
Date: Thu, 31 Aug 2023 12:36:02 -0300 Date: Thu, 31 Aug 2023 12:36:02 -0300
Subject: [PATCH 53/56] GM time traceable check enabled by default Subject: [PATCH 53/57] GM time traceable check enabled by default
Now the GM time traceable check is enabled by default as it is an Now the GM time traceable check is enabled by default as it is an
important check for both T-GM and T-BC scenarios. important check for both T-GM and T-BC scenarios.
@ -36,5 +36,5 @@ index d405589..ef17463 100644
GLOB_ITEM_INT("ha_max_gm_clockClass", 6, 6, 255), GLOB_ITEM_INT("ha_max_gm_clockClass", 6, 6, 255),
GLOB_ITEM_INT("ha_max_gm_offsetScaledLogVar", 0xffff, 0, 0xffff), GLOB_ITEM_INT("ha_max_gm_offsetScaledLogVar", 0xffff, 0, 0xffff),
-- --
2.25.1 2.30.2

View File

@ -1,7 +1,7 @@
From e74d268ac5432c0e41dc14fb0ea648a432d8e340 Mon Sep 17 00:00:00 2001 From d43854295382f20697ffb067dde9b6f8d610d1f9 Mon Sep 17 00:00:00 2001
From: Andre Mauricio Zelak <andre.zelak@windriver.com> From: Andre Mauricio Zelak <andre.zelak@windriver.com>
Date: Thu, 31 Aug 2023 16:05:15 -0300 Date: Thu, 31 Aug 2023 16:05:15 -0300
Subject: [PATCH 54/56] Disable active interface failing Subject: [PATCH 54/57] Disable active interface failing
Fixed the behavior when none clock is matching the requirements and the Fixed the behavior when none clock is matching the requirements and the
active clock source is disabled using the 'disable source <interface>' active clock source is disabled using the 'disable source <interface>'
@ -55,5 +55,5 @@ index 9893675..4120568 100644
} }
} }
-- --
2.25.1 2.30.2

View File

@ -1,7 +1,7 @@
From 508ab6941772db145ad095a9d2707caf1f1e1198 Mon Sep 17 00:00:00 2001 From a61444e795236013bfca2e45100a45e14f0474c9 Mon Sep 17 00:00:00 2001
From: Andre Mauricio Zelak <andre.zelak@windriver.com> From: Andre Mauricio Zelak <andre.zelak@windriver.com>
Date: Thu, 4 Jan 2024 13:27:09 -0300 Date: Thu, 4 Jan 2024 13:27:09 -0300
Subject: [PATCH 55/56] Ignore interface in conf file when HA is disabled Subject: [PATCH 55/57] Ignore interface in conf file when HA is disabled
Fixed the behavior when HA is disabled, one interface has been configured and Fixed the behavior when HA is disabled, one interface has been configured and
'-a' autoconfiguration option is enabled. The behavior before HA feature was '-a' autoconfiguration option is enabled. The behavior before HA feature was
@ -48,5 +48,5 @@ index 4120568..1f6b6c2 100644
fprintf(stderr, "too many source clocks\n"); fprintf(stderr, "too many source clocks\n");
fprintf(stderr, "Use 'ha_enabled 1' to accept more than one source clock\n"); fprintf(stderr, "Use 'ha_enabled 1' to accept more than one source clock\n");
-- --
2.25.1 2.30.2

View File

@ -1,7 +1,7 @@
From 0520c98e1f21c40079c2d0000133cccb62b160b6 Mon Sep 17 00:00:00 2001 From adfe866226b758f789a3127447d37e19f442311f Mon Sep 17 00:00:00 2001
From: Andre Mauricio Zelak <andre.zelak@windriver.com> From: Andre Mauricio Zelak <andre.zelak@windriver.com>
Date: Mon, 15 Jan 2024 16:19:59 -0300 Date: Mon, 15 Jan 2024 16:19:59 -0300
Subject: [PATCH 56/56] Fixed event port id map Subject: [PATCH 56/57] Fixed event port id map
Fixed the port id map in the Port Data Set event handling. The port id 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. is composed by port number and node index after the HA implementation.
@ -78,5 +78,5 @@ index 1f6b6c2..d89fb23 100644
return -1; return -1;
port->state = normalize_state(state); port->state = normalize_state(state);
-- --
2.25.1 2.30.2

View File

@ -0,0 +1,35 @@
From 8dd4e2b6c8b99952296319a0e0c0e0f3e6160e32 Mon Sep 17 00:00:00 2001
From: cwalker <cole.walker@windriver.com>
Date: Fri, 1 Mar 2024 17:50:29 +0000
Subject: [PATCH 57/57] Fix uninitialized variable in nmea_scan_rmc
Initialize the tm_isdst variable to ensure that mktime does not fail on
recent versions of glibc.
This change initializes tm_isdst to 0 for compatibility with UTC.
Previously, a positive value in the uninitialized tm_isdst would cause
mktime to fail and ts2phc would repeatedly log "invalid master time
stamp". This resulted in intermittent synchronization errors.
[commit 63fc1ef4fd5e5fc45dd4de3bf27920bb109a4357 upstream]
Signed-off-by: cwalker <cole.walker@windriver.com>
---
nmea.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/nmea.c b/nmea.c
index dc865d0..d86d81c 100644
--- a/nmea.c
+++ b/nmea.c
@@ -157,6 +157,7 @@ static int nmea_scan_rmc(struct nmea_parser *np, struct nmea_rmc *result)
}
tm.tm_year += 100;
tm.tm_mon--;
+ tm.tm_isdst = 0;
result->ts.tv_sec = mktime(&tm);
result->ts.tv_nsec = msec * 1000000UL;
result->fix_valid = status == 'A' ? true : false;
--
2.30.2

View File

@ -53,4 +53,5 @@
0053-GM-time-traceable-check-enabled-by-default.patch 0053-GM-time-traceable-check-enabled-by-default.patch
0054-Disable-active-interface-failing.patch 0054-Disable-active-interface-failing.patch
0055-Ignore-interface-in-conf-file-when-HA-is-disabled.patch 0055-Ignore-interface-in-conf-file-when-HA-is-disabled.patch
0056-Fixed-event-port-id-map.patch 0056-Fixed-event-port-id-map.patch
0057-Fix-uninitialized-variable-in-nmea_scan_rmc.patch