[LinuxPPS] Re: Measuring interrupt latency with NTP
Rodolfo Giometti
giometti at linux.it
Sun Aug 13 23:22:29 CEST 2006
On Sun, Aug 13, 2006 at 05:05:10PM -0400, linux at horizon.com wrote:
>
> I don't claim it's pretty, but see attached for the ATOM driver. The
> comment above time_pps_findsource needs fixing. I poked at the ripencc
What do you mean? Which comment are you talking about? :-o
> Note that the failure to define PPS_API_VERS_1 is, I think, be a violation
> of RFC2781, since that constant is described in the RFC, and it says
>
> # 3.2 New data structures
> #
> # The data structure declarations and symbol definitions for this API
> # will appear in the header file <sys/timepps.h>. The header file MUST
> # define all constants described in this specification, even if they
> # are not supported by the implementation.
I don't agree. In the specification we can read:
The pps_params_t data type is used to discover and modify parameters
of a PPS source. The data type includes a mode field, described in
section 3.3. It also includes an api_version field, a read-only
value giving the version of the API. Currently, the only defined
value is:
#define PPS_API_VERS_1 1
This field is present to enable binary compatibility with future
versions of the API.
Since LinuxPPS should be (hopefully) a future versions of the API I decided to
define:
#define PPS_API_VERS_2 2
:)
> diff -r -u ntp-4.2.2+dfsg.2/configure.ac ntp-4.2.2+dfsg.2local/configure.ac
> --- ntp-4.2.2+dfsg.2/configure.ac 2006-08-13 16:51:05.000000000 -0400
> +++ ntp-4.2.2+dfsg.2local/configure.ac 2006-08-13 12:04:21.000000000 -0400
> @@ -430,7 +430,7 @@
> # include <errno.h>
> #endif
> #include <sys/timepps.h>
> -#ifdef PPS_API_VERS_1
> +#ifdef PPS_API_VERS
> yes
> #endif
> ], [AC_CHECK_HEADERS(sys/timepps.h, [], [],
This should be a sanity checks for version 1 of the API implementation...
> diff -r -u ntp-4.2.2+dfsg.2/ntpd/refclock_atom.c ntp-4.2.2+dfsg.2local/ntpd/refclock_atom.c
> --- ntp-4.2.2+dfsg.2/ntpd/refclock_atom.c 2006-06-06 16:16:48.000000000 -0400
> +++ ntp-4.2.2+dfsg.2local/ntpd/refclock_atom.c 2006-08-13 11:37:54.000000000 -0400
> @@ -155,6 +155,9 @@
> register struct ppsunit *up;
> char device[80];
> int mode;
> +#ifdef PPS_HAVE_FINDSOURCE
> + char id[80]; /* Source description */
> +#endif
> #endif /* HAVE_PPSAPI */
> [snip]
Thanks for the patch.
Ciao,
Rodolfo
--
GNU/Linux Solutions e-mail: giometti at enneenne.com
Linux Device Driver giometti at gnudd.com
Embedded Systems giometti at linux.it
UNIX programming phone: +39 349 2432127
More information about the LinuxPPS
mailing list