On 8/22/2023 1:50 PM, Miroslav Lichvar wrote:
> On Tue, Aug 22, 2023 at 12:34:35PM +0200, Maciek Machnikowski wrote:
>> root@equinox:[~]#: phc_ctl ens6f0np0 set freq 50000000
>> root@equinox:[~]#: sudo ptp4l -m -i ens6f0np0 -2 -s
>
>> ptp4l[248.614]: master offset -301008874 s0 freq -50000000 path delay
>> 1136508
>> ptp4l[249.615]: master offset -316872413 s1 freq -50000000 path delay
>> 1460911
>
> You set the clock to run 5% fast, but the change between the offsets
> tells us it's running about 1.6% slow. The servo then tries to speed
> up the clock even more to correct that error, but it's already at
> the maximum value.
>
> The HW or driver is broken. It might need to decrease the frequency
> limit. The only reason your change "fixes" the problem is that it
> resets the frequency to a non-buggy range.
>
Good catch - indeed it seems to be a bug in the driver.
However - I re-run the test on a different adapter and still see better
results with the patch, and still don't understand why the code adds a
static offset instead of scaling it throught the Ki value.
I also reproduced the issue with SW servo and will look why it converges
so slow, as it's not the case when using the HW timestamping.
Thanks,
Maciek
_______________________________________________
Linuxptp-devel mailing list
Linuxptp-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxptp-devel