Hi Richard,

Thanks for your inputs. They were of great help. When we ran ptp4l with
hardware timestamping, without synchronization of the system clock with the
hardware clock on the master node, we are able to get around 25 nanoseconds
offset between the master and slave clock which seems to be a good and
desired value.

So as per our understanding, we were getting 1000 ns accuracy in the
previous test because our system clock was unstable and we were synching it
with the hardware clock on master (because we do not have a grandmaster
yet).

*Here are logs for the recent test we performed based on your inputs:*


ptp4l[233.770]: selected /dev/ptp0 as PTP clock
ptp4l[233.771]: port 1: INITIALIZING to LISTENING on INIT_COMPLETE
ptp4l[233.772]: port 0: INITIALIZING to LISTENING on INIT_COMPLETE
ptp4l[234.902]: port 1: new foreign master d4bed9.fffe.318e3e-1
ptp4l[238.903]: selected best master clock d4bed9.fffe.318e3e
ptp4l[238.904]: port 1: LISTENING to UNCALIBRATED on RS_SLAVE
ptp4l[240.907]: master offset  277128084 s0 freq      +0 path delay
-29250
ptp4l[241.908]: master offset  277208494 s1 freq  +80394 path delay
-29250
ptp4l[242.908]: master offset         -8 s2 freq  +80386 path delay
-29250
ptp4l[242.908]: port 1: UNCALIBRATED to SLAVE on MASTER_CLOCK_SELECTED
ptp4l[243.908]: master offset     -15434 s2 freq  +64958 path delay
-13842
ptp4l[244.908]: master offset     -11321 s2 freq  +64441 path delay
 -2503
ptp4l[245.908]: master offset       4624 s2 freq  +76989 path delay
 -2503
ptp4l[246.908]: master offset       7188 s2 freq  +80940 path delay
 -1630
ptp4l[247.908]: master offset       5105 s2 freq  +81014 path delay
-137
ptp4l[248.909]: master offset       4476 s2 freq  +81916 path delay
-137
ptp4l[249.909]: master offset       1461 s2 freq  +80244 path delay
1355
ptp4l[250.909]: master offset       1558 s2 freq  +80779 path delay
1424
ptp4l[251.909]: master offset       1130 s2 freq  +80819 path delay
1494
ptp4l[252.909]: master offset        681 s2 freq  +80709 path delay
1494
ptp4l[253.910]: master offset        315 s2 freq  +80547 path delay
1530
ptp4l[254.910]: master offset        168 s2 freq  +80495 path delay
1565
ptp4l[255.910]: master offset        112 s2 freq  +80489 path delay
1568
ptp4l[256.910]: master offset         58 s2 freq  +80469 path delay
1577
ptp4l[257.910]: master offset        -44 s2 freq  +80384 path delay
1598
ptp4l[258.911]: master offset        -31 s2 freq  +80384 path delay
1598
ptp4l[259.911]: master offset        -12 s2 freq  +80394 path delay
1586
ptp4l[260.911]: master offset        -23 s2 freq  +80379 path delay
1577
ptp4l[261.911]: master offset         73 s2 freq  +80468 path delay
1577
ptp4l[262.911]: master offset         20 s2 freq  +80437 path delay
1584
ptp4l[263.912]: master offset         63 s2 freq  +80486 path delay
1577
ptp4l[264.912]: master offset         17 s2 freq  +80459 path delay
1577
ptp4l[265.912]: master offset        -35 s2 freq  +80412 path delay
1582
ptp4l[266.912]: master offset        -24 s2 freq  +80412 path delay
1582
ptp4l[267.912]: master offset         25 s2 freq  +80454 path delay
1577
ptp4l[268.912]: master offset        -24 s2 freq  +80413 path delay
1577
ptp4l[269.913]: master offset        -19 s2 freq  +80411 path delay
1577
ptp4l[270.913]: master offset         33 s2 freq  +80457 path delay
1570
ptp4l[271.913]: master offset        -66 s2 freq  +80368 path delay
1584
ptp4l[272.913]: master offset         36 s2 freq  +80450 path delay
1584
ptp4l[273.914]: master offset         13 s2 freq  +80438 path delay
1581
ptp4l[274.914]: master offset         29 s2 freq  +80458 path delay
1581
ptp4l[275.914]: master offset        -23 s2 freq  +80414 path delay
1584
ptp4l[276.914]: master offset        -11 s2 freq  +80419 path delay
1584
ptp4l[277.914]: master offset          3 s2 freq  +80430 path delay
1584
ptp4l[278.914]: master offset         44 s2 freq  +80472 path delay
1584
ptp4l[279.915]: master offset        -12 s2 freq  +80429 path delay
1582
ptp4l[280.915]: master offset          4 s2 freq  +80442 path delay
1582
ptp4l[281.915]: master offset         21 s2 freq  +80460 path delay
1577
ptp4l[282.915]: master offset          8 s2 freq  +80453 path delay
1572
ptp4l[283.915]: master offset        -40 s2 freq  +80408 path delay
1572
ptp4l[284.915]: master offset          4 s2 freq  +80440 path delay
1570
ptp4l[285.915]: master offset         23 s2 freq  +80460 path delay
1566
ptp4l[286.916]: master offset        -24 s2 freq  +80420 path delay
1566
ptp4l[287.916]: master offset         24 s2 freq  +80460 path delay
1565
ptp4l[288.916]: master offset        -21 s2 freq  +80423 path delay
1565
ptp4l[289.916]: master offset         25 s2 freq  +80462 path delay
1566
ptp4l[290.916]: master offset         10 s2 freq  +80455 path delay
1566
ptp4l[291.916]: master offset        -70 s2 freq  +80378 path delay
1569
ptp4l[292.916]: master offset          7 s2 freq  +80434 path delay
1566
ptp4l[293.916]: master offset         52 s2 freq  +80481 path delay
1566
ptp4l[294.917]: master offset          5 s2 freq  +80450 path delay
1566
ptp4l[295.917]: master offset        -15 s2 freq  +80431 path delay
1567
ptp4l[296.917]: master offset         27 s2 freq  +80469 path delay
1567
ptp4l[297.917]: master offset        -36 s2 freq  +80414 path delay
1579
ptp4l[298.917]: master offset        -29 s2 freq  +80410 path delay
1579
ptp4l[299.918]: master offset         11 s2 freq  +80441 path delay
1579
ptp4l[300.918]: master offset         33 s2 freq  +80466 path delay
1573
ptp4l[301.918]: master offset        -11 s2 freq  +80432 path delay
1568
ptp4l[302.918]: master offset         36 s2 freq  +80476 path delay
1565
ptp4l[303.918]: master offset         16 s2 freq  +80467 path delay
1565
ptp4l[304.918]: master offset        -39 s2 freq  +80417 path delay
1568
ptp4l[305.919]: master offset          3 s2 freq  +80447 path delay
1568
ptp4l[306.919]: master offset        -14 s2 freq  +80431 path delay
1564
ptp4l[307.919]: master offset         27 s2 freq  +80468 path delay
1563

On Thu, Oct 25, 2018 at 5:41 PM Dolly Gyanchandani <
dollygyanchandani1...@gmail.com> wrote:

> Hi Miroslav,
>
> Thanks for your response. Please find my comments inline below.
>
> The accuracy of which clock would you like to measure? The system clock or
> the PTP clock on the NIC?
>
> We want to measure the accuracy of the PTP clock now. But eventually, we
> would need to measure the accuracy of the system clock as well. Could you
> suggest reliable ways to measure both?
>
> A separate and more accurate time source is necessary. For measuring
> the accuracy of SW timestamping you can use HW timestamping.
>
> What do you mean by this? Do we need to have PTP enabled NICs to be able
> to test software timestamping? Not sure if we understand this point
> correctly. Could you elaborate a bit?
>
> Thanks,
> Dolly
>
> On Thu, Oct 25, 2018 at 12:23 AM Richard Cochran <richardcoch...@gmail.com>
> wrote:
>
>> On Wed, Oct 24, 2018 at 02:14:44PM +0530, Dolly Gyanchandani wrote:
>> > Our current measure of accuracy is based on* master-slave offsets
>> reported
>> > by the ptp4l process.*
>>
>> Log output, please.
>>
>> > *In Hardware Timestamping, *we are getting* >1000 nanoseconds* offset
>> from
>> > the master which is far larger than the *expected value of around 50
>> ns* of
>> > PTP H/W Timestamping.
>>
>> That is really bad.
>>
>> > (Since we do not have a grand-master currently, we are using Master's
>> > system clock as the Master clock for phc2sys)
>>
>> First try leaving the PHC time on the NIC free running.
>>
>> Thanks,
>> Richard
>>
>
_______________________________________________
Linuxptp-users mailing list
Linuxptp-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxptp-users

Reply via email to