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-05 15:53:14
|
Hi Richard, On 5 February 2013 18:54, Richard Cochran <ric...@gm...> wrote: > On Tue, Feb 05, 2013 at 06:18:05PM +0530, Rayagond Kokatanur wrote: > > Hi All > > > > I am getting following messages when I run the command - ptp4l -i eth1 > > -p /dev/ptp0 -m > > > > ptp4l[9393.328]: selected /dev/ptp0 as PTP clock > > ptp4l[9393.330]: failed to read out the clock frequency adjustment: > > Operation not supported > > Looks like your /dev/ptp0 does not support clock_adjtime(). > > > ptp4l[9393.330]: port 1: get_ts_info not supported > > ptp4l[9393.335]: port 1: INITIALIZING to LISTENING on INITIALIZE > > ptp4l[9393.335]: port 0: INITIALIZING to LISTENING on INITIALIZE > > ptp4l[9399.335]: port 1: LISTENING to MASTER on > ANNOUNCE_RECEIPT_TIMEOUT_EXPIRES > > ptp4l[9400.342]: recvmsg tx timestamp failed: Resource temporarily > unavailable > > No Tx time stamp arrived on the socket error queue. The code tries to > read this 100 times, but you can increase the number of retries using > the 'tx_timestamp_retries' configuration file option. > Yes, I am able to fix this issue, the bug was in my driver only ie I was not returning the tx timestamp to stack early. I am not getting how to write configuration file that can be provided as input to *ptp4l, *please send me one example. > > > I am returning the timestamp back to socket using "skb_tstamp_tx()" > > api in my driver. > > So I guess that your have custom, unpublished driver. It looks like to > me that the driver is not working correctly. You can check the PHC > functions of the driver by using the 'testptp' program found in > Documentation/ptp in the Linux kernel source tree. > 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. 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 ? I tried configuring the realteck as MASTER with SOFTWARE timestamping($*ptp4l -i eth0 -S -m*) and my HW as slave with HW timestamping ($*ptp4l -i eth0 -p /dev/ptp0 -m -s*). With this I am able to see the SYNC, FOLLOW_UP, DELAY_REQ and DELAY_RESP message exchange between MASTER and SLEVE. Following are the debug message got on SLAVE side, Feb 5 20:11:02 snps ptp4l: [17638.899] selected best master clock f0def1.fffe.58de16 Feb 5 20:11:02 snps ptp4l: [17638.899] foreign master not using PTP timescale Feb 5 20:11:02 snps ptp4l: [17638.899] port 1: LISTENING to UNCALIBRATED on RS_SLAVE Feb 5 20:11:03 snps kernel: Feb 5 20:11:03 snps ptp4l: [17639.586] negative path delay -1457969541 Feb 5 20:11:03 snps ptp4l: [17639.586] path_delay = (t2 - t3) + (t4 - t1) Feb 5 20:11:03 snps ptp4l: [17639.586] t2 - t3 = -3603036636 Feb 5 20:11:03 snps ptp4l: [17639.586] t4 - t1 = +687097553 Feb 5 20:11:03 snps ptp4l: [17639.586] c1 0 Feb 5 20:11:03 snps ptp4l: [17639.586] c2 0 Feb 5 20:11:03 snps ptp4l: [17639.586] c3 0 Feb 5 20:11:03 snps ptp4l: [17639.899] master offset -728444660000 s0 adj +0 path delay -1457969541 Feb 5 20:11:04 snps ptp4l: [17640.898] master offset -725178558579 s1 adj +50000000 path delay -1457969541 Feb 5 20:11:04 snps ptp4l: [17640.898] failed to adjust the clock: Operation not supported Feb 6 20:11:05 snps kernel: Feb 5 20:11:05 snps kernel: Feb 5 20:11:05 snps ptp4l: [17641.898] master offset 32827238152 s2 adj +50000000 path delay -1457969541 Feb 5 20:11:05 snps ptp4l: [17641.898] failed to adjust the clock: Operation not supported Feb 5 20:11:05 snps ptp4l: [17641.898] port 1: UNCALIBRATED to SLAVE on MASTER_CLOCK_SELECTED Feb 5 20:11:06 snps ptp4l: [17642.897] master offset 36093339114 s2 adj +50000000 path delay -1457969541 Feb 5 20:11:06 snps ptp4l: [17642.897] failed to adjust the clock: Operation not supported Feb 5 20:11:07 snps ptp4l: [17643.484] negative path delay -328446461 Feb 5 20:11:07 snps ptp4l: [17643.484] path_delay = (t2 - t3) + (t4 - t1) Feb 5 20:11:07 snps ptp4l: [17643.484] t2 - t3 = -1244255534 Feb 5 20:11:07 snps ptp4l: [17643.484] t4 - t1 = +587362612 Feb 5 20:11:07 snps ptp4l: [17643.484] c1 0 Feb 5 20:11:07 snps ptp4l: [17643.484] c2 0 Feb 5 20:11:07 snps ptp4l: [17643.484] c3 0 Feb 5 20:11:07 snps kernel: Feb 5 20:11:07 snps ptp4l: [17643.897] master offset 38794768811 s2 adj +50000000 path delay -893208001 Feb 5 20:11:07 snps ptp4l: [17643.897] failed to adjust the clock: Operation not supported Feb 5 20:11:08 snps ptp4l: [17644.225] negative path delay -183759008 Feb 5 20:11:08 snps ptp4l: [17644.225] path_delay = (t2 - t3) + (t4 - t1) Feb 5 20:11:08 snps ptp4l: [17644.226] t2 - t3 = -696186278 Feb 5 20:11:08 snps ptp4l: [17644.226] t4 - t1 = +328668261 Feb 5 20:11:08 snps ptp4l: [17644.226] c1 0 Feb 5 20:11:08 snps ptp4l: [17644.226] c2 0 Feb 5 20:11:08 snps ptp4l: [17644.226] c3 0 Feb 5 20:11:08 snps kernel: Feb 5 20:11:08 snps kernel: Feb 5 20:11:08 snps ptp4l: [17644.517] negative path delay -346790341 Feb 5 20:11:08 snps ptp4l: [17644.517] path_delay = (t2 - t3) + (t4 - t1) Feb 5 20:11:08 snps ptp4l: [17644.517] t2 - t3 = -1313738070 Feb 5 20:11:08 snps ptp4l: [17644.517] t4 - t1 = +620157388 Feb 5 20:11:08 snps ptp4l: [17644.517] c1 0 Feb 5 20:11:08 snps ptp4l: [17644.517] c2 0 Feb 5 20:11:08 snps ptp4l: [17644.517] c3 0 Feb 5 20:11:08 snps ptp4l: [17644.896] master offset 41746912836 s2 adj +50000000 path delay -579241337 Feb 5 20:11:08 snps ptp4l: [17644.896] failed to adjust the clock: Operation not supported 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. > You can also test the SO_TIMESTAMPING support using the program found > in Documentation/networking/timestamping. > > HTH, > Richard > |