integ/base/linuxptp/centos/patches/0003-port-Don-t-check-timestamps-from-non-slave-ports.patch
Jim Somerville 8445cd91a1 Uprev linuxptp to version 3.1.1-1
We use the CentOS 8 version of the source package
and apply the same six patches that we applied to
the previous version, with one caveat.  Patch 3
had an additional test in it of the uncalibrated
state, and this test does not exist in the upstream
version of the patch.  Now patch 3 is identical
to the upstream version.

All five upstream patches have been refreshed to
what was actually accepted upstream and thus now
contain proper git headers.  The logic of those
five patches remain as they were, with the one
exception noted in the previous paragraph.

Patch 6 has also now been given a proper git header.

Change-Id: Ifd44680d2f190dc0c5662bd05bd214fccf50a2fd
Story: 2009130
Task: 43199
Signed-off-by: Jim Somerville <Jim.Somerville@windriver.com>
2021-09-03 17:24:27 -04:00

40 lines
1.4 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/6] 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>
---
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