On 4/28/2021 7:00 PM, ramesh t wrote:
> hi Jake,
> 
>> enp104s0f1 phc offset         3 s2 freq  -11417 delay   3568
>> enp104s0f1 phc offset     -4973 s2 freq  -16393 delay  19341* <<<<<<<HERE
>> enp104s0f1 phc offset      4977 s2 freq   -7934 delay   3594*
>> enp104s0f1 phc offset      1471 s2 freq   -9947 delay   3591*
>> enp104s0f1 phc offset         0 s2 freq  -10977 delay   3587
> 
> Main issue in hand is why there is change in delay which resulted in
> jump of phc offset? which recovers back? 
> Is there any mechanism to avoid such drifts the phc?
> 
> From the ptp4l code, below code is used for calculating delay 
> 
>                 if (clock_gettime(sysclk, &tdst1) || <<< Read of local
> nic time
>                                 clock_gettime(clkid, &tsrc) || <<< Read
> of remote nic time (interface connected to BC)
>                                 clock_gettime(sysclk, &tdst2)) { <<<
> Read of local nic time
>                         pr_err("failed to read clock: %m");
>                         return 0;
>                 }
> Then we calculate the interval between two reads of local NIC with below
> code:
> 
> interval = (tdst2.tv_sec - tdst1.tv_sec) * NS_PER_SEC + tdst2.tv_nsec -
> tdst1.tv_nsec;
> This interval maps to delay.
> 
> Please suggest.
> 
> Regards,
> Ramesh
> 

Delay is a measurement of how long packets take to traverse the network.
This could be changing due to some network issue.


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

Reply via email to