[Linuxptp-users] Hardware PTP clock synchronization
PTP IEEE 1588 stack for Linux
Brought to you by:
rcochran
From: Гаврилов А. <le...@im...> - 2013-08-01 07:57:24
|
Hello! I encountered a problem while obtaining the time from the adapter Intel pro1000 (82576). I use Fedora 18 kernel version 3.9.6. The values of the time I get through clock_gettime (id, timevalue) for the device / dev/ptp0. The source of the PTP packet is switch Hirschmann MAR1140. Wireshark shows the presence of all necessary for the implementation of the protocol PTP packets at the input adapter interface, but the time in the PTP counters are not adjusted in accordance with the values of the packages. I compiled linuxptp-1.2 downloaded from http://linuxptp.sourceforge.net/ and run the following commands: Hardware timestamping: # ptp4l -i p16p1 -p /dev/ptp0 -m -2 -H ptp4l[3704.267]: selected /dev/ptp0 as PTP clock ptp4l[3704.278]: port 1: INITIALIZING to LISTENING on INITIALIZE ptp4l[3704.278]: port 0: INITIALIZING to LISTENING on INITIALIZE ptp4l[3705.077]: port 1: new foreign master ece555.fffe.2de639-2 ptp4l[3709.401]: selected best master clock ece555.fffe.2de639 ptp4l[3709.401]: port 1: LISTENING to UNCALIBRATED on RS_SLAVE ptp4l[3710.039]: recvmsg tx timestamp failed: Resource temporarily unavailable ptp4l[3710.039]: port 1: send delay request failed ptp4l[3710.039]: port 1: UNCALIBRATED to FAULTY on FAULT_DETECTED ptp4l[3725.690]: port 1: FAULTY to LISTENING on FAULT_CLEARED ptp4l[3726.698]: port 1: new foreign master ece555.fffe.2de639-2 ptp4l[3731.022]: selected best master clock ece555.fffe.2de639 ptp4l[3731.022]: port 1: LISTENING to UNCALIBRATED on RS_SLAVE ptp4l[3731.193]: recvmsg tx timestamp failed: Resource temporarily unavailable ptp4l[3731.193]: port 1: send delay request failed ptp4l[3731.193]: port 1: UNCALIBRATED to FAULTY on FAULT_DETECTED Software timestamping: # ptp4l -i p16p1 -p /dev/ptp0 -m -2 -S ptp4l[3826.218]: port 1: INITIALIZING to LISTENING on INITIALIZE ptp4l[3826.218]: port 0: INITIALIZING to LISTENING on INITIALIZE ptp4l[3828.312]: port 1: new foreign master ece555.fffe.2de639-2 ptp4l[3832.218]: port 1: LISTENING to MASTER on ANNOUNCE_RECEIPT_TIMEOUT_EXPIRES ptp4l[3832.636]: selected best master clock ece555.fffe.2de639 ptp4l[3832.636]: port 1: MASTER to UNCALIBRATED on RS_SLAVE ptp4l[3833.805]: negative path delay -3374260 ptp4l[3833.805]: path_delay = (t2 - t3) + (t4 - t1) ptp4l[3833.805]: t2 - t3 = -87573969 ptp4l[3833.805]: t4 - t1 = +80825448 ptp4l[3833.805]: c1 0 ptp4l[3833.805]: c2 0 ptp4l[3833.805]: c3 0 ptp4l[3833.805]: port 1: minimum delay request interval 2^3 ptp4l[3834.628]: negative path delay -35159469 ptp4l[3834.628]: path_delay = (t2 - t3) + (t4 - t1) ptp4l[3834.628]: t2 - t3 = -910670474 ptp4l[3834.628]: t4 - t1 = +840351536 ptp4l[3834.628]: c1 0 ptp4l[3834.628]: c2 0 ptp4l[3834.628]: c3 0 ptp4l[3834.798]: master offset -10774702751233 s0 adj +0 path delay -19266864 ptp4l[3835.879]: master offset -10774619261329 s0 adj +0 path delay -19266864 What is the difference between hardware and software timestamping in this case? Why Hardware timestamping is not working properly? Why software timestamping shows the correct time values, but does not synchronize time with hardware ptp clock (/dev/ptp0)? Sincerely, Alexander. |