Re: [Linuxptp-users] can't get linux PTP to run
PTP IEEE 1588 stack for Linux
Brought to you by:
rcochran
From: Jeroen V. d. K. <jer...@gm...> - 2013-03-26 15:11:51
|
Hi, I'm not an expert, but the log seems to indicate a systematically decreasing master time offset, with a maxed out freq. adjustment. I would say the PHC is somehow unable to properly step to a new value (clock_settime/adjtime fails). You could try setting both clocks nearly equal and see if they eventually converge. You could also compile and try the testptp program (/Documentation/ptp/testptp.c) to see if your PHC clock actually works. I'm not sure if support of the get_ts_info() call is required. J. 2013/3/26 <Tim...@de...> > Hi, > > ok it seems that the driver works now (down ask me what I have changed, > don't know). I can now use HW stamping. > > But the time does not change at all. If I start the master clock it shows: > ptp4l -f ptp.cfg -p /dev/ptp0 -i eth2 > ptp4l[7470.955]: selected /dev/ptp0 as PTP clock > ptp4l[7470.955]: failed to read out the clock frequency > adjustment: Operation not supported > ptp4l[7470.955]: port 1: get_ts_info not supported > ptp4l[7470.958]: port 1: INITIALIZING to LISTENING on INITIALIZE > ptp4l[7470.958]: port 0: INITIALIZING to LISTENING on INITIALIZE > ptp4l[7476.958]: port 1: LISTENING to MASTER on > ANNOUNCE_RECEIPT_TIMEOUT_EXPIRES > > And if I start the slave it shows: > ptp4l -f ptp.cfg -p /dev/ptp0 -i eth2 -s > ptp4l[8394.096]: selected /dev/ptp0 as PTP clock > ptp4l[8394.096]: failed to read out the clock frequency > adjustment: Operation not supported > ptp4l[8394.096]: port 1: get_ts_info not supported > ptp4l[8394.098]: port 1: INITIALIZING to LISTENING on INITIALIZE > ptp4l[8394.098]: port 0: INITIALIZING to LISTENING on INITIALIZE > ptp4l[8395.985]: port 1: new foreign master 745798.fffe.000021-1 > ptp4l[8399.987]: selected best master clock 745798.fffe.000021 > ptp4l[8399.987]: port 1: LISTENING to UNCALIBRATED on RS_SLAVE > ptp4l[8401.429]: negative path delay -5520 > ptp4l[8401.429]: path_delay = (t2 - t3) + (t4 - t1) > ptp4l[8401.429]: t2 - t3 = -427837600 > ptp4l[8401.429]: t4 - t1 = +427826560 > ptp4l[8401.429]: c1 0 > ptp4l[8401.429]: c2 0 > ptp4l[8401.429]: c3 0 > ptp4l[8402.001]: master offset -1637602062061189501 s0 freq > +0 path delay -5520 > ptp4l[8402.750]: negative path delay -10180 > ptp4l[8402.750]: path_delay = (t2 - t3) + (t4 - t1) > ptp4l[8402.750]: t2 - t3 = -748785600 > ptp4l[8402.750]: t4 - t1 = +748765240 > ptp4l[8402.750]: c1 0 > ptp4l[8402.750]: c2 0 > ptp4l[8402.750]: c3 0 > ptp4l[8403.002]: master offset -1637602062061158011 s1 freq > +31485 path delay -7850 > ptp4l[8404.002]: master offset -1637602062061128851 s2 freq > -32767999 path delay -7850 > ptp4l[8404.002]: port 1: UNCALIBRATED to SLAVE on > MASTER_CLOCK_SELECTED > ptp4l[8404.216]: negative path delay -2380 > ptp4l[8404.216]: path_delay = (t2 - t3) + (t4 - t1) > ptp4l[8404.216]: t2 - t3 = -213503440 > ptp4l[8404.216]: t4 - t1 = +213498680 > ptp4l[8404.216]: c1 0 > ptp4l[8404.216]: c2 0 > ptp4l[8404.216]: c3 0 > ptp4l[8405.003]: master offset -1637602062061101475 s2 freq > -32767999 path delay -6026 > ptp4l[8405.072]: negative path delay -280 > ptp4l[8405.072]: path_delay = (t2 - t3) + (t4 - t1) > ptp4l[8405.072]: t2 - t3 = -69388320 > ptp4l[8405.072]: t4 - t1 = +69387760 > ptp4l[8405.072]: c1 0 > ptp4l[8405.072]: c2 0 > ptp4l[8405.072]: c3 0 > ptp4l[8405.778]: negative path delay -10560 > ptp4l[8405.778]: path_delay = (t2 - t3) + (t4 - t1) > ptp4l[8405.778]: t2 - t3 = -774949920 > ptp4l[8405.778]: t4 - t1 = +774928800 > ptp4l[8405.778]: c1 0 > ptp4l[8405.778]: c2 0 > ptp4l[8405.778]: c3 0 > ptp4l[8406.003]: master offset -1637602062061072517 s2 freq > -32767999 path delay -5784 > ptp4l[8406.374]: negative path delay -4680 > ptp4l[8406.374]: path_delay = (t2 - t3) + (t4 - t1) > ptp4l[8406.374]: t2 - t3 = -370912120 > ptp4l[8406.374]: t4 - t1 = +370902760 > ptp4l[8406.374]: c1 0 > ptp4l[8406.374]: c2 0 > ptp4l[8406.374]: c3 0 > ptp4l[8406.885]: negative path delay -12120 > ptp4l[8406.885]: path_delay = (t2 - t3) + (t4 - t1) > ptp4l[8406.885]: t2 - t3 = -881060360 > ptp4l[8406.885]: t4 - t1 = +881036120 > ptp4l[8406.885]: c1 0 > ptp4l[8406.885]: c2 0 > ptp4l[8406.885]: c3 0 > ptp4l[8407.004]: master offset -1637602062061042610 s2 freq > -32767999 path delay -6531 > > My config is: > [global] > # > # Port Data Set > # > logAnnounceInterval 1 > logSyncInterval 0 > logMinDelayReqInterval 0 > logMinPdelayReqInterval 0 > announceReceiptTimeout 3 > delayAsymmetry 0 > fault_reset_interval 4 > # > # Run time options > # > assume_two_step 0 > logging_level 6 > path_trace_enabled 1 > follow_up_info 0 > tx_timestamp_retries 100 > use_syslog 0 > verbose 1 > summary_interval 0 > # > # Servo Options > # > pi_proportional_const 0.0 > pi_integral_const 0.0 > pi_offset_const 0.0 > clock_servo pi > # > # Default interface options > # > network_transport UDPv4 > delay_mechanism E2E > time_stamping hardware > > If I check the time (both date and hwclock) on both PCs, one says (for > example) 10:12:11 and the other says 08:45:00. Even after an hour running > ptp4l the time difference is the same. > > I think it got something to do with the clock frequency adjustment. > > I'm getting closer to success but what am I doing wrong now? > > Thanks, > Benny > > > -----Ursprüngliche Nachricht----- > Von: Richard Cochran [mailto:ric...@gm...] > Gesendet: Montag, 25. März 2013 19:20 > An: Rapp, Tim-Benjamin > Cc: lin...@li... > Betreff: Re: [Linuxptp-users] can't get linux PTP to run > > On Mon, Mar 25, 2013 at 08:11:12AM +0000, Tim...@de...: > > Hi, > > > > well im using the modified driver from sourceforge (see post of Jake). > > Therfore I only can use software timetamping, because HW-timespamps are > not supported. If i dont use HW timestamping then I dont need to pick an > /dev/ptp (I dont have one). > > Looking at the code, in e1000e-2.3.2.tar.gz, and in its README, HW time > stamps *are* supported, but you need to add flag when building. > > IEEE 1588 Precision Time Protocol (PTP) Hardware Clock (PHC) > ------------------------------------------------------------ > Support for the IEEE 1588 Precision Time Protocol (PTP) Hardware Clock > (PHC) > is disabled by default in this out-of-tree driver even if it is enabled > for > the in-kernel driver. > > The feature is available only on a subset of devices supported by the > driver, and can only be enabled on 3.0 and newer kernels that also have > the PTP_1588_CLOCK support compiled in statically or as a module. To > enable > the feature when compiling the driver, add 'CFLAGS_EXTRA=-DE1000E_PTP' to > the command line. > > > After your information I changed to using a config file. Did I do it > like you ment? Adding the tx_timestamp_retries? I tried several different > numbers. Always the same error. > > > > The command I use is: > > ptp4l -i eht2 -f /etc/ptp4l.cfg > > > > the config is: > > [global] > > # > > logging_level 6 > > tx_timestamp_retries 100 > > use_syslog 0 > > verbose 1 > > time_stamping software > > When using SW time stamping, the tx_timestamp_retries has no effect, since > the time stamp is taken during the 'send' call. > > I can only suggest to recheck if: > > - you are really using the out-of-tree driver > - that eth2 is really, truely serviced by the e1000e driver > > There is a Linux test program for time stamping in > > Documentation/networking/timestamping > > Can you test your interface with that program like so: > > timestamping eth2 SOF_TIMESTAMPING_TX_SOFTWARE > SOF_TIMESTAMPING_RX_SOFTWARE SOF_TIMESTAMPING_SOFTWARE > > and post the results? > > Thanks, > Richard > > > > ------------------------------------------------------------------------------ > Own the Future-Intel® Level Up Game Demo Contest 2013 > Rise to greatness in Intel's independent game demo contest. > Compete for recognition, cash, and the chance to get your game > on Steam. $5K grand prize plus 10 genre and skill prizes. > Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d > _______________________________________________ > Linuxptp-users mailing list > Lin...@li... > https://lists.sourceforge.net/lists/listinfo/linuxptp-users > |