Files
integ/base/linuxptp/debian/patches/0003-port-Don-t-check-timestamps-from-non-slave-ports.patch
Andre Mauricio Zelak cfe25f0193 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.

Code tidying. As definition, the port id and the port number are
different. An existing port number variable was rennamed to
prevent missinterpretation.

Code tidying. The HA node state change processing was disabled
when HA feature is not enabled.

Test plan:
PASS: Verify the phc2sys executable recognizes the port in the port
state change event, when -a configuration option is used
PASS: Verify the events in the HA scenario are being recognized

Story: 2010723
Task: 49405

Change-Id: Iea2b3c4e7d7dcd07ca2ad52bc4042f80282b1a9a
Signed-off-by: Andre Mauricio Zelak <andre.zelak@windriver.com>
2024-01-15 16:28:29 -03:00

41 lines
1.5 KiB
Diff

From a1ed560a712d611edf8b47756bc56542a57bff7d 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>
Date: Mon, 31 May 2021 11:07:54 +0200
Subject: [PATCH 3/56] 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
the timestamps can be generated by different clocks.
Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Miroslav Lichvar <mlichvar@redhat.com>
[commit e117e37e379556fa23337db2518bb44d8793e039 upstream]
Signed-off-by: Jim Somerville <Jim.Somerville@windriver.com>
Signed-off-by: Andre Mauricio Zelak <andre.zelak@windriver.com>
---
port.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/port.c b/port.c
index 9e9d484..387d5a2 100644
--- a/port.c
+++ b/port.c
@@ -2731,7 +2731,10 @@ static enum fsm_event bc_event(struct port *p, int fd_index)
}
if (msg_sots_valid(msg)) {
ts_add(&msg->hwts.ts, -p->rx_timestamp_offset);
- clock_check_ts(p->clock, tmv_to_nanoseconds(msg->hwts.ts));
+ if (p->state == PS_SLAVE) {
+ clock_check_ts(p->clock,
+ tmv_to_nanoseconds(msg->hwts.ts));
+ }
}
switch (msg_type(msg)) {
--
2.29.2