Miroslav Lichvar
c5ce4ef764
phc2sys: read PHC with each PPS sample.
...
In the PPS loop, instead of setting the system clock from the PHC only
once on start, read PHC with each PPS sample and use the time stamp to
get the whole number of seconds in the offset. This will prevent phc2sys
from losing track of the system clock.
Also, check if the PPS is synchronized to the PHC.
Signed-off-by: Miroslav Lichvar <mlichvar@redhat.com>
2013-01-18 07:11:19 +01:00
Miroslav Lichvar
f09b4bb7e3
phc2sys: remove unnecessary clock step with non-PPS loops.
...
With non-PPS loops let the servo make the inital correction. Move the
code to the PPS loop and change it to use the sample filtering to reduce
the error in the initial correction.
Signed-off-by: Miroslav Lichvar <mlichvar@redhat.com>
2013-01-16 20:28:22 +01:00
Miroslav Lichvar
fc1a695493
phc2sys: don't zero clock frequency on start.
...
Instead of always starting at zero frequency offset, read the currently
stored value on start and pass it to the servo. As the read may silently
fail and return zero, set the clock frequency back to the read value to
make sure it's always equal to the actual frequency of the clock.
Signed-off-by: Miroslav Lichvar <mlichvar@redhat.com>
2013-01-16 20:28:21 +01:00
Miroslav Lichvar
2d4b2f1640
phc2sys: move phc loop to its own function.
...
Signed-off-by: Miroslav Lichvar <mlichvar@redhat.com>
2013-01-16 20:28:21 +01:00
Miroslav Lichvar
627bc0fdf7
phc2sys: use servo code from ptp4l.
...
Signed-off-by: Miroslav Lichvar <mlichvar@redhat.com>
2013-01-16 20:28:21 +01:00
Miroslav Lichvar
d8cb9be46a
Remove unnecessary states in PI servo.
...
Step the clock as soon as the second sample is collected.
Signed-off-by: Miroslav Lichvar <mlichvar@redhat.com>
2013-01-16 20:28:21 +01:00
Miroslav Lichvar
af2a4f47fb
Modify PI servo to set frequency when jumping.
...
Similarly to the servo in phc2sys, when clock is stepped, set
immediately also its frequency. This significantly improves the initial
convergence with large frequency offsets.
Signed-off-by: Miroslav Lichvar <mlichvar@redhat.com>
2013-01-16 20:28:21 +01:00
Miroslav Lichvar
ab29608e0b
Modify servo_sample() to accept integer values.
...
Current date stored in nanoseconds doesn't fit in 64-bit double format.
Keep the offset and the time stamp in integer nanoseconds.
Signed-off-by: Miroslav Lichvar <mlichvar@redhat.com>
2013-01-16 20:28:21 +01:00
Miroslav Lichvar
8a23bf1d66
Fix initial drift calculation in PI servo.
...
Convert the calculated drift to ppb and also clamp it.
Signed-off-by: Miroslav Lichvar <mlichvar@redhat.com>
2013-01-16 20:28:21 +01:00
Geoff Salmon
d4db76d64c
udp6: implement getting physical and protocol addrs
2013-01-14 19:12:18 +01:00
Geoff Salmon
c54f8a523b
udp: implement getting physical and protocol addrs
2013-01-14 19:12:18 +01:00
Geoff Salmon
f3ac2cad65
add sk_interface_addr for getting an interface's IP
2013-01-14 19:12:18 +01:00
Geoff Salmon
d6779889cc
raw: implement getting physical and protocol addrs
2013-01-14 19:12:18 +01:00
Geoff Salmon
e010937783
transport: adds interface for getting type, and physical/protocol address
...
Needed for CLOCK_DESCRIPTION management TLV.
2013-01-14 19:12:18 +01:00
Geoff Salmon
5c47cbfedf
Make enum transport_type match the networkProtocol enumeration
...
This means no conversion is necessary between the transport_type and
the networkProtocol field of the PortAddress struct. Not currently an
issue, but will be needed for implementing the CLOCK_DESCRIPTION
management TLV.
2013-01-14 19:12:17 +01:00
Geoff Salmon
7607774f30
Avoid calling msg_pre_send/post_recv unless actually forwarding a message
2012-12-31 22:53:32 +01:00
Geoff Salmon
8b40f4305b
pmc: prefer exact matches for command names
...
Previously if a command's full name was a prefix of another command
then parse_id would return AMBIGUOUS_ID. This was a problem for the
TIME and various TIME_* messages.
2012-12-31 19:03:49 +01:00
Richard Cochran
c8952c20c5
Add the SF download URL into the readme file.
...
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2012-12-21 13:58:03 +01:00
Miroslav Lichvar
3d4ff7882f
phc2sys: check that specified interface has a PHC.
2012-12-18 18:52:02 +01:00
Miroslav Lichvar
84c7ac6b52
Fix -Wformat warnings.
2012-12-18 18:52:02 +01:00
Miroslav Lichvar
b5ec128574
Update twoStepFlag description in man page.
2012-12-18 18:52:01 +01:00
Richard Cochran
3f9fe6d4b7
Update the readme with another Linux PHC driver.
...
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2012-12-18 18:51:41 +01:00
Richard Cochran
49e4491883
Version 1.0
...
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2012-12-12 16:52:47 +01:00
Richard Cochran
b810153ed5
Add asymmetry correction.
...
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
Acked-by: Jacob Keller <Jacob.e.keller@intel.com>
2012-12-11 14:36:30 +01:00
Richard Cochran
39e8ee0642
Add command line options to print the software version.
...
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2012-12-10 15:11:51 +01:00
Richard Cochran
c3119807a3
Add utility functions to get the software version string.
...
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2012-12-10 15:11:51 +01:00
Richard Cochran
0c49d16244
Add a compile time version string definition.
...
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2012-12-10 15:11:51 +01:00
Richard Cochran
02f5b741e7
Add a shell script to generate the version string.
...
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2012-12-09 10:16:18 +01:00
Richard Cochran
480f9e7d7a
pmc: show the flags from the default data set.
...
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2012-12-04 16:03:33 +01:00
Richard Cochran
c129d0ec95
pmc: fix missing include.
...
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2012-12-04 14:36:01 +01:00
Richard Cochran
3710004596
pmc: reduce the message time out waiting for replies.
...
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2012-12-04 14:27:25 +01:00
Richard Cochran
5b099afec7
pmc: show the port state as a string.
...
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2012-12-04 14:26:50 +01:00
Richard Cochran
2aaae0854e
Distinguish between get and set management requests.
...
The code previously treated all supported request as 'get' actions and
ignored the actual action field in the message. This commit makes the
code look at the action field when processing the requests.
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2012-12-04 13:25:50 +01:00
Richard Cochran
502b52163c
pmc: correct the integer format string wrt decimal verses hexadecimal.
...
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2012-12-04 13:21:53 +01:00
Richard Cochran
2352c05a3b
pmc: support getting the port data set.
...
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2012-12-02 21:07:43 +01:00
Richard Cochran
0e244e7f36
Respond to the port data set management query.
...
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2012-12-02 21:06:37 +01:00
Richard Cochran
970bc7f95c
Maintain the peer mean path delay field of the port data set.
...
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2012-12-02 20:48:29 +01:00
Richard Cochran
28c08dfac6
Convert the port data set TLV to and from host byte order.
...
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2012-12-02 20:34:44 +01:00
Richard Cochran
c101dafb18
pmc: support getting the time properties data set.
...
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2012-12-02 20:13:06 +01:00
Richard Cochran
21840156c3
Respond to the time properties data set management query.
...
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2012-12-02 18:57:38 +01:00
Richard Cochran
49a98c1fcf
Convert the time properties data set TLV to and from host byte order.
...
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2012-12-02 15:44:59 +01:00
Richard Cochran
aa6708d09a
Use the management message memory layout for the timePropertiesDS.
...
Reforming the data structure in this way will greatly simplify the
implementation of the management message for this data set.
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2012-12-02 11:24:31 +01:00
Richard Cochran
61e1861e27
pmc: remove trailing spaces from format strings.
...
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2012-12-02 10:13:15 +01:00
Richard Cochran
04fe330e81
pmc: support getting the parent data set.
...
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2012-12-02 10:09:30 +01:00
Richard Cochran
b9a6767b3d
Respond to the parent data set management query.
...
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2012-12-02 09:13:55 +01:00
Richard Cochran
e21280ef77
Convert the parent data set TLV to and from host byte order.
...
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2012-12-02 08:53:54 +01:00
Richard Cochran
b30c841cde
pmc: support getting the default data set.
...
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2012-12-02 08:32:00 +01:00
Richard Cochran
cc7c724eb0
Respond to the default data set management query.
...
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2012-12-02 07:51:19 +01:00
Richard Cochran
2722b8587d
Convert the default data set TLV to and from host byte order.
...
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2012-12-01 08:27:45 +01:00
Richard Cochran
71c4bf203c
Use the management message memory layout for the parentDS.
...
Reforming the data structure in this way will greatly simplify the
implementation of the management message for this data set.
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2012-11-30 22:35:26 +01:00