This will be needed for notifications. Only implemented for UDS.
Signed-off-by: Jiri Benc
---
port.c | 14 ++
port.h | 22 ++
transport.c | 17 +
transport.h | 25 +
transpor
Currently, it is assumed that the management TLV data of management COMMAND
messages is always empty. This is not true for the INITIALIZE command and
also for a custom command we'll be introducing.
Move the check to msg_post_recv and let it check only the TLVs defined by
the standard.
Signed-off-
Notify subscribers about port state changes.
Signed-off-by: Jiri Benc
---
notification.h |2 +-
port.c |6 +-
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/notification.h b/notification.h
index 9fe90cd0bacb..9427d819dac3 100644
--- a/notification.h
+++ b/noti
Add tracking of which ports have been added and to which clock they belong.
Signed-off-by: Jiri Benc
---
phc2sys.c | 51 +++
1 files changed, 51 insertions(+), 0 deletions(-)
diff --git a/phc2sys.c b/phc2sys.c
index 3fdb90cf161b..e5a7c0f49b9e 10
Used to enumerate all ports. With the future dynamic port adding/removal,
there may be holes in the port number sequence. For now, just fill it with
the sequence numbers.
Signed-off-by: Jiri Benc
---
clock.c | 16
tlv.c | 29 +
tlv.h |6 ++
Add an event number for port adding/removal. As currently the ports are
static, this event is not emitted for now.
Signed-off-by: Jiri Benc
---
clock.c|4 +++-
notification.h |1 +
2 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/clock.c b/clock.c
index 2e7794cc07cd
Require subscriptions to be renewed regularly. This way, the subscription
automatically times out when phc2sys is killed.
Signed-off-by: Jiri Benc
---
clock.c | 24
phc2sys.c | 10 ++
2 files changed, 30 insertions(+), 4 deletions(-)
diff --git a/clock.c b
Add automatic configuration option (-a).
Signed-off-by: Jiri Benc
---
phc2sys.c | 247 ++---
1 files changed, 236 insertions(+), 11 deletions(-)
diff --git a/phc2sys.c b/phc2sys.c
index 557b00ec6930..b0d8adb6828d 100644
--- a/phc2sys.c
++
Implement pmc_target_port to set a port number, leaving clock identity
unchanged, and pmc_target_all to set clock identity and port number to all
1's.
Signed-off-by: Jiri Benc
---
pmc_common.c | 12 +++-
pmc_common.h |2 ++
2 files changed, 13 insertions(+), 1 deletions(-)
diff --
Split management message creation to more fine-grained functions to allow
notification messages to be created.
Signed-off-by: Jiri Benc
---
clock.c | 58 --
clock.h |8
port.c |8 +++-
port.h | 14 ++
Add support for subscribing to events (run_pmc_subscribe) and receiving and
handling of received events (run_pmc_events).
Add initial support for port status changes.
Signed-off-by: Jiri Benc
---
phc2sys.c | 113 +++--
1 files changed, 11
Signed-off-by: Jiri Benc
---
phc2sys.8 | 115 ++---
1 files changed, 79 insertions(+), 36 deletions(-)
diff --git a/phc2sys.8 b/phc2sys.8
index 8688e4840cf0..d6fdb465c1f3 100644
--- a/phc2sys.8
+++ b/phc2sys.8
@@ -1,12 +1,17 @@
.TH PHC2SY
By default, do not synchronize CLOCK_REALTIME. To do it, -r option is
needed. That will only consider CLOCK_REALTIME as the destination. To
consider it also as a possible time source, use -rr.
Signed-off-by: Jiri Benc
---
phc2sys.c | 33 +
1 files changed, 25 in
Signed-off-by: Jiri Benc
---
pmc_common.c | 16 ++--
pmc_common.h |2 +-
2 files changed, 15 insertions(+), 3 deletions(-)
diff --git a/pmc_common.c b/pmc_common.c
index 061529e25b83..763b06e8e4c5 100644
--- a/pmc_common.c
+++ b/pmc_common.c
@@ -260,12 +260,14 @@ int pmc_send_g
Do not call clock_open to open a clock device but let clock_add do that and
return the newly created struct. Also, store the device (interface) name in
struct clock.
Signed-off-by: Jiri Benc
---
phc2sys.c | 81 ++--
1 files changed, 46 in
Split members that apply to all synchronized clocks and members that apply
to an individual clock. Keep all clocks in a list, with a pointer to the
source clock. This will allow to support multiple clocks synchronization.
Signed-off-by: Jiri Benc
---
phc2sys.c | 397
The standard requires management TLV in replies to commands:
An acknowledge management message is a response to a command
management message. The value of the managementId shall be identical
to that in the command message.
(Table 38)
Just copy the TLV from the requ
Will be used by phc2sys to find out interfaces corresponding to ports.
Signed-off-by: Jiri Benc
---
clock.c |9 +
port.c | 16
tlv.c | 20
tlv.h |8
4 files changed, 53 insertions(+), 0 deletions(-)
diff --git a/clock.c b/c
Split management message creation to more fine-grained functions to allow
notification messages to be created.
Signed-off-by: Jiri Benc
---
port.c | 93 ++--
port.h |9 ++
2 files changed, 82 insertions(+), 20 deletions(-)
di
Split the generic (global) part of update_sync_offset and the part that
affects individual clocks. This is in preparation for phc2sys handling
synchronization of more clocks.
Signed-off-by: Jiri Benc
---
phc2sys.c | 71 +++-
1 files chang
Make run_pmc usable for any kind of management message. Create wrappers for
waiting for ptp4l and for getting UTC offset.
Signed-off-by: Jiri Benc
---
phc2sys.c | 131 +++--
1 files changed, 66 insertions(+), 65 deletions(-)
diff --git a/
The task of preparing the message for transmission and sending it appears
at many places. Unify them into a new function.
Signed-off-by: Jiri Benc
---
clock.c | 12 +
port.c | 129 --
port.h | 12 ++
3 files changed, 57 i
This puts groundwork for event subscription and notification. The individual
events are added by subsequent patches.
Signed-off-by: Jiri Benc
---
clock.c| 137
clock.h| 11 +
notification.h | 28 +++
tlv.c
This patchset adds support for phc2sys following ptp4l state changes and
automatic (re)configuration.
This works by "subscribing" certain kinds of events over the UDS and ptp4l
sending the events to their "subscribers".
The patchset is prepared to handle the "emulated boundary clock" scenario,
i.
Make sure that we handle only one PTP clock (node). This is for an extra
safety.
Signed-off-by: Jiri Benc
---
phc2sys.c | 39 +--
1 files changed, 37 insertions(+), 2 deletions(-)
diff --git a/phc2sys.c b/phc2sys.c
index f29d8e7eeaab..d130232f70de 100644
--
This just moves code around to have related functions together and forward
declaration at the beginning of the file. No code changes.
Signed-off-by: Jiri Benc
---
phc2sys.c | 208 ++---
1 files changed, 103 insertions(+), 105 deletions(-)
When phc2sys is started before ptp4l or it is interrupted before ptp4l has
a chance to reply to its query, the "uds: sendto failed: Connection refused"
message is output. This is not an interesting message.
Also, don't output the "failed to send message" error from pmc_send, as
all transports outp
For now, only CLOCK_REALTIME can be UTC. This may stay this way forever but
now we have a clean separation between codepaths where CLOCK_REALTIME is
required and codepaths any UTC clock should take.
The main motiviation behind this change is removal of sync_offset_direction.
It has to be computed
On Thu, 2014-03-20 at 19:08 +0100, Jiri Benc wrote:
> This patchset adds support for phc2sys following ptp4l state changes and
> automatic (re)configuration.
>
> This works by "subscribing" certain kinds of events over the UDS and ptp4l
> sending the events to their "subscribers".
>
> The patchse
29 matches
Mail list logo