Re: [Linuxptp-users] Need help : new to PTP testing
PTP IEEE 1588 stack for Linux
Brought to you by:
rcochran
From: Jacob K. <jac...@in...> - 2013-01-25 18:56:53
|
On 01/25/2013 02:58 AM, Rayagond Kokatanur wrote: > Hi All, > > I am new to PTP implementation and testing. > > So far I have done following with the help of Linux doc and browsing > (http://linuxptp.sourceforge.net/), > > 1. I referred Linux doc and reference driver and implemented PTP V1 and > V2 in MAC driver - MAC driver is able to handle PTP packets, it can pass > the transmitted/received packets timestamp value to stack. > > 2. I am able to write PTP Hardware Clock (PHC) driver and integrate with > my MAC driver - Through PHC driver I have registered all the clock API's > like gettime/settime/adjtime etc to ptp clock driver or ptp stack. My > MAC has internal clock source, so I am registering the PHC driver as > part of MAC driver itself. > > 3. I build Linux kernel with version 3.1.1 and enabled all the PTP > related kernel configurations like CONFIG_PPS, > CONFIG_NETWORK_PHY_TIMESTAMPING and PTP_1588_CLOCK. > > 4. After loading MAC driver I can see /dev/ptp0 entry for my PHC driver. > > 5. For testing PTP, I downloaded the ptp application from - git clone > git://git.code.sf.net/p/linuxptp/code > <http://git.code.sf.net/p/linuxptp/code>, and compiled the ptp it and > installed in my system. Now I can run the ptp application. > > 6. I ran following commands ... > > $ptp4l -i eth0 -p /dev/ptp0 > > ie I choose my system ad PTP master and it is sending the SYNC messages > and all. > > I am not getting how to use -f option and what is the configuration file > etc. > > I don't have clear idea on how to test the PTP, please give me some > suggestions to go ahead. > > Thank you all in advance for any help. > > --------------- > Rayagond > > > Hi Rayagond - The config file has a lot of fine tuning options that you may (or may not) need for your part to work, and for fine tuning some settings. I would suggest viewing the man page which is provided in the source. This page describes the options available and how to use them. If your device has a method of externally generating a pulse per second you can set up a test that helps to compare the calculated offset value by PTP and the actual jitter of the pulse per second. You will need two machines, at least one of which has your part, linked to the other end that has a working PTP implementation, whether that is your own part, another part, or software timestamping. For testing purposes I would use the -v option which switches to verbose mode and prevents the daemon software from backgrounding. This will allow you to more easily view the output. I would suggest providing a known working hardware timestamp NIC or switch or something on the other end of the link in order to test your part against that. Hope this helps. - Jake |