Hi everybody, for a little project at our company I try to sync the system clocks of two devices. Both devices use a Intel 82574L network interface. On the PTP-master phc2sys is used to sync CLOCK_REALTIME to /dev/ptp0. On the PTP-slave phy2sys is used to sync /dev/ptp0 to CLOCK_REALTIME. Linux Kernel v3.12.2 is used. Basically the whole sync process seems to work, but from time to time the /dev/ptp0 device do a big time jump (sometimes on master, sometimes on slave).
Log output of the PTP slave: /var/src/linuxptp # ./ptp4l -i eth0 -m -l6 -s ptp4l[67389.205]: selected /dev/ptp0 as PTP clock ptp4l[67389.208]: port 1: INITIALIZING to LISTENING on INITIALIZE ptp4l[67389.209]: port 0: INITIALIZING to LISTENING on INITIALIZE ptp4l[67394.495]: port 1: new foreign master 0013ab.fffe.004874-1 ptp4l[67396.079]: selected best master clock 0013ab.fffe.003ea2 ptp4l[67398.596]: selected best master clock 0013ab.fffe.004874 ptp4l[67398.596]: port 1: LISTENING to UNCALIBRATED on RS_SLAVE ptp4l[67400.596]: master offset 692552075142917737 s0 freq +44869 path delay -3816 ptp4l[67401.596]: master offset 692552075142969782 s1 freq +96896 path delay -10659 ptp4l[67402.596]: master offset -47285 s2 freq +49611 path delay -10659 ptp4l[67402.596]: port 1: UNCALIBRATED to SLAVE on MASTER_CLOCK_SELECTED ptp4l[67403.597]: master offset -56417 s2 freq +26293 path delay -10659 ptp4l[67404.597]: master offset -45713 s2 freq +20072 path delay -4808 ptp4l[67405.599]: master offset -21317 s2 freq +30754 path delay -4808 ptp4l[67406.597]: master offset -6970 s2 freq +38706 path delay -3816 ptp4l[67407.597]: master offset -961 s2 freq +42624 path delay -2878 ptp4l[67408.686]: master offset 245 s2 freq +43542 path delay -1401 ... ptp4l[67877.698]: master offset -109 s2 freq +44802 path delay 728 ptp4l[67878.698]: master offset -29 s2 freq +44850 path delay 728 ptp4l[67879.611]: clockcheck: clock jumped forward or running faster than expected! ptp4l[67879.721]: master offset 70368744177690 s0 freq +44850 path delay 725 ptp4l[67879.722]: port 1: SLAVE to UNCALIBRATED on SYNCHRONIZATION_FAULT ptp4l[67880.822]: master offset 70368744177750 s1 freq +44930 path delay 720 ptp4l[67881.840]: master offset -5688 s2 freq +39242 path delay 720 ptp4l[67881.840]: port 1: UNCALIBRATED to SLAVE on MASTER_CLOCK_SELECTED ptp4l[67882.748]: master offset -584 s2 freq +42640 path delay 712 ptp4l[67883.690]: master offset 2016 s2 freq +45064 path delay 702 ptp4l[67884.679]: master offset 2126 s2 freq +45779 path delay 695 ... I tried a few things to locate the reason for this behavior, and find out it's possible to decrease the time between this time jumps dramatically by do a lot of clk_getime() calls on the ptp device. For this test a modified the kernel testptp tool to read the time in a loop. Log output: /var/src # ./testptp -d /dev/ptp0 -g readCount=1; clock time: 1394816657.943618751 or Fri Mar 14 17:04:17 2014 readCount=2; clock time: 1394816657.944179005 or Fri Mar 14 17:04:17 2014 ... readCount=41985; clock time: 1394816661.206155491 or Fri Mar 14 17:04:21 2014 readCount=41986; clock time: 1394816661.206209448 or Fri Mar 14 17:04:21 2014 readCount=41987; clock time: 1394887029.949932637 or Sat Mar 15 12:37:09 2014 readCount=41988; clock time: 1394887029.950497306 or Sat Mar 15 12:37:09 2014 ... readCount=73430; clock time: 1394887032.177426719 or Sat Mar 15 12:37:12 2014 readCount=73431; clock time: 1394887032.177519354 or Sat Mar 15 12:37:12 2014 readCount=73432; clock time: 1394957400.921267022 or Sun Mar 16 08:10:00 2014 readCount=73433; clock time: 1394957400.921897480 or Sun Mar 16 08:10:00 2014 ... I guess this big time jumps are not normal, so do anybody know how I can fix this problem? Regards, Thomas ------------------------------------------------------------------------------ Flow-based real-time traffic analytics software. Cisco certified tool. Monitor traffic, SLAs, QoS, Medianet, WAAS etc. with NetFlow Analyzer Customize your own dashboards, set traffic alerts and generate reports. Network behavioral analysis & security monitoring. All-in-one tool. http://pubads.g.doubleclick.net/gampad/clk?id=126839071&iu=/4140/ostg.clktrk _______________________________________________ Linuxptp-users mailing list Linuxptp-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxptp-users