[Linuxptp-users] Configure PTP4L through multiple NICs
Hello, I am trying to have my device receive PTP from a master clock from one NIC and output it through another NIC. >From my understanding, I need to set boundary_clock_jbod high in the >/etc/ptp4l.conf file. I tried running the command "ptp4l -p /dev/ptp4 -I eno1 >-ens801f1 -m" as well as running ptp4l with systemctl restart ptp4l with the >previous command as well as "-f /etc/ptp4l.conf -I eno1" after OPTIONS=. When I view wireshark, my Linux PC isn't outputting any PTP through the other NIC. My linux PC is syncing to the grandmaster. Is my command correct? Any assistance would be appreciated. Here is a simple overview of my architecture: Grandmaster --> RJ45 NIC --> Linux PC --> QSFP --> Other devices Thank you, Benjamin Chang ___ Linuxptp-users mailing list Linuxptp-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxptp-users
Re: [Linuxptp-users] gPTP and PTP on the same computer
On Tue, May 16, 2023 at 01:54:47PM +, Eric Decker wrote: > I have a question related to the question below. If you use a > boundary clock between gPTP and PTP, does the PHC have to be shared > by both NICs? Yes. > If each NIC has an independent PHC I think phy2sys has to be used > two synchronized two instances ptp4l but I am not sure how this > configuration could work as a boundary clock. Use phc2sys flag -a and maybe also -r From the man page: -a Read the clocks to synchronize from running ptp4l and follow changes in the port states, adjusting the synchronization direc‐ tion automatically. The system clock (CLOCK_REALTIME) is not synchronized, unless the -r option is also specified. -r Only valid together with the -a option. Instructs phc2sys to also synchronize the system clock (CLOCK_REALTIME). By default, the system clock is not considered as a possible time source. If you want the system clock to be eligible to become a time source, specify the -r option twice. HTH, Richard ___ Linuxptp-users mailing list Linuxptp-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxptp-users
Re: [Linuxptp-users] Software timestamping delay - master offset drift
> > > Is it possible to force it to +0 like in the log of the > > > first run above, the one that synchronizes? > > phc_ctl CLOCK_REALTIME freq 0 > Hello, Miroslav, thank you very much. BR. ___ Linuxptp-users mailing list Linuxptp-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxptp-users
Re: [Linuxptp-users] Software timestamping delay - master offset drift
On Tue, May 16, 2023 at 11:04:36AM -0300, Elder Costa wrote: > > > ptp4l[484.261]: port 1 (enp3s0): new foreign master 0001c0.fffe.1a3cda-1 > > > ptp4l[488.262]: selected best master clock 0001c0.fffe.1a3cda > > > ptp4l[488.262]: foreign master not using PTP timescale > > > ptp4l[488.262]: port 1 (enp3s0): LISTENING to UNCALIBRATED on RS_SLAVE > > > ptp4l[490.263]: master offset -37039670930503 s0 freq -0 path delay > > 229600 > > > > > > ptp4l[17805.578]: port 1 (enp3s0): new foreign master 0001c0.fffe.1a3e8e-1 > > > ptp4l[17809.579]: selected best master clock 0001c0.fffe.1a3e8e > > > ptp4l[17809.579]: foreign master not using PTP timescale > > > ptp4l[17809.579]: port 1 (enp3s0): LISTENING to UNCALIBRATED on RS_SLAVE > > > ptp4l[17810.584]: master offset 159453 s0 freq +1 path delay > >216530 > > > > > > > Where does that initial freq value come from? It's the current frequency of the clock. > > Is it possible to force it to +0 like in the log of the > > first run above, the one that synchronizes? phc_ctl CLOCK_REALTIME freq 0 -- Miroslav Lichvar ___ Linuxptp-users mailing list Linuxptp-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxptp-users
Re: [Linuxptp-users] gPTP and PTP on the same computer
I have a question related to the question below. If you use a boundary clock between gPTP and PTP, does the PHC have to be shared by both NICs? What I mean is the PHC is shared by both NICs while each NIC independently timestamps PTP frames using the same PTP hardware clock. If each NIC has an independent PHC I think phy2sys has to be used two synchronized two instances ptp4l but I am not sure how this configuration could work as a boundary clock. Eric Decker -Original Message- From: Richard Cochran Sent: Tuesday, May 16, 2023 9:42 AM To: Fueloep, Tamas Cc: linuxptp-users@lists.sourceforge.net Subject: Re: [Linuxptp-users] gPTP and PTP on the same computer On Tue, May 16, 2023 at 08:35:36AM +, Fueloep, Tamas via Linuxptp-users wrote: > Dear LinuxPTP mailing list participants, > > First of all, thank you very much for this amazing software - it > really makes life easier and it is fun to use. "fun to use?" hahaha that is new! > I would have a question, because I can't get a grasp on something. I > have a setup, where multiple sensors are connected to the same > computer, each of the sensors are connected to a dedicated network > interface. Some of the sensors are only compatible with gPTP and some > of them are only with PTP. The default configuration files that come > with the ptp4linux installation are working perfectly independently, > but I cannot make the sensors work in a parallel way. I have tried to > run multiple ptp4l instances and for the PTP I've used the > 'default.cfg' and for the gPTP the 'automotive-master.cfg'. Obviously > this does not work as expected, but I am a bit lost on figuring out > what would be the ideal setup in this case. > Could you please help me what is the right concept to use in this situation? You can run ptp4l as a Boundary Clock on multiple interfaces at once, and you can freely mix and match profiles on the different ports. For example: ptp4l -m -q -i eth0 -i eth1 or in a configuration: [global] # ... [eth0] # eth0 options... [eth1] # eth1 options... The only thing I'm uncertain of is the Automotive Profile. Most of the configuration options are per-port, but you will probably not set the global option inhibit_delay_req. See the man page and/or config.c to learn which options are per-port. Thanks, Richard ___ Linuxptp-users mailing list Linuxptp-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxptp-users CAUTION: This email originated from outside of TORC's email system. DO NOT click links or open attachments unless you recognize the sender and know the content is safe. Email is NOT a secure means of communication. Handle potentially sensitive information with care. Confidentiality Notice: This email message, including any attachments, is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message. ___ Linuxptp-users mailing list Linuxptp-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxptp-users
Re: [Linuxptp-users] gPTP and PTP on the same computer
Hi Richard, Thanks for the prompt reply. Yeah, maybe I am a bit insane, but I find it fun hahaha I will try what you suggested and report back if it worked. Maybe that's a useful info for others as well. Thanks, Tamas From: Richard Cochran Sent: Tuesday, May 16, 2023 15:42 To: Fueloep, Tamas (SMO SDT TEC SPA TPQ) Cc: linuxptp-users@lists.sourceforge.net Subject: Re: [Linuxptp-users] gPTP and PTP on the same computer On Tue, May 16, 2023 at 08:35:36AM +, Fueloep, Tamas via Linuxptp-users wrote: > Dear LinuxPTP mailing list participants, > > First of all, thank you very much for this amazing software - it > really makes life easier and it is fun to use. "fun to use?" hahaha that is new! > I would have a question, because I can't get a grasp on something. I > have a setup, where multiple sensors are connected to the same > computer, each of the sensors are connected to a dedicated network > interface. Some of the sensors are only compatible with gPTP and > some of them are only with PTP. The default configuration files that > come with the ptp4linux installation are working perfectly > independently, but I cannot make the sensors work in a parallel > way. I have tried to run multiple ptp4l instances and for the PTP > I've used the 'default.cfg' and for the gPTP the > 'automotive-master.cfg'. Obviously this does not work as expected, > but I am a bit lost on figuring out what would be the ideal setup in > this case. > Could you please help me what is the right concept to use in this situation? You can run ptp4l as a Boundary Clock on multiple interfaces at once, and you can freely mix and match profiles on the different ports. For example: ptp4l -m -q -i eth0 -i eth1 or in a configuration: [global] # ... [eth0] # eth0 options... [eth1] # eth1 options... The only thing I'm uncertain of is the Automotive Profile. Most of the configuration options are per-port, but you will probably not set the global option inhibit_delay_req. See the man page and/or config.c to learn which options are per-port. Thanks, Richard ___ Linuxptp-users mailing list Linuxptp-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxptp-users
Re: [Linuxptp-users] Software timestamping delay - master offset drift
> > ptp4l[484.261]: port 1 (enp3s0): new foreign master 0001c0.fffe.1a3cda-1 > > ptp4l[488.262]: selected best master clock 0001c0.fffe.1a3cda > > ptp4l[488.262]: foreign master not using PTP timescale > > ptp4l[488.262]: port 1 (enp3s0): LISTENING to UNCALIBRATED on RS_SLAVE > > ptp4l[490.263]: master offset -37039670930503 s0 freq -0 path delay > 229600 > > > > ptp4l[17805.578]: port 1 (enp3s0): new foreign master 0001c0.fffe.1a3e8e-1 > > ptp4l[17809.579]: selected best master clock 0001c0.fffe.1a3e8e > > ptp4l[17809.579]: foreign master not using PTP timescale > > ptp4l[17809.579]: port 1 (enp3s0): LISTENING to UNCALIBRATED on RS_SLAVE > > ptp4l[17810.584]: master offset 159453 s0 freq +1 path delay >216530 > > > > Where does that initial freq value come from? > > Is it possible to force it to +0 like in the log of the > first run above, the one that synchronizes? > > If the latter is possible, but requires code change to be > tested, where should I look at in the source code? No hints on this? ___ Linuxptp-users mailing list Linuxptp-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxptp-users
Re: [Linuxptp-users] gPTP and PTP on the same computer
On Tue, May 16, 2023 at 08:35:36AM +, Fueloep, Tamas via Linuxptp-users wrote: > Dear LinuxPTP mailing list participants, > > First of all, thank you very much for this amazing software - it > really makes life easier and it is fun to use. "fun to use?" hahaha that is new! > I would have a question, because I can't get a grasp on something. I > have a setup, where multiple sensors are connected to the same > computer, each of the sensors are connected to a dedicated network > interface. Some of the sensors are only compatible with gPTP and > some of them are only with PTP. The default configuration files that > come with the ptp4linux installation are working perfectly > independently, but I cannot make the sensors work in a parallel > way. I have tried to run multiple ptp4l instances and for the PTP > I've used the 'default.cfg' and for the gPTP the > 'automotive-master.cfg'. Obviously this does not work as expected, > but I am a bit lost on figuring out what would be the ideal setup in > this case. > Could you please help me what is the right concept to use in this situation? You can run ptp4l as a Boundary Clock on multiple interfaces at once, and you can freely mix and match profiles on the different ports. For example: ptp4l -m -q -i eth0 -i eth1 or in a configuration: [global] # ... [eth0] # eth0 options... [eth1] # eth1 options... The only thing I'm uncertain of is the Automotive Profile. Most of the configuration options are per-port, but you will probably not set the global option inhibit_delay_req. See the man page and/or config.c to learn which options are per-port. Thanks, Richard ___ Linuxptp-users mailing list Linuxptp-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxptp-users
[Linuxptp-users] gPTP and PTP on the same computer
Dear LinuxPTP mailing list participants, First of all, thank you very much for this amazing software - it really makes life easier and it is fun to use. I would have a question, because I can't get a grasp on something. I have a setup, where multiple sensors are connected to the same computer, each of the sensors are connected to a dedicated network interface. Some of the sensors are only compatible with gPTP and some of them are only with PTP. The default configuration files that come with the ptp4linux installation are working perfectly independently, but I cannot make the sensors work in a parallel way. I have tried to run multiple ptp4l instances and for the PTP I've used the 'default.cfg' and for the gPTP the 'automotive-master.cfg'. Obviously this does not work as expected, but I am a bit lost on figuring out what would be the ideal setup in this case. Could you please help me what is the right concept to use in this situation? Thank you very much in advance! Best regards, Tamas Fulop ___ Linuxptp-users mailing list Linuxptp-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxptp-users