Re: [Linuxptp-users] PTP master slewing to other network time
PTP IEEE 1588 stack for Linux
Brought to you by:
rcochran
From: Dave C. <dav...@un...> - 2013-08-21 11:46:10
|
Hi Miroslav, Thanks for the quick response. On Wed, Aug 21, 2013 at 12:29 PM, Miroslav Lichvar <mli...@re...>wrote: > On Wed, Aug 21, 2013 at 11:23:41AM +0100, Dave Craig wrote: > > There's already a process on each device that gets the current time via > NTP > > or HTTP and so I'd like to make it so that the PTP master accepts times > > from this process and slews/steps it's clock appropriately. Devices which > > are currently slaves would simply ignore/discard the attempts to set > their > > time and stay locked to the master. > > Is there already a mechanism I can use to do this that I've missed, or > > should I try adding one to ptp4l or possibly phc2sys? > > Is that with hw or sw time stamping? > I'm using sw timestamping. > You can check if the local PTP port is in the master state with > pmc -u -b 0 'GET PORT_DATA_SET'. Although I can get the master state and then choose to set the system clock based on that, it means that I'd be writing very similar code to the servo code of PTP inside my NTP process. It currently just calls settimeofday, but I'd rather it slewed to the new time more gracefully. I wondered if having that work done inside ptp4l would be tidier? In the master state the clock servo would be accepting changes over pmc and in the slave state ignoring it. Thanks Dave |