On 12/14/2020 2:43 PM, Nils Hasler wrote:
> Thanks Jacob.
>
>
> $ ethtool -i eno1
> driver: e1000e
> version: 3.2.6-k
> firmware-version: 0.4-4
> expansion-rom-version:
> bus-info: 0000:00:1f.6
> supports-statistics: yes
> supports-test: yes
> supports-eeprom-access: yes
> supports-register-dump: yes
> supports-priv-flags: no
>
Yep, this is indeed the driver that Richard mentioned earlier. This
driver has some workarounds for known bugs in the timestamp logic that
can occur with how the hardware latches the SYSTIME registers.
I checked the Linux git history, and the sanitize function that checks
this does appear to be in the 4.18 tree, and has been around for some time.
However, I noticed that a newer fix from Miroslav, commit e1f65b0d70e9
("e1000e: allow non-monotonic SYSTIM readings") landed in Linux 5.0
Per the description:
>
> It seems with some NICs supported by the e1000e driver a SYSTIM reading
> may occasionally be few microseconds before the previous reading and if
> enabled also pass e1000e_sanitize_systim() without reaching the maximum
> number of rereads, even if the function is modified to check three
> consecutive readings (i.e. it doesn't look like a double read error).
> This causes an underflow in the timecounter and the PHC time jumps hours
> ahead.
>
> This was observed on 82574, I217 and I219. The fastest way to reproduce
> it is to run a program that continuously calls the PTP_SYS_OFFSET ioctl
> on the PHC.
>
> Modify e1000e_phc_gettime() to use timecounter_cyc2time() instead of
> timecounter_read() in order to allow non-monotonic SYSTIM readings and
> prevent the PHC from jumping.
>
Without this fix, the time counter can get screwed up just like you
observed.
I would suggest seeing if a kernel update to include the newer driver
would fix this issue for you. You need something at least from 5.0 or
newer, or a distribution which back ported the relevant fix. I don't
believe Ubuntu has done that.
Hope this helps!
Thanks,
Jake
_______________________________________________
Linuxptp-users mailing list
Linuxptp-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxptp-users