Post by Richard CochranPost by Shawn BohrerI took a look at the code and can see this is because vlan interfaces
do not report that they support SOF_TIMESTAMPING_TX_SOFTWARE. The
underlying device interface eth4 however does claim to support
SOF_TIMESTAMPING_TX_SOFTWARE.
Can you try hacking the code to omit the ethtool check?
If the time stamping actually works, and the only problem is the
ethtool reporting, then that would probably be an easy kernel fix.
I left the message in but let it continue. It appears to work fine
with software timestamps, or at least I don't see any relevant errors
and it is adjusting the clock. I haven't looked into the "port 1:
delay timeout" messages yet.
***@berbox40:~/linuxptp# ./ptp4l -S -i vlan807 -s -l7 -m -f default.cfg
interface 'vlan807' does not support requested timestamping mode.
ptp4l[245.983]: PI servo: sync interval 1.000 kp 0.100 ki 0.001000
ptp4l[245.983]: port 1: INITIALIZING to LISTENING on INITIALIZE
ptp4l[245.983]: port 0: INITIALIZING to LISTENING on INITIALIZE
ptp4l[246.042]: port 1: setting asCapable
ptp4l[247.042]: port 1: new foreign master 0050c2.fffe.de95be-1
ptp4l[251.040]: selected best master clock 0050c2.fffe.de95be
ptp4l[251.040]: port 1: LISTENING to UNCALIBRATED on RS_SLAVE
ptp4l[252.174]: port 1: delay timeout
ptp4l[252.174]: path delay 55915 55915
ptp4l[252.174]: port 1: minimum delay request interval 2^3
ptp4l[252.308]: port 1: delay timeout
ptp4l[252.310]: path delay 74143 92372
ptp4l[253.038]: master offset 104525904 s0 freq +0 path delay 74143
ptp4l[254.038]: master offset 103983280 s0 freq +0 path delay 74143
ptp4l[255.038]: master offset 103440336 s0 freq +0 path delay 74143
ptp4l[256.037]: master offset 102900750 s0 freq +0 path delay 74143
ptp4l[257.037]: master offset 102356489 s0 freq +0 path delay 74143
ptp4l[258.036]: master offset 101812007 s0 freq +0 path delay 74143
ptp4l[259.036]: master offset 101270800 s0 freq +0 path delay 74143
ptp4l[260.035]: master offset 100726417 s0 freq +0 path delay 74143
ptp4l[261.035]: master offset 100183093 s0 freq +0 path delay 74143
ptp4l[262.034]: master offset 99642376 s0 freq +0 path delay 74143
ptp4l[263.034]: master offset 99097737 s0 freq +0 path delay 74143
ptp4l[264.033]: master offset 98554559 s0 freq +0 path delay 74143
ptp4l[265.033]: master offset 98013725 s0 freq +0 path delay 74143
ptp4l[266.032]: master offset 97468859 s0 freq +0 path delay 74143
ptp4l[267.032]: master offset 96928505 s0 freq +0 path delay 74143
ptp4l[267.886]: port 1: delay timeout
ptp4l[267.887]: path delay 92372 252146
ptp4l[268.031]: master offset 96367211 s0 freq +0 path delay 92372
ptp4l[269.031]: master offset 95822598 s1 freq -44222 path delay 92372
ptp4l[270.031]: master offset 440 s2 freq -44177 path delay 92372
ptp4l[270.031]: port 1: UNCALIBRATED to SLAVE on MASTER_CLOCK_SELECTED
ptp4l[270.688]: port 1: delay timeout
ptp4l[270.689]: path delay 74143 18259
ptp4l[271.031]: master offset 20279 s2 freq -42173 path delay 74143
ptp4l[272.031]: master offset 20349 s2 freq -42146 path delay 74143
ptp4l[273.031]: master offset 20117 s2 freq -42149 path delay 74143
ptp4l[273.675]: port 1: delay timeout
ptp4l[273.676]: path delay 55915 19779
ptp4l[274.031]: master offset 37265 s2 freq -40397 path delay 55915
ptp4l[275.031]: master offset 43916 s2 freq -39688 path delay 55915
ptp4l[276.031]: master offset 32209 s2 freq -40826 path delay 55915
ptp4l[276.428]: port 1: delay timeout
ptp4l[276.429]: path delay 37856 19798
ptp4l[277.031]: master offset 49835 s2 freq -39014 path delay 37856
ptp4l[278.032]: master offset 43080 s2 freq -39646 path delay 37856
ptp4l[279.031]: master offset 40082 s2 freq -39906 path delay 37856
ptp4l[280.031]: master offset 37553 s2 freq -40121 path delay 37856
ptp4l[281.031]: master offset 40731 s2 freq -39763 path delay 37856
ptp4l[282.031]: master offset 31761 s2 freq -40628 path delay 37856
ptp4l[283.031]: master offset 29417 s2 freq -40833 path delay 37856
My end goal though is to use hardware timestamps and that currently
does not work on the vlan interface simply because the SIOCSHWTSTAMP
ioctl fails. I'm not sure how it is done, but should ptp4l recognize
that it is a vlan interface and perform ioctl and ethtool queries
against the actual device interface? I know the 'ip' tool associates
vlan807 with eth4 so that mapping can be detected somehow:
$ ip addr show vlan807
10: ***@eth4: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP
link/ether 00:02:c9:31:8b:21 brd ff:ff:ff:ff:ff:ff
inet 10.8.7.20/24 brd 10.8.7.255 scope global vlan807
valid_lft forever preferred_lft forever
inet6 fe80::2:c900:131:8b21/64 scope link
valid_lft forever preferred_lft forever
--
Shawn