Libor Pechacek
2013-04-26 13:02:05 UTC
Hi,
While playing with a group of hosts using both hardware and software
timestamping I've noticed a discrepancy in UTC/TAI usage.
With master using software timestamping (i.e. using system clock for
timestamps) and slave having a PHC, using hardware timestamping and relying on
phc2sys to sync system clock to PHC, all seems fine until I use phc2sys -w
option. At that point the slave system clock is exactly the 35 seconds behind
master system clock.
Similarly, in reverse setup, master synchronizing system clock to PHC (PHC set
as phc2sys slave here), PHC being broadcast to network by ptp4l, slave using
software timestamping directly synchronizes its system clock to what is coming
from network, the slave is again forced 35 seconds behind the master unless I
use -w on the master.
To sum it up, with the software timestamping master it seems that UTC is
broadcast to the network. I looked into port_tx_sync() and didn't see any
offset calculation for the transmitted timestamp. Didn't dig deeper. Is this
intended or is that a bug?
In the second case, phc2sys by default keeps the same time at both PHC and
system clock, while as to my understanding PHC should be in TAI and system
clock in UTC. Without using -w or -O phc2sys does not maintain any offset
between these two. Shouldn't be -w by default on?
Libor
While playing with a group of hosts using both hardware and software
timestamping I've noticed a discrepancy in UTC/TAI usage.
With master using software timestamping (i.e. using system clock for
timestamps) and slave having a PHC, using hardware timestamping and relying on
phc2sys to sync system clock to PHC, all seems fine until I use phc2sys -w
option. At that point the slave system clock is exactly the 35 seconds behind
master system clock.
Similarly, in reverse setup, master synchronizing system clock to PHC (PHC set
as phc2sys slave here), PHC being broadcast to network by ptp4l, slave using
software timestamping directly synchronizes its system clock to what is coming
from network, the slave is again forced 35 seconds behind the master unless I
use -w on the master.
To sum it up, with the software timestamping master it seems that UTC is
broadcast to the network. I looked into port_tx_sync() and didn't see any
offset calculation for the transmitted timestamp. Didn't dig deeper. Is this
intended or is that a bug?
In the second case, phc2sys by default keeps the same time at both PHC and
system clock, while as to my understanding PHC should be in TAI and system
clock in UTC. Without using -w or -O phc2sys does not maintain any offset
between these two. Shouldn't be -w by default on?
Libor