Re: [Linuxptp-users] gPTP and PTP on the same computer

2023-05-16 Thread Richard Cochran
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] gPTP and PTP on the same computer

2023-05-16 Thread Eric Decker
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

2023-05-16 Thread Fueloep, Tamas via Linuxptp-users
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] gPTP and PTP on the same computer

2023-05-16 Thread Richard Cochran
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

2023-05-16 Thread Fueloep, Tamas via Linuxptp-users
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