我试图用硬件时间戳同步从属和主控系统时钟似乎与 PHC 同步,PHC 和 GM 同步看起来也不错。然后我在 ptp4l 日志中观察到了这一点
这是日志
root@...:~# ./ptp4l -i eth0 -f automotive-slave.cfg -m
ptp4l[1309.347]: selected /dev/ptp0 as PTP clock
ptp4l[1309.430]: port 1: INITIALIZING to SLAVE on INIT_COMPLETE
ptp4l[1309.431]: port 0: INITIALIZING to LISTENING on INIT_COMPLETE
ptp4l[1309.860]: port 1: new foreign master 26cc35.fffe.82241b-1
ptp4l[1311.431]: rms 8877 max 11480 freq -9601 +/- 6103 delay 14980 +/- 0
ptp4l[1312.431]: rms 1612 max 2410 freq -4435 +/- 2251 delay 14990 +/- 0
ptp4l[1313.431]: rms 2555 max 2700 freq +397 +/- 667 delay 15000 +/- 0
ptp4l[1313.860]: selected best master clock 26cc35.fffe.82241b
ptp4l[1315.079]: rms 1343 max 2167 freq +631 +/- 533 delay 14996 +/- 4
ptp4l[1316.129]: rms 448 max 640 freq +302 +/- 92 delay 15000 +/- 0
ptp4l[1317.079]: rms 147 max 300 freq +132 +/- 111 delay 15000 +/- 0
ptp4l[1318.089]: rms 103 max 160 freq -51 +/- 136 delay 15000 +/- 0
ptp4l[1319.089]: rms 64 max 100 freq -108 +/- 67 delay 15000 +/- 0
ptp4l[1320.089]: rms 62 max 97 freq -95 +/- 84 delay 15003 +/- 0
ptp4l[1321.089]: rms 54 max 87 freq -85 +/- 74 delay 15013 +/- 0
ptp4l[1322.089]: rms 58 max 133 freq -85 +/- 80 delay 15013 +/- 0
ptp4l[1322.209]: master offset 107 s3 freq +26 path delay 15013
ptp4l[1323.209]: master offset -74 s3 freq -123 path delay 15014
ptp4l[1324.209]: master offset -114 s3 freq -185 path delay 15014
ptp4l[1325.209]: master offset 46 s3 freq -59 path delay 15014
ptp4l[1326.209]: master offset -54 s3 freq -145 path delay 15014
ptp4l[1327.209]: master offset 86 s3 freq -22 path delay 15014
ptp4l[1328.209]: master offset -54 s3 freq -136 path delay 15014
ptp4l[1329.209]: master offset 26 s3 freq -72 path delay 15014
ptp4l[1330.209]: master offset 26 s3 freq -64 path delay 15014
ptp4l[1331.209]: master offset 136 s3 freq +54 path delay 15004
ptp4l[1332.209]: master offset -84 s3 freq -126 path delay 15004
ptp4l[1333.209]: master offset -24 s3 freq -91 path delay 15004
ptp4l[1334.219]: master offset -44 s3 freq -118 path delay 15004
ptp4l[1335.219]: master offset 41 s3 freq -46 path delay 14999
ptp4l[1336.219]: master offset -99 s3 freq -174 path delay 14999
ptp4l[1337.219]: master offset 41 s3 freq -64 path delay 14999
ptp4l[1338.219]: master offset -19 s3 freq -111 path delay 14999
ptp4l[1339.219]: master offset -39 s3 freq -137 path delay 14999
ptp4l[1340.170]: master offset 201 s3 freq +91 path delay 14999
ptp4l[1341.219]: master offset -99 s3 freq -148 path delay 14999
ptp4l[1342.219]: master offset 41 s3 freq -38 path delay 14999
ptp4l[1343.219]: master offset -194 s3 freq -261 path delay 15014
ptp4l[1344.219]: master offset 146 s3 freq +21 path delay 15014
ptp4l[1345.219]: master offset -14 s3 freq -95 path delay 15014
ptp4l[1346.195]: master offset 106 s3 freq +21 path delay 15014
ptp4l[1347.229]: master offset -59 s3 freq -113 path delay 14999
ptp4l[1348.219]: master offset 1 s3 freq -70 path delay 14999
ptp4l[1349.219]: master offset 21 s3 freq -50 path delay 14999
ptp4l[1350.219]: master offset -39 s3 freq -104 path delay 14999
ptp4l[1351.219]: master offset -99 s3 freq -175 path delay 14999
ptp4l[1352.219]: master offset 41 s3 freq -65 path delay 14999
ptp4l[1353.219]: master offset -19 s3 freq -113 path delay 14999
ptp4l[1354.219]: master offset 121 s3 freq +21 path delay 14999
ptp4l[1355.219]: master offset -179 s3 freq -242 path delay 14999
ptp4l[1356.219]: master offset 121 s3 freq +4 path delay 14999
ptp4l[1357.219]: master offset -79 s3 freq -160 path delay 14999
ptp4l[1358.219]: master offset 21 s3 freq -83 path delay 14999
ptp4l[1359.219]: master offset -84 s3 freq -182 path delay 15024
ptp4l[1360.219]: master offset 136 s3 freq +13 path delay 15024
ptp4l[1361.172]: master offset 96 s3 freq +14 path delay 15024
ptp4l[1362.219]: master offset -84 s3 freq -138 path delay 15024
ptp4l[1363.219]: master offset -179 s3 freq -258 path delay 15019
ptp4l[1364.219]: master offset 281 s3 freq +148 path delay 15019
ptp4l[1365.219]: master offset -79 s3 freq -127 path delay 15019
为什么主偏移不始终小于 100ns。根据此链接中的说明:https ://tsn.readthedocs.io/timesync.html 主偏移量应小于 100ns 以考虑时钟已正确同步
那么,主偏移值在 100ns 上下波动的原因可能是什么?谁能指导我理解这种行为