Thread: [Linuxptp-users] Wildly jumping offsets casued by phc2sys
PTP IEEE 1588 stack for Linux
Brought to you by:
rcochran
From: Robb <rba...@gm...> - 2015-05-29 21:59:57
|
For whatever reason phc2sys seems to be blowing up the offsets. My set up is as follows: Two CentOS 6.5 machines 2.6.32-504.16.2.el6.x86_64 linuxptp-1.3-1.el6.x86_64 Machine1 eth1 [igb 5.0.5-k] Intel I210 (rev 03) Machine2 eth0 [e1000e 2.3.2-k] Intel I217-LM (rev 05) Machine1 eth1 hooked directly to Machine2 eth0 Machine1 (master): sudo ptp4l -i eth1 -m -2 sudo phc2sys -s eth1 -c CLOCK_REALTIME -w Machine2: sudo ptp4l -i eth0 -m -2 sudo phc2sys -s eth0 -c CLOCK_REALTIME -w Normally the offset blows up immediately unless I sync the machines with NTP before doing anything else. If I do get them to sync it doesn't last very long and the following will happen on Machine2: 16:30:03 ptp4l: [4679.655] master offset 777 s2 freq +4403 path delay 67209 16:30:04 phc2sys: [4679.935] sys offset -658 s2 freq +3877 delay 1836 16:30:04 ptp4l: [4680.655] master offset 2280 s2 freq +6139 path delay 67209 16:30:05 phc2sys: [4680.936] sys offset 1353 s2 freq +5690 delay 1504 16:30:05 ptp4l: [4681.655] master offset -1349 s2 freq +3194 path delay 67123 16:30:06 phc2sys: [4681.936] sys offset -14484 s2 freq -9741 delay 1840 16:30:06 ptp4l: [4682.656] master offset 70368744179084 s2 freq +599999999 path delay 67123 16:30:07 phc2sys: [4682.936] sys offset -70368575979115 s2 freq -500000 delay 1440 16:30:07 ptp4l: [4683.656] master offset 70368127382914 s2 freq +599999999 path delay 17621798 16:30:08 phc2sys: [4683.936] sys offset -70367975616192 s2 freq -500000 delay 1842 16:30:08 ptp4l: [4684.657] master offset 70367522033588 s2 freq +599999999 path delay 22920656 16:30:09 phc2sys: [4684.937] sys offset -70367375237559 s2 freq -500000 delay 1441 I have read that there was some problems with the e1000e driver so I tried with the 3.1.0.2-NAPI version, but still have the same problem as above. Does anyone have any ideas what could be the problem here? Thanks. |
From: Gary E. M. <ge...@re...> - 2015-05-29 22:38:29
|
Yo Robb! On Fri, 29 May 2015 16:59:29 -0500 Robb <rba...@gm...> wrote: > For whatever reason phc2sys seems to be blowing up the offsets. I have the same problem with hardware sync. There was a discussion on linuxptp-devel on this last May, but since the email archives seem to be down right now I can't point you at it. https://sourceforge.net/p/linuxptp/mailman/linuxptp-devel/ > Does anyone have any ideas what could be the problem here? Seemingly not. RGDS GARY --------------------------------------------------------------------------- Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703 ge...@re... Tel:+1(541)382-8588 |
From: Gary E. M. <ge...@re...> - 2015-05-29 22:53:31
|
Yo Robb! On Fri, 29 May 2015 15:23:50 -0700 "Gary E. Miller" <ge...@re...> wrote: > There was a discussion on linuxptp-devel on this last May, Whoops, I meant March. RGDS GARY --------------------------------------------------------------------------- Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703 ge...@re... Tel:+1(541)382-8588 |
From: Richard C. <ric...@gm...> - 2015-05-30 05:04:20
|
On Fri, May 29, 2015 at 03:23:50PM -0700, Gary E. Miller wrote: > > I have the same problem with hardware sync. There was a discussion on > linuxptp-devel on this last May, but since the email archives seem to be > down right now I can't point you at it. The SF archives are unusable, IMHO, even when they are up. Use gmane instead. The link to the discussion is: http://thread.gmane.org/gmane.comp.linux.ptp.devel/2494/ Thanks, Richard |
From: Richard C. <ric...@gm...> - 2015-05-30 05:11:19
|
On Fri, May 29, 2015 at 04:59:29PM -0500, Robb wrote: > For whatever reason phc2sys seems to be blowing up the offsets. > > My set up is as follows: > > Two CentOS 6.5 machines > 2.6.32-504.16.2.el6.x86_64 > linuxptp-1.3-1.el6.x86_64 > > Machine1 eth1 [igb 5.0.5-k] Intel I210 (rev 03) > Machine2 eth0 [e1000e 2.3.2-k] Intel I217-LM (rev 05) The I217-LM has a known HW bug. > I have read that there was some problems with the e1000e driver so I tried with > the 3.1.0.2-NAPI version, but still have the same problem as above. > > Does anyone have any ideas what could be the problem here? This isn't a driver problem but rather a HW bug. I don't have that HW, and I have not yet heard of any SW (driver) work arounds. You might ask on the e1000e list if Intel has a solution to this problem. Thanks, Richard |
From: Robb <rba...@gm...> - 2015-06-01 15:42:32
|
Yanir at: https://sourceforge.net/p/e1000/mailman/message/34158396/ was able to help me with this problem. He provided me with a patch to get this working. I have tested it and it has been working for > hour with no errors! Here is a the patch + what I did in case it helps anyone else. wget -O e1000e-3.1.0.2.tar.gz "http://sourceforge.net/projects/e1000/files/e1000e%20stable/3.1.0.2/e1000e-3.1.0.2.tar.gz/download" tar xvf e1000e-3.1.0.2.tar.gz cd e1000e-3.1.0.2/src; patch < ../../fix_systim_issues-3.1.0.2.patch sudo make install $ cat fix_systim_issues-3.1.0.2.patch --- netdev.c.orig 2015-06-01 16:49:37.802312304 +0300 +++ netdev.c 2015-06-01 16:51:19.468306452 +0300 @@ -4614,7 +4614,10 @@ static cycle_t e1000e_cyclecounter_read( cycle_t systim, systim_next; /* latch SYSTIMH on read of SYSTIML */ - systim = (cycle_t)er32(SYSTIML); + u32 systim_overflow_latch_fix = 0x3FFFFFFF; + do { + systim = (cycle_t)er32(SYSTIML); + } while (systim > systim_overflow_latch_fix); systim |= (cycle_t)er32(SYSTIMH) << 32; if ((hw->mac.type == e1000_82574) || (hw->mac.type == e1000_82583)) { I apologize, my email composer (gmail) seems to delete the tabs in the patch. On Sat, May 30, 2015 at 12:11 AM, Richard Cochran <ric...@gm...> wrote: > On Fri, May 29, 2015 at 04:59:29PM -0500, Robb wrote: >> For whatever reason phc2sys seems to be blowing up the offsets. >> >> My set up is as follows: >> >> Two CentOS 6.5 machines >> 2.6.32-504.16.2.el6.x86_64 >> linuxptp-1.3-1.el6.x86_64 >> >> Machine1 eth1 [igb 5.0.5-k] Intel I210 (rev 03) >> Machine2 eth0 [e1000e 2.3.2-k] Intel I217-LM (rev 05) > > The I217-LM has a known HW bug. > >> I have read that there was some problems with the e1000e driver so I tried with >> the 3.1.0.2-NAPI version, but still have the same problem as above. >> >> Does anyone have any ideas what could be the problem here? > > This isn't a driver problem but rather a HW bug. I don't have that HW, > and I have not yet heard of any SW (driver) work arounds. You might > ask on the e1000e list if Intel has a solution to this problem. > > Thanks, > Richard |
From: Keller, J. E <jac...@in...> - 2015-06-01 16:54:19
|
Ah. I was about to forward you to Yanir when I saw this email. I believe the e1000e team is currently working on validating a release that can be put on sourceforge which will include this fix. Regards, Jake On Mon, 2015-06-01 at 10:42 -0500, Robb wrote: > Yanir at: > https://sourceforge.net/p/e1000/mailman/message/34158396/ > was able to help me with this problem. > > He provided me with a patch to get this working. > I have tested it and it has been working for > hour with > no errors! > > Here is a the patch + what I did in case it helps anyone else. > > wget -O e1000e-3.1.0.2.tar.gz > "http://sourceforge.net/projects/e1000/files/e1000e%20stable/3.1.0.2/e1000e-3.1.0.2.tar.gz/download" > tar xvf e1000e-3.1.0.2.tar.gz > cd e1000e-3.1.0.2/src; patch < ../../fix_systim_issues-3.1.0.2.patch > sudo make install > > $ cat fix_systim_issues-3.1.0.2.patch > --- netdev.c.orig 2015-06-01 16:49:37.802312304 +0300 > +++ netdev.c 2015-06-01 16:51:19.468306452 +0300 > @@ -4614,7 +4614,10 @@ static cycle_t e1000e_cyclecounter_read( > cycle_t systim, systim_next; > > /* latch SYSTIMH on read of SYSTIML */ > - systim = (cycle_t)er32(SYSTIML); > + u32 systim_overflow_latch_fix = 0x3FFFFFFF; > + do { > + systim = (cycle_t)er32(SYSTIML); > + } while (systim > systim_overflow_latch_fix); > systim |= (cycle_t)er32(SYSTIMH) << 32; > > if ((hw->mac.type == e1000_82574) || (hw->mac.type == e1000_82583)) { > > > > I apologize, my email composer (gmail) seems to delete the tabs in the patch. > > > > On Sat, May 30, 2015 at 12:11 AM, Richard Cochran > <ric...@gm...> wrote: > > On Fri, May 29, 2015 at 04:59:29PM -0500, Robb wrote: > >> For whatever reason phc2sys seems to be blowing up the offsets. > >> > >> My set up is as follows: > >> > >> Two CentOS 6.5 machines > >> 2.6.32-504.16.2.el6.x86_64 > >> linuxptp-1.3-1.el6.x86_64 > >> > >> Machine1 eth1 [igb 5.0.5-k] Intel I210 (rev 03) > >> Machine2 eth0 [e1000e 2.3.2-k] Intel I217-LM (rev 05) > > > > The I217-LM has a known HW bug. > > > >> I have read that there was some problems with the e1000e driver so I tried with > >> the 3.1.0.2-NAPI version, but still have the same problem as above. > >> > >> Does anyone have any ideas what could be the problem here? > > > > This isn't a driver problem but rather a HW bug. I don't have that HW, > > and I have not yet heard of any SW (driver) work arounds. You might > > ask on the e1000e list if Intel has a solution to this problem. > > > > Thanks, > > Richard > > ------------------------------------------------------------------------------ > _______________________________________________ > Linuxptp-users mailing list > Lin...@li... > https://lists.sourceforge.net/lists/listinfo/linuxptp-users |