Re: [Linuxptp-users] recvmsg tx timestamp failed: Resource temporarily unavailable
PTP IEEE 1588 stack for Linux
Brought to you by:
rcochran
From: Rayagond K. <ray...@gm...> - 2013-02-06 14:10:37
|
Hi Richard and Jacob, I implemented the .adjfreq api and able to proceed further, I am running following commands, on MASTER side - $ptp4l -i eth0 -S -m #using software time stamping on SLAVE side - $ptp4l -i eth0 -p /dev/ptp0 -s -m #using HW time stamping ------------------------------------------------------------------------------------------------------------------- Following are log message on SLAVE side, ptp4l[3522.327]: selected /dev/ptp0 as PTP clock ptp4l[3522.329]: failed to read out the clock frequency adjustment: Operation not supported ptp4l[3522.329]: port 1: get_ts_info not supported ptp4l[3522.441]: port 1: INITIALIZING to LISTENING on INITIALIZE ptp4l[3522.442]: port 0: INITIALIZING to LISTENING on INITIALIZE ptp4l[3524.070]: port 1: new foreign master f0def1.fffe.58de16-1 ptp4l[3528.070]: selected best master clock f0def1.fffe.58de16 ptp4l[3528.070]: foreign master not using PTP timescale ptp4l[3528.070]: port 1: LISTENING to UNCALIBRATED on RS_SLAVE ptp4l[3529.856]: negative path delay -273111420 ptp4l[3529.856]: path_delay = (t2 - t3) + (t4 - t1) ptp4l[3529.856]: t2 - t3 = -1331967748 ptp4l[3529.856]: t4 - t1 = +785744908 ptp4l[3529.856]: c1 0 ptp4l[3529.856]: c2 0 ptp4l[3529.856]: c3 0 ptp4l[3530.070]: master offset -1360149853961689539 s0 adj +0 path delay -273111420 ptp4l[3530.331]: negative path delay -90547500 ptp4l[3530.331]: path_delay = (t2 - t3) + (t4 - t1) ptp4l[3530.331]: t2 - t3 = -441936828 ptp4l[3530.331]: t4 - t1 = +260841828 ptp4l[3530.331]: c1 0 ptp4l[3530.331]: c2 0 ptp4l[3530.331]: c3 0 ptp4l[3531.072]: master offset -1360149853357181388 s1 adj +62500000 path delay -181829460 ptp4l[3532.070]: master offset 32568703630 s2 adj +62500000 path delay -181829460 ptp4l[3532.171]: port 1: UNCALIBRATED to SLAVE on MASTER_CLOCK_SELECTED ptp4l[3533.070]: master offset 33158496191 s2 adj +62500000 path delay -181829460 ptp4l[3533.188]: negative path delay -33997756 ptp4l[3533.188]: path_delay = (t2 - t3) + (t4 - t1) ptp4l[3533.188]: t2 - t3 = -183932418 ptp4l[3533.188]: t4 - t1 = +115936906 ptp4l[3533.189]: c1 0 ptp4l[3533.189]: c2 0 ptp4l[3533.189]: c3 0 ptp4l[3534.070]: master offset 35846471099 s2 adj +62500000 path delay -132552225 ptp4l[3535.070]: master offset 38583743154 s2 adj +62500000 path delay -132552225 ptp4l[3535.172]: negative path delay -29724058 ptp4l[3535.172]: path_delay = (t2 - t3) + (t4 - t1) ptp4l[3535.172]: t2 - t3 = -160933322 ptp4l[3535.172]: t4 - t1 = +101485205 ptp4l[3535.173]: c1 0 ptp4l[3535.173]: c2 0 ptp4l[3535.173]: c3 0 ptp4l[3536.070]: master offset 41295290499 s2 adj +62500000 path delay -106845183 ptp4l[3536.630]: negative path delay -164345682 ptp4l[3536.630]: path_delay = (t2 - t3) + (t4 - t1) ptp4l[3536.630]: t2 - t3 = -886761310 ptp4l[3536.630]: t4 - t1 = +558069946 ptp4l[3536.630]: c1 0 ptp4l[3536.630]: c2 0 ptp4l[3536.630]: c3 0 ptp4l[3537.070]: master offset 41896592574 s2 adj +62500000 path delay -118345283 ptp4l[3537.543]: negative path delay -1213019806 ptp4l[3537.543]: path_delay = (t2 - t3) + (t4 - t1) ptp4l[3537.544]: t2 - t3 = -2899017982 ptp4l[3537.544]: t4 - t1 = +472978370 ptp4l[3537.544]: c1 0 ptp4l[3537.544]: c2 0 ptp4l[3537.544]: c3 0 ptp4l[3538.070]: master offset 44816281933 s2 adj +62500000 path delay -300791037 ptp4l[3538.210]: negative path delay -41005278 ptp4l[3538.210]: path_delay = (t2 - t3) + (t4 - t1) ptp4l[3538.210]: t2 - t3 = -221749632 ptp4l[3538.210]: t4 - t1 = +139739075 ptp4l[3538.210]: c1 0 ptp4l[3538.210]: c2 0 ptp4l[3538.210]: c3 0 ------------------------------------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------------------------------- Following are the log message on MASTER side ptp4l[12946.863]: port 1: get_ts_info not supported ptp4l[12946.979]: port 1: INITIALIZING to LISTENING on INITIALIZE ptp4l[12946.980]: port 0: INITIALIZING to LISTENING on INITIALIZE ptp4l[12952.979]: port 1: LISTENING to MASTER on ANNOUNCE_RECEIPT_TIMEOUT_EXPIRES ------------------------------------------------------------------------------------------------------------------- PTP stack is calling my PHC driver api's like .adjfreq and .adjtime. But now I am not able to understand the log message on SLAVE side, how to know whether SALVE is synchronized to MASTER or not ? I tried using phc2sys command ($phc2sys -s /dev/ptp0) to adjust the system time to PHC time, but SLAVE system time didn't become equal to MASTER system time ? Please provide me more inputs on how to test further. Thank you Rayagond. On 06/02/2013, Rayagond Kokatanur <ray...@gm...> wrote: > Thank you Richard, I will implement .adjfreq and use default.cfg and test > it and let you know. > > On 5 February 2013 22:20, Richard Cochran <ric...@gm...> wrote: > >> On Tue, Feb 05, 2013 at 09:23:03PM +0530, Rayagond Kokatanur wrote: >> > >> > I am not getting how to write configuration file that can be provided >> > as >> > input to *ptp4l, *please send me one example. >> >> There are two example files in the code, default.cfg, and gPTP.cfg. >> I would start with the first one. >> >> > Yes, it is unpublished driver and I referred Linux driver and document >> and >> > added PTP support into my driver. >> > >> > I have written PHC driver, but its not yet complete, need to implement >> some >> > other clock operations like .adjfreq and .enable. >> >> You can leave .enable as a stub, but you must implement the other >> methods, otherwise you won't be able to run PTP. >> >> > My test setup is as below, >> > >> > 1. Two system connected back to back and both the system running Linux >> > 3.1.1 kernel. >> > 2. On one side my HW and driver is running and on other side realteck >> 8169 >> > driver is running. I modified the realteck driver to support software >> > timestamping ie added "skb_tx_timestamp()" in start_xmit function. >> > Since >> I >> > don't have other NIC card that support HW time stamping, so I am using >> > software timestaping on other side. >> > >> > So is it possible to do basic validation/tetsing of PTP using above >> setup ? >> >> Yes, I think so. >> >> > Feb 5 20:11:04 snps ptp4l: [17640.898] failed to adjust the clock: >> > Operation not supported >> >> Because your driver isn't finished. >> >> > I am new to PTP so not able to understand the above log completely, >> please >> > let me know if my test setup is correct or not. >> >> Looks okay to me. >> >> HTH, >> Richard >> > |