On Thu, Dec 10, 2015 at 4:25 AM, Richard Cochran <richardcoch...@gmail.com> wrote: >> I am having an issue with the ptp4l client and network connectivity. The >> client works just fine and syncs the hardware clock on an Intel e1000 >> device. > > Which device?
It is an Intel 82574L. 8086:10d3 >> However, if anything interrupts that connectivity for a couple of >> seconds the clock seems to drop the fact that it is synced to a TAI time >> source with a leap second offset. It will panic that it is behind and jump >> forward 36 seconds (the current leap second offset). Then a few seconds >> later when connectivity is restored and resynced, it realizes it is now 36 >> seconds fast and takes 20 minutes or more to work back to the correct time. > > IIRC, this problem is due to the fact the e1000 HW and driver requires > a complete reset when the link goes down. The old time values gets > lost, and the driver simply initializes the clock with the current > system time. > >> I am able to reproduce this by temporarily blocking access to 1588 udp >> ports 319 and 320 through iptables. Wait a few seconds and the clock will >> jump ahead by the leap second offest. Unblock the udp ports and then the >> clock begins the long process of adjusting back to the actual time. > > Hm, I wouldn't expect that behavior, but it does sound like the link > loss symptom. > >> Is there a setting that I have missed or something I have over looked? The >> ptp4l client does not have many options. I would think that the clock >> should maintain the last known offset during the brief interruption. > > I think the source of the jump is not in ptp4l but rather in the > driver or HW. I am running tests using kernel version 4.1.7. I will try and trace it down some more. Looking again it appears it may be the opposite of what I thought. ptp4l is maintaining the offset value while the hardware clock has switched back to UTC time. I am not seeing anywhere that ptp4l is reseting the offset to 0 during this state. Connectivity working: root@host:~> phc_ctl eth0 cmp get phc_ctl[92833.880]: offset from CLOCK_REALTIME is -36000012151ns phc_ctl[92833.880]: clock time is 1449766596.912500774 or Thu Dec 10 16:56:36 2015 Ports blocked: root@host:~> phc_ctl eth0 cmp get phc_ctl[92834.718]: offset from CLOCK_REALTIME is 7518ns phc_ctl[92834.719]: clock time is 1449766561.750694117 or Thu Dec 10 16:56:01 2015 ------------------------------------------------------------------------------ _______________________________________________ Linuxptp-users mailing list Linuxptp-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxptp-users