On Wed, Jul 20, 2022 at 03:12:39PM +0200, Jakub Raczyński wrote:
> phc2sys[2031.823]: lan1 sys offset      4870 s0 freq      +0 delay   1875
> phc2sys[2032.824]: lan1 sys offset      4915 s0 freq      +0 delay   1875
> phc2sys[2033.824]: lan1 sys offset      5011 s0 freq      +0 delay   1750
> phc2sys[2034.825]: port 360712.fffe.52efd6-1 changed state
> phc2sys[2034.826]: reconfiguring after port state change
> phc2sys[2034.828]: master clock not ready, waiting...
> phc2sys[2035.828]: port 360712.fffe.52efd6-1 changed state
> phc2sys[2035.830]: reconfiguring after port state change
> phc2sys[2035.831]: selecting CLOCK_REALTIME for synchronization
> phc2sys[2035.832]: selecting lan1 as the master clock
> phc2sys[2035.833]: CLOCK_REALTIME phc offset     -5136 s0 freq      +0 delay  
>  1875
> phc2sys[2036.834]: CLOCK_REALTIME phc offset     -4435 s0 freq      +0 delay  
>  1875
> 
> So, as mentioned "That is not expected to work" but kinda did or seemed like 
> it. Would need more research and debugging what is actually happening inside 
> both servos.

There is only one SHM segment and it's used by ntpd for
synchronization of the system clock. When phc2sys reverses the
direction, the offset will flip the sign, intending to synchronize the
PHC to the system clock, but ntpd will still be using the data it
receives to synchronize the system clock, which will cause a positive
feedback loop and the clock will be steered away, stepped, or ntpd
will give up depending on its configuration.

-- 
Miroslav Lichvar



_______________________________________________
Linuxptp-users mailing list
Linuxptp-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxptp-users

Reply via email to