Project Home
Project Home
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - ptpd very long synchronisation time: (9 Items)
   
ptpd very long synchronisation time  
Hello,

I am running ptpd with an Intel i210 to synchronise a PTP slave. The e1000 driver is started with the ptp flag so the 
hardware timestamp support in the i210 is enabled.

I'm starting ptpd in foreground to see the statistics on the console as follows:

# ptpd -C -g -L -b wm0 

The ptpd takes a very long time to synchronise the slave PTP time to the master - anything from several minutes to more 
than 10 minutes. The time required to converge the clocks appears to be dependent on the initial clock offset. For 
example, If the offset is tens or hundreds of milliseconds the convergence is linear until the offset less than one 
millisecond at which point it takes a non-linear path, still slowly.

By comparison, Linux ptp4l takes about 30 seconds to synchronise the clocks regardless of the initial clock offset.

The PTP master in my configuration is another QNX system with an i210 interface with hardware timestamps enabled. The 
same behaviour is seen if the master is a Linux machine running ptp4l. 

I've tried E2E and P2P - behaviour is the same.

ptpd-avb appears to be broken - the slave does not syncrhonise at all.

I am using the generic x86_64 BSP on a Skylake target board. My ptpd is from package com.qnx.sdp.target.net.ptp/7.0.1031
.S201810151344

I have also tried teh new SDP 7.0.4 release (com.qnx.sdp.target.net.ptp/7.0.4247.S201906281113) but the behaviour is the
 same.

Is the behaviour I am seeing normal for QNX ptpd? 
If not, what is the expected QNX ptpd slave convergence time? 10 minutes is way too long to be useful.

Thanks,
John
Re: ptpd very long synchronisation time  
Hi John,

Our test records indicate a sync time of 9 minutes while running ptpd and about 5 when running ptpd-avb.

Regarding ptpd-avb not syncing, are you using ptpd-avb as the master? If so, we recently discovered a bug in the 
implementation which affects time sync. So, you could ask QNX support for an experimental release with the fix for JI:
2773204.

However, ptpd-avb should still be able to sync with a ptp4l master without the fix.You could try that out.

Thanks,
Lomash
Re: ptpd very long synchronisation time  
Hi Lomash,

> Our test records indicate a sync time of 9 minutes while running ptpd and 
> about 5 when running ptpd-avb.

Thanks for the data.

> Regarding ptpd-avb not syncing, are you using ptpd-avb as the master? If so, 
> we recently discovered a bug in the implementation which affects time sync. So
> , you could ask QNX support for an experimental release with the fix for JI:
> 2773204.

Yes, I was using ptpd-avb as the master. I will ask for this release

> However, ptpd-avb should still be able to sync with a ptp4l master without the
>  fix.You could try that out.

I have tried and got mixed results. I did see it synchronise once but most of the time it does not. More specifically, 
the slave clock diverges from the master rather than converging.

Most of my tests were using P2P with direct cable connection between master and slave interfaces. I am using ptp4l 
version 1.6 on Ubuntu 16.04 with i210 master.

What is your test configuration?

John
Re: ptpd very long synchronisation time  
I have had good results while running ptpd-avb on a QNX machine as the slave and directly connected to an Ubuntu 18.04 
machine running ptp4l with the gPTP config. But for this to work reliably, I had to update the neighborPropDelayThresh 
and min_neighbor_prop_delay parameters to appropriate values on the linux side.

I would also recommend using the 7.0.4 release.
Re: ptpd very long synchronisation time  
Hi Lomash,

Could you tell me what  values you used for these parameters, please? 

John
Re: ptpd very long synchronisation time  
I have neighborPropDelayThresh configured at 50000 and min_neighbor_prop_delay at -20000000
Re: ptpd very long synchronisation time  
Hi Lomash,

Even with your numbers I cannot get ptpd-avb to synchronise properly with the ptp4l master. I find that the slave clock 
converges to about 500us from the master clock and then begins oscillate between 500us and 1500us. 

Thanks for your help on this. I'll try again once I have the latest software.

Regards,
John
Re: ptpd very long synchronisation time  
Hi John,
That almost sounds like it is using software timestamping rather than hardware timestamping. When you load the e1000 
driver are you passing "ptp" as an option to it? If you run ptpd with console logging on (-C option) is it showing 
hardware or software in the startup message?
Regards,
Nick
Re: ptpd very long synchronisation time  
Hi Nick,

Yes, it does seem like that but as I said in my original post I am starting the e1000 driver with the ptp flag. All my 
testing has been with the -C flag to see the statistics and I always see the following when ptpd and ptpd-avb start up

   (ptpd notice)   16:04:47.562025  (init)  hardware time support = 1,

To be clear, when I use ptpd the clocks converge to < 1us offset with +/-1us jitter so I am pretty sure hardware 
timestamping is enabled.

Regards,
John