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-09 10:43:14
|
Hi Richard and Jacob, I am able to proceed further there were couple for programming bugs in my .adjfreq and .adjtime api's. Now am able to sync to MASTER time but its not so accurate, there is still one minute difference between MASTER and SLAVE. MASTER is one minute ahead than SLAVE. Also I referred INTEL ptp clock driver(ppt_ixp46x.c) and I am not able to understand two points, 1> .max_adj = 66666655 What is max_adj value ? Is it a maximum clock frequency connect to my MAC/PTP ? Whenever ptp4l calls .adjfreq, it passes either +/1 .max_adj frequency to .adjfreq api, why ? In my case, I am using 62.5MHz clock, so I specified .max_freq = 62500000. 2> DEFAULT_ADDEND = 0xF0000029 What is this magic number ? Is it calculated based on max_adj frequency value ? Thanks and Regards, Rayagond On 7 February 2013 14:14, Richard Cochran <ric...@gm...> wrote: > On Thu, Feb 07, 2013 at 12:28:30PM +0530, Rayagond Kokatanur wrote: > > > > How to verify that time stamp are working with my driver ? > > How about this: > > 1. Send sync messages to the device at the rate of once per second. > 2. Print out the received time stamps and verify that they are about > one second apart. > > Then repeat the excercise for the delay request message transmission. > > Also, you should try the Linux kernel test program in > Documentation/networking/timestamping. > > > I send time stamp like this to stack, > > > > 1. read the tx/rx timestamp low and high value into "u64 ns;" variable. > > 2. convert the raw timstamp value to ktime using - "ns_to_ktime()" api. > > 3. assign the converted value to .hwtstamp field of struct > > skb_shared_hwtstamps struct. > > 3. finally pass the struct skb_shared_hwtstamps to stack. > > > > I am not manipulating other field of struct skb_shared_hwtstamps ie > syststamp. > > > > Also I have configured device to capture time stamp for all received > packets. > > > > Please let me if my procedure is wrong ? > > Sounds okay, but you have not shown us any code, so you never know. > I encourage you to post your driver on the Linux netdev list. > > HTH, > Richard > |