On Tue, May 31, 2022 at 12:02:33PM +0000, Deshpande, Yash wrote: > However, trying to reuse the pieces of code from phc2sys.c "read_phc" did not > give satisfactory results.
> I know that PPS loopback is probably the best way going forward - but i was > wondering if there is any easier and more obvious way that I am missing out. You could compare the two clocks relative to the system clock using there calls of the PTP_SYS_OFFSET_EXTENDED ioctl, similarly to running phc_ctl eth0 cmp phc_ctl eth1 cmp phc_ctl eth0 cmp and comparing the mean offset from the first and third call with the offset from the second call. That should give you more stable measurements as the they will not be impacted by userspace, but there will likely still be some asymmetry of at least few nanoseconds due to PCIe, CPU and the I350 itself. If you decide to go with PPS timestamping and depending on how much you want to avoid asymmetries in your measurements, it might be better to have both ports as PPS input timestamping an external PPS signal instead of connecting one port as PPS output to the other as PPS input. -- Miroslav Lichvar _______________________________________________ Linuxptp-users mailing list Linuxptp-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxptp-users