Re: [Linuxptp-users] phc offset explodes after a while
PTP IEEE 1588 stack for Linux
Brought to you by:
rcochran
From: Koehrer M. (ETAS/ESW5) <mat...@et...> - 2014-01-30 14:01:05
|
Hi Richard, thanks for the response and the hint. > > Kernel 3.2.48-rt69 (RT_PREEMPT patch). > > I use the Intel Gigabit CT Desktop adapter (82574L). > > For this is use the latest e1000e driver (Version 2.5.4) and build it outside > the kernel to have the PTP support. > > ... > > > This works really fine for a while. However after a while the value of phc > explodes dramatically. > > The value will be -35192325800 which looks like a kind of value overrun! > > In hex this is 0xFFFFFFF7CE5FB958. > > This sounds like a RT_PREEMPT issue. That patch makes spinlocks > preemptable, and the 82574 does need real locking, IIRC. > > Can you reproduce the problem with RT_PREEMPT disabled? I have used the very same kernel 3.2.48 without the RT_PREEMPT patch using the same configuration. Also here, I got the same issue after a while (it took more than 30 minutes). I added some print-outs to the file clock.c in function clock_synchronize(). Directly after the c->master_offset = tmv_sub(....) call I printed out the values that are used in the computation. Below is the related snippet from the logfile. There is a jump in the value of "origin" that seems to cause the issue. Any ideas? Thanks a lot! Best regards Mathias ------------ BEGIN SNIPPET ---- Jan 30 14:40:46 pca ptp4l: [2060.928] ingress:1391089281141037037 origin:1391089281141036324 path_delay:738 c1:0 c2:0 Jan 30 14:40:46 pca ptp4l: [2060.928] master offset -25 s2 freq -6231 path delay 738 Jan 30 14:40:46 pca phc2sys: [2061.632] phc offset 2066 s2 freq +32240 delay 6073 Jan 30 14:40:47 pca ptp4l: [2061.928] ingress:1391089282141051035 origin:1391089282141050284 path_delay:734 c1:0 c2:0 Jan 30 14:40:47 pca ptp4l: [2061.928] master offset 17 s2 freq -6197 path delay 734 Jan 30 14:40:47 pca phc2sys: [2062.632] phc offset 3961 s2 freq +34755 delay 6393 Jan 30 14:40:48 pca ptp4l: [2062.928] ingress:1391089283141068939 origin:1391089283141068244 path_delay:734 c1:0 c2:0 Jan 30 14:40:48 pca ptp4l: [2062.928] master offset -39 s2 freq -6248 path delay 734 Jan 30 14:40:48 pca phc2sys: [2063.632] phc offset -7230 s2 freq +24752 delay 6178 Jan 30 14:40:49 pca ptp4l: [2063.927] ingress:1391089284141082537 origin:1391089284141081804 path_delay:732 c1:0 c2:0 Jan 30 14:40:49 pca ptp4l: [2063.927] master offset 1 s2 freq -6220 path delay 732 Jan 30 14:40:49 pca phc2sys: [2064.632] phc offset -952 s2 freq +28861 delay 6655 ############# The following line shows the jump in origin which causes the master offset to be really large! Jan 30 14:40:50 pca ptp4l: [2064.928] ingress:1391089285141017574 origin:1391159653885194468 path_delay:734 c1:0 c2:0 Jan 30 14:40:50 pca ptp4l: [2064.928] master offset -70368744177628 s2 freq -599999999 path delay 734 Jan 30 14:40:50 pca phc2sys: [2065.633] phc offset -422734042 s2 freq -500000 delay 6740 Jan 30 14:40:51 pca ptp4l: [2065.928] ingress:1391089286738705674 origin:1391159654884640068 path_delay:3007 c1:0 c2:0 Jan 30 14:40:51 pca ptp4l: [2065.928] master offset -70368145937401 s2 freq -599999999 path delay 3007 Jan 30 14:40:51 pca phc2sys: [2066.633] phc offset -1021983284 s2 freq -500000 delay 6721 Jan 30 14:40:52 pca ptp4l: [2066.926] ingress:1391089288337875110 origin:1391159655884127148 path_delay:5266 c1:0 c2:0 Jan 30 14:40:52 pca ptp4l: [2066.926] master offset -70367546257304 s2 freq -599999999 path delay 5266 Jan 30 14:40:52 pca phc2sys: [2067.633] phc offset -1621224622 s2 freq -500000 delay 6737 Jan 30 14:40:53 pca ptp4l: [2067.928] ingress:1391089289937036930 origin:1391159656883609508 path_delay:7518 c1:0 c2:0 Jan 30 14:40:53 pca ptp4l: [2067.928] master offset -70366946580096 s2 freq -599999999 path delay 7518 ------ END SNIPPET ------ |