Re: [Linuxptp-users] Polling ptp clock not allowed?
PTP IEEE 1588 stack for Linux
Brought to you by:
rcochran
From: Richard C. <ric...@gm...> - 2016-02-12 14:03:31
|
On Fri, Feb 12, 2016 at 12:09:25PM +0100, frank wrote: > During printf debugging I have seen large jumps in the timespecs > returned by clock_gettime(). > > Using a Intel i5 with a "Intel Corporation Ethernet Connection I217-V > (rev 05)" > network card around 100-200 calls to clock_gettime() in a loop are enough. This uses the e1000e driver, right? That driver has a work around for a HW bug when reading the time, but it is restricted to 82574/82583 devices: drivers/net/ethernet/intel/e1000e/netdev.c:e1000e_cyclecounter_read(): /* errata for 82574/82583 possible bad bits read from SYSTIMH/L * check to see that the time is incrementing at a reasonable * rate and is a multiple of incvalue */ Maybe the i217 is also affected? You could try enabling this work around for i217 as well. > struct timespec oldts; > struct timespec newts; > clock_gettime(clkid, &oldts); > > for(;;) > { > clock_gettime(clkid, &newts); > time_t delta = newts.tv_sec - oldts.tv_sec; > oldts = newts; > assert(delta >= 0); > assert(delta <= 1); Here it would help to see the values of oldts and newts when the assertion fails. > } > } This sounds like the same old hw bug. I would ask intel and/or on the e1000 list. Thanks, Richard |