I am using ptpd in slave mode. This is the version that I'm using, it is not the newest one, but this one was available from package sources.
ptpd -g -b eth0 -D -f /var/log/ptpd/stats.log
Installed: 2.2.2-debian1-2
Candidate: 2.2.2-debian1-2
Version table:
*** 2.2.2-debian1-2 0
500 http://ba.archive.ubuntu.com/ubuntu/ trusty/universe amd64 Packages
100 /var/lib/dpkg/status
My master clock is running ptp4l with (hopefully?) hardware timestamping.
ptp4l -4 -H -i p1p1
The associated network card doing this is an Intel 82574L.
ethtool output:
Time stamping parameters for p1p1:
Capabilities:
hardware-transmit (SOF_TIMESTAMPING_TX_HARDWARE)
software-transmit (SOF_TIMESTAMPING_TX_SOFTWARE)
hardware-receive (SOF_TIMESTAMPING_RX_HARDWARE)
software-receive (SOF_TIMESTAMPING_RX_SOFTWARE)
software-system-clock (SOF_TIMESTAMPING_SOFTWARE)
hardware-raw-clock (SOF_TIMESTAMPING_RAW_HARDWARE)
PTP Hardware Clock: 0
Hardware Transmit Timestamp Modes:
off (HWTSTAMP_TX_OFF)
on (HWTSTAMP_TX_ON)
Hardware Receive Filter Modes:
none (HWTSTAMP_FILTER_NONE)
all (HWTSTAMP_FILTER_ALL)
ptpv1-l4-sync (HWTSTAMP_FILTER_PTP_V1_L4_SYNC)
ptpv1-l4-delay-req (HWTSTAMP_FILTER_PTP_V1_L4_DELAY_REQ)
ptpv2-l4-sync (HWTSTAMP_FILTER_PTP_V2_L4_SYNC)
ptpv2-l4-delay-req (HWTSTAMP_FILTER_PTP_V2_L4_DELAY_REQ)
ptpv2-l2-sync (HWTSTAMP_FILTER_PTP_V2_L2_SYNC)
ptpv2-l2-delay-req (HWTSTAMP_FILTER_PTP_V2_L2_DELAY_REQ)
ptpv2-event (HWTSTAMP_FILTER_PTP_V2_EVENT)
ptpv2-sync (HWTSTAMP_FILTER_PTP_V2_SYNC)
ptpv2-delay-req (HWTSTAMP_FILTER_PTP_V2_DELAY_REQ)
Now to the issue.
If I look in the slave log, I see lines like this:
2016-02-22 09:11:24.258947, slv, 6805cafffe39dabc(unknown)/01, 0.000000000, 0.000000365, 0.000000000, 0.000001337, 31081, 0, S
2016-02-22 09:11:25.259040, slv, 6805cafffe39dabc(unknown)/01, 0.000000000, 0.000002293, 0.000000000, 0.000003250, 31083, 0, S
2016-02-22 09:11:26.259097, slv, 6805cafffe39dabc(unknown)/01, 0.000000000, 0.000002104, 0.000000000, 0.000000958, 31085, 0, S
2016-02-22 09:11:27.259169, slv, 6805cafffe39dabc(unknown)/01, 0.000000000, 0.000000642, 0.000000000, 0.000000327, 31085, 0, S
One Way Delay and Slave to Master are 0, my feeling says that this can not be correct, as the one-way-delay should at least be larger than 0.
This slave has a Broadcom BCM5754 NIC.
Time stamping parameters for eth1:
Capabilities:
software-transmit (SOF_TIMESTAMPING_TX_SOFTWARE)
software-receive (SOF_TIMESTAMPING_RX_SOFTWARE)
software-system-clock (SOF_TIMESTAMPING_SOFTWARE)
PTP Hardware Clock: none
Hardware Transmit Timestamp Modes:
off (HWTSTAMP_TX_OFF)
on (HWTSTAMP_TX_ON)
Hardware Receive Filter Modes:
none (HWTSTAMP_FILTER_NONE)
ptpv1-l4-event (HWTSTAMP_FILTER_PTP_V1_L4_EVENT)
ptpv2-l4-event (HWTSTAMP_FILTER_PTP_V2_L4_EVENT)
ptpv2-l2-event (HWTSTAMP_FILTER_PTP_V2_L2_EVENT)
I also have another slave, same output in the logfile:
2016-02-22 09:13:36.265614, slv, 6805cafffe39dabc(unknown)/01, 0.000000000, 0.000021380, 0.000000000, 0.000030137, -3721, 0, S
2016-02-22 09:13:37.265580, slv, 6805cafffe39dabc(unknown)/01, 0.000000000, 0.000001287, 0.000000000, -0.000027563, -3720, 0, S
2016-02-22 09:13:38.265691, slv, 6805cafffe39dabc(unknown)/01, 0.000000000, -0.000005543, 0.000000000, 0.000016477, -3725, 0, S
The drift here is way better than the other slave, probably because the NIC (Intel 82579LM) on this machine has some hardware timestamping function. But I thought they are not active in ptpd, or is the NIC doing some stuff here?
Time stamping parameters for eth1:
Capabilities:
hardware-transmit (SOF_TIMESTAMPING_TX_HARDWARE)
software-transmit (SOF_TIMESTAMPING_TX_SOFTWARE)
hardware-receive (SOF_TIMESTAMPING_RX_HARDWARE)
software-receive (SOF_TIMESTAMPING_RX_SOFTWARE)
software-system-clock (SOF_TIMESTAMPING_SOFTWARE)
hardware-raw-clock (SOF_TIMESTAMPING_RAW_HARDWARE)
PTP Hardware Clock: 0
Hardware Transmit Timestamp Modes:
off (HWTSTAMP_TX_OFF)
on (HWTSTAMP_TX_ON)
Hardware Receive Filter Modes:
none (HWTSTAMP_FILTER_NONE)
all (HWTSTAMP_FILTER_ALL)
ptpv1-l4-sync (HWTSTAMP_FILTER_PTP_V1_L4_SYNC)
ptpv1-l4-delay-req (HWTSTAMP_FILTER_PTP_V1_L4_DELAY_REQ)
ptpv2-l4-sync (HWTSTAMP_FILTER_PTP_V2_L4_SYNC)
ptpv2-l4-delay-req (HWTSTAMP_FILTER_PTP_V2_L4_DELAY_REQ)
ptpv2-l2-sync (HWTSTAMP_FILTER_PTP_V2_L2_SYNC)
ptpv2-l2-delay-req (HWTSTAMP_FILTER_PTP_V2_L2_DELAY_REQ)
ptpv2-event (HWTSTAMP_FILTER_PTP_V2_EVENT)
ptpv2-sync (HWTSTAMP_FILTER_PTP_V2_SYNC)
ptpv2-delay-req (HWTSTAMP_FILTER_PTP_V2_DELAY_REQ)
Is this behaviour correct?
Thank you.