Re: [Linuxptp-users] Polling ptp clock not allowed?
PTP IEEE 1588 stack for Linux
Brought to you by:
rcochran
From: Keller, J. E <jac...@in...> - 2016-02-16 19:53:52
|
On Fri, 2016-02-12 at 15:03 +0100, Richard Cochran wrote: > 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 It is possible this is the same bug. Let me know your results, I can forward it to the team responsible. Regards, Jake |