Discussion:
[Linuxptp-users] (no subject)
Baya Oussena
2016-07-12 15:17:30 UTC
Permalink
Hallo Dear linuxptp-users,

Please could any one from you help me answer this question.

For our Project Needs, I would like to have the possibility of doing the
following :

I would like to run two demons of ptp4l on one machine as a slave , that is
slave 1 and slave 2

and two demons of ptp4l on the second machine with two master: master1
,master 2.

I would like to have : slave1 synchronising with master1 and
slave2 synchronising with master2.


Is this that possible?

Thank you in advance for your help,

Baya
Richard Cochran
2016-07-12 18:39:23 UTC
Permalink
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
Baya Oussena
2016-07-12 19:04:25 UTC
Permalink
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
Post by Richard Cochran
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
Richard Cochran
2016-07-12 21:35:18 UTC
Permalink
Post by Baya Oussena
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?
Post by Baya Oussena
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
Richard Cochran
2016-07-13 06:12:16 UTC
Permalink
Post by Richard Cochran
- 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
Baya Oussena
2016-07-13 09:52:01 UTC
Permalink
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
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,
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
Loading...