Thread: [Linuxptp-users] (no subject) (Page 2)
PTP IEEE 1588 stack for Linux
Brought to you by:
rcochran
From: Akash M. <aka...@s2...> - 2022-10-17 08:24:55
|
Hey guys, I really would like to know the answer to this question that's bugging me. I have a NIC I350 with 4 ports. is it possible to make one port as Master and the other ports as slave? or do i need to have another NIC which can act as a slave. Thanks in advance |
From: Richard C. <ric...@gm...> - 2022-10-18 11:36:33
|
On Mon, Oct 17, 2022 at 10:24:36AM +0200, Akash Munirathinam wrote: > > Hey guys, > I really would like to know the answer to this question that's bugging me. > I have a NIC I350 with 4 ports. is it possible to make one port as Master > and the other ports as slave? or do i need to have another NIC which can act > as a slave. If each of the 4 ports has its own PHC, then you can run one ptp4l instance on each port. The easiest way is with layer2 (-2) transport. HTH, Richard |
From: Nemo C. <nem...@gm...> - 2022-10-18 13:59:24
|
Hi Akash, At any given time, for a multi port switch, you can have only 1 port as Slave. And the other ports would become MASTER. This is a typical BC way of operation. Do you mean to have 3 ports on MASTER and one on SLAVE? If yes, this means, you want your device to be SLAVE to some master and MASTER to 3 slave devices. Thanks! On Monday, 17 October, 2022 at 04:27:52 am GMT-4, Akash Munirathinam <aka...@s2...> wrote: Hey guys, I really would like to know the answer to this question that's bugging me. I have a NIC I350 with 4 ports. is it possible to make one port as Master and the other ports as slave? or do i need to have another NIC which can act as a slave. Thanks in advance _______________________________________________ Linuxptp-users mailing list Lin...@li... https://lists.sourceforge.net/lists/listinfo/linuxptp-users |
From: prathosh s. <pra...@gm...> - 2022-11-15 12:54:57
|
Hello team, I had no issue with using software time stamping and also I am able to see the hardware timestamping support by building new kernel. But when I try to use the PHC, I see the PHC clock not being updated correctly. I see only the nSec bits being updated. Here are some of the tests I did. --------------------- *root@sama7g5ek-sd:~# phc_ctl eth0 get* *phc_ctl[60533.796]: clock time is 1.010098874 or Thu Jan 1 00:00:01 1970* *root@sama7g5ek-sd:~# phc_ctl eth0 get* *phc_ctl[60536.812]: clock time is 1.015383981 or Thu Jan 1 00:00:01 1970* *root@sama7g5ek-sd:~# phc_ctl eth0 get* *phc_ctl[60541.072]: clock time is 1.022850092 or Thu Jan 1 00:00:01 1970* *------------------------* And also, I tried the PHC sanity check, and it fails to get the correct PHC time. ------------------------- *root@sama7g5ek-sd:~# phc_ctl /dev/ptp0 freq 100000000 set 0.0 wait 10.0 get* *phc_ctl[61677.633]: adjusted clock frequency offset to 100000000.000000ppb* *phc_ctl[61677.638]: set clock time to 0.000000000 or Thu Jan 1 00:00:00 1970* *phc_ctl[61687.640]: process slept for 10.000000 seconds* *phc_ctl[61687.641]: clock time is 0.048045447 or Thu Jan 1 00:00:00 1970* *root@sama7g5ek-sd:~# phc_ctl /dev/ptp0 freq 100000000 set 0.0 wait 10.0 get* *phc_ctl[61700.096]: adjusted clock frequency offset to 100000000.000000ppb* *phc_ctl[61700.101]: set clock time to 0.000000000 or Thu Jan 1 00:00:00 1970* *phc_ctl[61710.103]: process slept for 10.000000 seconds* *phc_ctl[61710.104]: clock time is 0.088698838 or Thu Jan 1 00:00:00 1970* It would be great, if you could provide any information on this behaviour. Thanks Warm regards Prathosh |
From: Richard C. <ric...@gm...> - 2016-07-12 18:39:34
|
Well it is possible, provided that each ptp4l instance has its own port, and that each port has its own PHC. But to be quite honest, your proposed use case does not make any sense. What are you trying to acheive? Thanks, Richard |
From: Baya O. <bay...@gm...> - 2016-07-12 19:47:56
|
Hallo Richard, Thank you for your answer ... As a matter of fact, when my colleague has ask me that i also said that it does not make sens :-) and we would need separate port and PHC :-) .. I clear is our situation : the purpose will be used on embedded software on train . the train has two railway engine, one on the front and the other on the back. these two engines run a ptpd daemon as a master. both engine communicate independently with an I/O board controller which would run a ptpd daemon as a slave. so my idea is to have two ptpd daemon as slave on the I/O board controller . One of the slave daemon will communicate with the front master and the other will communicate with the other master at back of the train. I read about configuring domain. How could I use this idea. Once again thank you for all, Baya 2016-07-12 20:39 GMT+02:00 Richard Cochran <ric...@gm...>: > Well it is possible, provided that each ptp4l instance has its own > port, and that each port has its own PHC. > > But to be quite honest, your proposed use case does not make any > sense. What are you trying to acheive? > > Thanks, > Richard > |
From: Richard C. <ric...@gm...> - 2016-07-12 21:35:31
|
On Tue, Jul 12, 2016 at 09:04:25PM +0200, Baya Oussena wrote: > so my idea is to have two ptpd daemon as slave on the I/O board > controller . One of the slave daemon will communicate with the front master > and the other will communicate with the other master at back of the train. Okay, so this is starting to make sense. Another question: Why does the controller need both master times? Is it for redundancy, or are there two control loops, each synchronized to a different engine? > I read about configuring domain. How could I use this idea. So you only have one physical Ethernet port and one PHC, right? You have a number of options, but I haven't tried any of them! Here are a few ideas: - There are different ideas out there about redundancy for PTP. Supporting any of these properly (within one process) would be quite some work, I should think. - If you have only one PHC, then you must run one or both ptp4l instance with option "free_running 1". You can still run your servos, using the data from the TIME_STATUS_NP management query. - Simply using two different domains *might* work, if not with UDP then at least Layer-2 should work. - You can also consider using two different transports to isolate the pairs, like UDP and Layer-2. - Another idea is to run Layer-2 and isolate using VLANs. Good luck, Richard |
From: Richard C. <ric...@gm...> - 2016-07-13 06:14:51
|
On Tue, Jul 12, 2016 at 11:35:18PM +0200, Richard Cochran wrote: > - Another idea is to run Layer-2 and isolate using VLANs. Also: - You can try running UDP over two different VLAN interfaces. - VLAN will only work if your HW correctly identifies PTP frames with a VLAN header. - Regarding the HW: Some MAC HW can only time stamp one transmit frame at a time, like the Intel 82574 (driver e1000e) for example. If you have such HW, then running two ptp4l instances will *not* work. HTH, Richard |
From: Baya O. <bay...@gm...> - 2016-07-13 08:35:43
|
Hallo Richard, Once again, I thank you very much for your help, you saved me a lot of time. Indeed our architecture is Intel 82574 (driver e1000e) so I will have to think of an other solution. My part work of work is a small part of an existing architecture and I will have to find a solution avoiding to make others making any change. in fact it is a complicated architecture , we have redundancy and also duplication. For example we could be in a situation where two connected trains share a same part of the tract during a journey and than get split out somewhere. so each part of the two connected train has two engines (front and rear), and each engine has redundancy for safety reasons .. all computers Boards may be switched on but only on computer Board is active at a time.. well, I will go through the step you already mentioned and see how I can gain any advance from it. Once again thank, thank very much, Best regards, Baya 2016-07-13 8:12 GMT+02:00 Richard Cochran <ric...@gm...>: > On Tue, Jul 12, 2016 at 11:35:18PM +0200, Richard Cochran wrote: > > - Another idea is to run Layer-2 and isolate using VLANs. > > Also: > > - You can try running UDP over two different VLAN interfaces. > > - VLAN will only work if your HW correctly identifies PTP frames with > a VLAN header. > > - Regarding the HW: Some MAC HW can only time stamp one transmit frame > at a time, like the Intel 82574 (driver e1000e) for example. If you > have such HW, then running two ptp4l instances will *not* work. > > HTH, > Richard > |
From: Richard C. <ric...@gm...> - 2016-07-13 09:14:12
|
On Wed, Jul 13, 2016 at 10:25:46AM +0200, Baya Oussena wrote: > Once again, I thank you very much for your help, you saved me a lot of > time. Indeed our architecture is Intel 82574 (driver e1000e) so I will have > to think of an other solution. Oh man. That is not one of Intel's better parts. Oh well. If you want to use ptp4l, you are going to have to implement multiple clocks, each with its own configuration. Take a look at clock.h and clock.c. The functional interface would allow more than one clock, but the implementation does not. We have: struct clock the_clock; ... clock_create() { struct clock *c = &the_clock; ... return c; } At the very least, you will have to properly allocate the new clock. After that, you'll have to make sure it all works. My gut feeling is that there will be some issues to resolve... Good luck, Richard |
From: Baya O. <bay...@gm...> - 2016-07-13 10:56:31
|
yes thank you Richard, indeed it is going to be some issues to resolve... I will let you know the progress using ptp4l but we need to find a best and secured solution because the software will be implemented on real fast train, so the timing is very very important.. Baya 2016-07-13 11:14 GMT+02:00 Richard Cochran <ric...@gm...>: > On Wed, Jul 13, 2016 at 10:25:46AM +0200, Baya Oussena wrote: > > Once again, I thank you very much for your help, you saved me a lot of > > time. Indeed our architecture is Intel 82574 (driver e1000e) so I will > have > > to think of an other solution. > > Oh man. That is not one of Intel's better parts. Oh well. > > If you want to use ptp4l, you are going to have to implement multiple > clocks, each with its own configuration. Take a look at clock.h and > clock.c. The functional interface would allow more than one clock, > but the implementation does not. We have: > > struct clock the_clock; > ... > clock_create() > { > struct clock *c = &the_clock; > ... > return c; > } > > At the very least, you will have to properly allocate the new clock. > After that, you'll have to make sure it all works. My gut feeling is > that there will be some issues to resolve... > > Good luck, > Richard > > |