Thread: [Linuxptp-users] Need help : new to PTP testing
PTP IEEE 1588 stack for Linux
Brought to you by:
rcochran
From: Rayagond K. <ray...@gm...> - 2013-01-25 10:58:49
|
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, 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 |
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 |
From: Richard C. <ric...@gm...> - 2013-01-26 07:33:02
|
On Fri, Jan 25, 2013 at 04:28:39PM +0530, Rayagond Kokatanur wrote: > I am new to PTP implementation and testing. ... > 6. I ran following commands ... Up until this point, you did everything just right. > $ptp4l -i eth0 -p /dev/ptp0 > > ie I choose my system ad PTP master and it is sending the SYNC messages and > all. I would do ptp4l -i eth0 -p /dev/ptp0 -m -q then you will see all the messages that show the estimated offset from master. You can also add '-s' to force slave-only mode. > I am not getting how to use -f option and what is the configuration file > etc. For simple testing, you don't need the configuration file at all. HTH, Richard |
From: Richard C. <ric...@gm...> - 2013-01-26 07:38:48
|
On Fri, Jan 25, 2013 at 10:56:44AM -0800, Jacob Keller wrote: > > 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 changed the -v option to show the version info, just before making release 1.0. Instead you now use -m and -q. Otherwise, Jacob's advice is good. Thanks, Richard |
From: Keller, J. E <jac...@in...> - 2013-01-26 07:54:00
|
> -----Original Message----- > From: Richard Cochran [mailto:ric...@gm...] > Sent: Friday, January 25, 2013 11:39 PM > To: Keller, Jacob E > Cc: Rayagond Kokatanur; lin...@li... > Subject: Re: [Linuxptp-users] Need help : new to PTP testing > > On Fri, Jan 25, 2013 at 10:56:44AM -0800, Jacob Keller wrote: > > > > 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 changed the -v option to show the version info, just before making > release 1.0. Instead you now use -m and -q. > > Otherwise, Jacob's advice is good. Yes I had forgotten :) Thanks - Jake > > Thanks, > Richard |
From: Rayagond K. <ray...@gm...> - 2013-01-28 06:36:38
|
Thanks Jacob and Richard for your quick help, I will try it and let you know. On 26 January 2013 13:23, Keller, Jacob E <jac...@in...> wrote: > > -----Original Message----- > > From: Richard Cochran [mailto:ric...@gm...] > > Sent: Friday, January 25, 2013 11:39 PM > > To: Keller, Jacob E > > Cc: Rayagond Kokatanur; lin...@li... > > Subject: Re: [Linuxptp-users] Need help : new to PTP testing > > > > On Fri, Jan 25, 2013 at 10:56:44AM -0800, Jacob Keller wrote: > > > > > > 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 changed the -v option to show the version info, just before making > > release 1.0. Instead you now use -m and -q. > > > > Otherwise, Jacob's advice is good. > > Yes I had forgotten :) Thanks > > - Jake > > > > Thanks, > > Richard > |