On 2018-08-01 14:53, Miroslav Lichvar wrote:
On Wed, Aug 01, 2018 at 12:17:42PM +0800, l...@codeaurora.org wrote:
ptp4l[195.204]: master offset          2 s2 freq      +2 path de[
195.207356] **********kernel adjfreq get ppb: fffffffe
lay      3746
ptp4l[195.522]: port 1: delay timeout
ptp4l[195.523]: delay   filtered       3752   raw   31363083
ptp4l[196.204]: master offset -199005272 s2 freq -3124999 path d[
196.207369] **********kernel adjfreq get ppb: 2faf07
elay      3752
ptp4l[197.204]: master offset -196906469 s2 freq -3124999 path d[
197.207393] **********kernel adjfreq get ppb: 2faf07
elay      3752

This does look like a HW/driver issue. The local PTP clock is suddenly
behind by 199 milliseconds, so ptp4l speeds up the clock to catch up
with the true time.

Or the GM is skipping ahead. But I assume you have tried it with SW
timestamping and it worked ok.

I also printed the t1-t4 timestamp as below log, as you can see, the timestamp(t2) of slave is slower after the abnormal ppb(0x2faf07) configured to the PHC, which leads to the large offset from the master, would you help tell me the relation between the value of freq and the value of ppb?

bc_event received a message:0

ptp4l[81006.889]: port_syfufsm p->syfu: 0 event :0

ptp4l[81006.889]: bc_event received a message:8

ptp4l[81006.889]: port_syfufsm p->syfu: 1 event :3

ptp4l[81006.889]: port_synchronize t1 80980029191759t2 80980029195486c1 0c2 0t1c 80980029191759
ptp4l[81006.889]: tsproc_update_offset tsp->mode:0

ptp4l[81006.889]: tsproc_update_offset t1 80980029191759t2 80980029195486delay 3721 ptp4l[81006.889]: clock_synchronize master offset 6 s2 freq +1 path delay 3721
ptp4l[81007.300]: port 1: delay timeout
ptp4l[81007.301]: bc_event received a message:9

ptp4l[81007.301]: positive/negative delay   41106225
ptp4l[81007.301]: delay = (t2 - t3) * rr + (t4 - t1)
ptp4l[81007.301]: t2 - t3 = -330089709
ptp4l[81007.301]: t4 - t1 = +412302160
ptp4l[81007.301]: rr = 1.000000000
ptp4l[81007.301]: t1 +80980029191759
ptp4l[81007.301]: t2 +80980029195486
ptp4l[81007.301]: t3 +80980359285195
ptp4l[81007.301]: t4 +80980441493919
ptp4l[81007.301]: tsp->mode: 0 delay filtered 3721 raw 41106225 ptp4l[81007.889]: [81007.892095] **********kernel adjfreq get ppb: 2faf07
bc_event received a message:0

ptp4l[81007.889]: port_syfufsm p->syfu: 0 event :0

ptp4l[81007.889]: bc_event received a message:8

ptp4l[81007.889]: port_syfufsm p->syfu: 1 event :3

ptp4l[81007.889]: port_synchronize t1 80981029222994t2 80980829474447c1 0c2 0t1c 80981029222994
ptp4l[81007.889]: tsproc_update_offset tsp->mode:0

ptp4l[81007.889]: tsproc_update_offset t1 80981029222994t2 80980829474447delay 3721 ptp4l[81007.889]: clock_synchronize master offset -199752268 s2 freq -3124999 path delay 3721
ptp4l[81007.889]: bc_event received a message:b

ptp4l[81008.889]: [81008.892130] **********kernel adjfreq get ppb: 2faf07
bc_event received a message:0

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Linuxptp-users mailing list
Linuxptp-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxptp-users

Reply via email to