Due to a bug in the setup code refactoring (in anticipation of TC
support) in v1.7 you cannot dial one-step anymore. This series
addresses that issue.
Richard Cochran (2):
Fix regression in one-step configuration.
clock: Remove cruft from the creation method.
clock.c | 8
1 file ch
The time stamping setup code needlessly queries the configuration data
base over and over, rather than simply using the local variable
already assigned. This patch replaces the extraneous config_get_int()
calls with the local variable.
Signed-off-by: Richard Cochran
---
clock.c | 7 +++
1 f
We activate on-step mode based on the "time_stamping" and
"twoStepFlag" configuration options. If twoStepFlag is false and HW
time stamping is enabled, we upgrade the time stamping mode variable
to one-step.
The code that tests the options and sets the one-step mode moved from
ptp4l.c into clock.
Signed-off-by: Richard Cochran
---
port.c | 13 +
port.h | 14 ++
2 files changed, 27 insertions(+)
diff --git a/port.c b/port.c
index 5868983..a1ad6f6 100644
--- a/port.c
+++ b/port.c
@@ -117,6 +117,7 @@ struct port {
int path_trace_enabled;
Changes in V3:
~~
- Free rtnl's malloc'ed buffer on the exit path.
Changes in V2:
~~
- Add more explanation to patch #7
- Fix missing parenthesis in the realloc() size in patch #7
This series implements link state tracking over all port via a single
RT netlink socket. Unf
No functional changes.
Signed-off-by: Richard Cochran
---
clock.c | 14 --
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/clock.c b/clock.c
index 55532b8..3b42109 100644
--- a/clock.c
+++ b/clock.c
@@ -768,20 +768,22 @@ static int clock_add_port(struct clock *c, int ph
This patch adds a source module that implements RT netlink sockets
for the purpose of link monitoring. Unfortunately the netlink API
offers no possibility for per-port notification. Instead it
forces us to use a de-multiplexing pattern.
Signed-off-by: Richard Cochran
---
makefile | 2 +-
rtn
Signed-off-by: Richard Cochran
---
clock.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/clock.c b/clock.c
index 8ca749e..55532b8 100644
--- a/clock.c
+++ b/clock.c
@@ -314,7 +314,7 @@ static void clock_freq_est_reset(struct clock *c)
c->fest.origin1 = tmv_zero();
The clock module will want to know the interface indexes, in order to
implement link monitoring. However, the clock does not open any sockets
directly. This helper function lets us keep the clock module free of
socket level code.
Signed-off-by: Richard Cochran
---
sk.c | 10 ++
sk.h |
Poll for link up/down events. When a link goes down, the port becomes
faulty until the link goes up again. We keep the fault timer from the
existing fault detection, but a downed link prevents clear the fault.
The new state machine is depicted in this ascii art diagram:
++
We use a hash table to remember the mapping. Since our existing hash
table is a simply string hash, we convert the integer index into a decimal
string. Although hashing integers in this way is sub-optimal, the table
will not be used in a performance critical path.
Signed-off-by: Richard Cochran
Dear linuxptp users and developers,
I am planning to release version 1.8 in one week, without any major
new features, in order to fix the regression in version 1.7.
[ Sound familiar? The same thing happened to 1.6. I don't have the
time to maintain stable branches, and so my policy is to push
Signed-off-by: Richard Cochran
---
clock.c| 2 +-
makefile | 2 +-
p2p_tc.c | 155 +
port.c | 3 ++
port_private.h | 3 ++
5 files changed, 163 insertions(+), 2 deletions(-)
create mode 100644 p2p_tc.c
d
This patch makes a number of subroutines into global functions in order
to share code with the TC implementations to come.
Signed-off-by: Richard Cochran
---
port.c | 28 +---
port_private.h | 17 +
2 files changed, 30 insertions(+), 15 deletions(-
Signed-off-by: Richard Cochran
---
port.c | 27 +++
1 file changed, 27 insertions(+)
diff --git a/port.c b/port.c
index a1ad6f6..4f91dfd 100644
--- a/port.c
+++ b/port.c
@@ -72,6 +72,10 @@ struct port {
struct fdarray fda;
int fault_fd;
int phc_ind
This patch adds a new flag '-t' that enables transparent clock mode. When
active, the clock will be created as an E2E or P2P TC, depending on the
configured delay mechanism.
Signed-off-by: Richard Cochran
---
ptp4l.c | 39 +++
1 file changed, 35 insertions(+)
This patch places the internal port data structure into a common header
for use by the original BC and the new TC code.
Signed-off-by: Richard Cochran
---
port.c | 84 +--
port_private.h | 111 ++
So here is my draft for P2P TC support. I rebased this on top of the
RTNL series posted today. The TC code is getting a bit stale by now,
and so this version is compile tested only!
Just to be clear, this code is NOT going into v1.8! The TC support is
only a proof of concept, and much more work
This patch adds code that sends an event messages received on one port out
all the other ports and calculates the residence time. The correction,
ingress port, and the original message are remembered in a TC transmit
descriptor. These descriptors are recycled in a memory pool in a similar
way to
19 matches
Mail list logo