Commit Graph

6 Commits (master)

Author SHA1 Message Date
Vladimir Oltean 61c6a70898 phc2sys: provide missing kernel headers for sysoff functionality
Currently it is very finicky to deploy linuxptp in an automated build
system and make KBUILD_OUTPUT pick up the output of "make
headers_install" in order for the application to make full use of the
features exposed by the runtime kernel. And the toolchain/libc will
almost certainly never contain recent enough kernel headers to be of any
use here. And there's no good reason for that: the application can probe
at runtime for the sysoff methods supported by the kernel anyway.

So let's provide the kernel definitions for sysoff, sysoff_precise and
sysoff_extended, such that SYSOFF_COMPILE_TIME_MISSING is not something
that will bother us any longer.

Signed-off-by: Vladimir Oltean <olteanv@gmail.com>
2020-06-24 16:09:47 -07:00
Miroslav Lichvar 68a9011c9d sysoff: Add support for PTP_SYS_OFFSET_EXTENDED ioctl.
This is a more accurate variant of the the PTP_SYS_OFFSET ioctl, which
will probably be supported in future kernel versions.

Signed-off-by: Miroslav Lichvar <mlichvar@redhat.com>
2019-01-06 20:50:40 -08:00
Miroslav Lichvar 192b8e315c sysoff: Add support for PTP_SYS_OFFSET_PRECISE ioctl.
This ioctl uses cross timestamping for a more accurate measurement of
the offset. It is supported on some onboard Intel NICs using the e1000e
driver and a virtual PHC with the ptp_kvm driver.

Signed-off-by: Miroslav Lichvar <mlichvar@redhat.com>
2019-01-06 20:50:40 -08:00
Miroslav Lichvar 93baf34adb sysoff: Extend API for different sysoff methods.
The kernel supports different PTP_SYS_OFFSET* ioctls. Use the sysoff
enum to allow selecting between them in sysoff_measure().

Signed-off-by: Miroslav Lichvar <mlichvar@redhat.com>
2019-01-06 20:50:40 -08:00
Miroslav Lichvar 42b305478d phc2sys: Print clock reading delay.
If the delay is known, print it together with the offset and frequency.
Remove the time stamp from the output to fit it into 80 chars.

Signed-off-by: Miroslav Lichvar <mlichvar@redhat.com>
2013-02-08 18:41:34 +01:00
Richard Cochran 36a5224b5a Add a method to estimate the PHC to system offset using the new ioctl.
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2012-11-29 17:43:51 +01:00