Ever since upgrading to Debian 7.0, building linuxptp results in an
annoying error message. This is due to the fact that the directory
/usr/include/bits is no longer present, but our makefile expects it
to exist. This patch fixes the issue by telling grep not to complain
about missing files.
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
Add new options to ptp4l and phc2sys to print summary statistics of the
clock instead of the individual samples.
[ RC - Fix () function prototype with (void).
- Use unsigned for sample counter.
- Fix over-zealous line breaks. ]
Signed-off-by: Miroslav Lichvar <mlichvar@redhat.com>
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
Add a new option to wait for ptp4l to be in a synchronized state.
Periodically check PORT_DATA_SET and wait until there is a port in
SLAVE, MASTER or GRAND_MASTER state. Also, set the default
synchronization offset according to the currentUtcOffset value from
TIME_PROPERTIES_DATA_SET and the direction of the clock synchronization.
Signed-off-by: Miroslav Lichvar <mlichvar@redhat.com>
We use the PTP_SYS_OFFSET ioctl method in preference to doing
clock_gettime from user space, the assumption being that the kernel space
measurement will always be more accurate.
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
This patch adds support for sk_interface_phc to lookup the /dev/ptpX device
using ethtool's get_ts_info ioctl
-v2-
* set ethdev to null initially
* rebased on top of phc2sys changes
-v3-
* fixed typo regarding slash
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
This is really just a first attempt using a hard coded length. Probably
it will be necessary to let the length be configurable and/or adaptable.
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
We can pre-compute a table of suitable values in order to simplify the
run time random delay selection.
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
Since the master implementation is still lacking, we will just keep
the slave-only flag hard coded for now.
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
This commit also introduces clock and port objects, but only with the
minimal interface needed by the BMC.
Signed-off-by: Richard Cochran <richardcochran@gmail.com>