Wolfgang Wallner
2016-10-31 07:58:57 UTC
Hello LinuxPTP community,
We (B&R) are currently evaluating the available open-source PTP implementations (LinxPTP, PTPd, OpenAVB) for the usage as IEEE 802.1AS stacks.
As part of this effort, I have spent some time to test LinuxPTP on a B&R industrial PC with an Intel i210 NIC.
LinuxPTP already supports most of 802.1AS, but I have also found some issues, which I would like to discuss with you.
I have listed the individual issues below, feedback on any of these issues would be welcome.
Especially if they are already known, if someone is working on them, or if the LinuxPTP community would be interested in contributions for these issues.
kind regards,
Wolfgang Wallner
PS: I tried to scan the archives before posting this message.
Unfortunately I always get "Error 403: Read access required" when I try to access https://sourceforge.net/p/linuxptp/mailman/linuxptp-users/
Do I need any further permissions for my sourceforge account to view the archives?
LinuxPTP 802.1AS issues:
1) phc2sys does not work if transportSpecific is set to 1
When I set transportSpecific to 1 (as required by 802.1AS) in my config file, the phc2sys tool does not work.
My test config file looks as follows:
$ cat TestConfig.cfg
[global]
transportSpecific 1
When I call ptp4l with "sudo ptp4l -f TestConfig.cfg -i enp2s0 -p /dev/ptp0 -m" (without that config file) and phc2sys with "sudo phc2sys -a -r -r -m -S 0.2 -F 0.2" it only prints "phc2sys[5236.261]: Waiting for ptp4l..." every second. If I start ptp4l without that config file or comment out that one line, phc2sys works as expected.
2) Differences in the BMC algorithm
Is it possible to specify a different best master clock algorithm than that of the default PTP profile?
I could not find any such option, please correct me if I have overlooked something.
The BMCA of the default PTP profile and 802.1AS are similar, but not the same.
Noticable differences are:
*) There is no pre-master state in 802.1AS
*) There is no foreign master qualification in 802.1AS
*) If a master stops sending sync messages but still sends announce messages, this should trigger a state change in the slave according to 802.1AS (configured via syncReceiptTimeoutTime), while it is fine in default PTP.
3) PDelay uses wrong clock
802.1AS specifies in 11.1.2 the following:
"In practice, t1 and t4 are measured relative to the LocalClock entity of the initiator time-aware system, and t2 and t3 are measured relative to the LocalClock entity of the responder time-aware system."
The LocalClock in 802.1AS is a local free running oscillator, in contrast to the recovered clock that is created via PTP.
However, I see in the t2 and t3 timestamps of my LinuxPTP instances times refering to the time that is transfered via PTP.
4) Path Trace TLV
Announce messages without a Path Trace TLV are ignored by my device if I set path_trace_enabled to 1.
I think in 802.1AS a Path Trace TLV should be attached to announce messages, but announce messages should not be dropped if a received message does not have one.
5) The PPS signal produced by the i210 seems to be unreliable
I know that the right place to discuss i210 problems would be LMKL, I just mention this here as I assume several of you might have experience with this chip.
I observe that if I enable the PPS signal on the software definable pins of the i210 it initially works fine.
But if there are state changes in the PTP stack because I unplug/replug other devices to the network, the PPS signal of the i210 can disappear.
Calling the corresponding ioctls again (and thus setting the register of the i210 again) restores the signal.
Does this match your experience?
We (B&R) are currently evaluating the available open-source PTP implementations (LinxPTP, PTPd, OpenAVB) for the usage as IEEE 802.1AS stacks.
As part of this effort, I have spent some time to test LinuxPTP on a B&R industrial PC with an Intel i210 NIC.
LinuxPTP already supports most of 802.1AS, but I have also found some issues, which I would like to discuss with you.
I have listed the individual issues below, feedback on any of these issues would be welcome.
Especially if they are already known, if someone is working on them, or if the LinuxPTP community would be interested in contributions for these issues.
kind regards,
Wolfgang Wallner
PS: I tried to scan the archives before posting this message.
Unfortunately I always get "Error 403: Read access required" when I try to access https://sourceforge.net/p/linuxptp/mailman/linuxptp-users/
Do I need any further permissions for my sourceforge account to view the archives?
LinuxPTP 802.1AS issues:
1) phc2sys does not work if transportSpecific is set to 1
When I set transportSpecific to 1 (as required by 802.1AS) in my config file, the phc2sys tool does not work.
My test config file looks as follows:
$ cat TestConfig.cfg
[global]
transportSpecific 1
When I call ptp4l with "sudo ptp4l -f TestConfig.cfg -i enp2s0 -p /dev/ptp0 -m" (without that config file) and phc2sys with "sudo phc2sys -a -r -r -m -S 0.2 -F 0.2" it only prints "phc2sys[5236.261]: Waiting for ptp4l..." every second. If I start ptp4l without that config file or comment out that one line, phc2sys works as expected.
2) Differences in the BMC algorithm
Is it possible to specify a different best master clock algorithm than that of the default PTP profile?
I could not find any such option, please correct me if I have overlooked something.
The BMCA of the default PTP profile and 802.1AS are similar, but not the same.
Noticable differences are:
*) There is no pre-master state in 802.1AS
*) There is no foreign master qualification in 802.1AS
*) If a master stops sending sync messages but still sends announce messages, this should trigger a state change in the slave according to 802.1AS (configured via syncReceiptTimeoutTime), while it is fine in default PTP.
3) PDelay uses wrong clock
802.1AS specifies in 11.1.2 the following:
"In practice, t1 and t4 are measured relative to the LocalClock entity of the initiator time-aware system, and t2 and t3 are measured relative to the LocalClock entity of the responder time-aware system."
The LocalClock in 802.1AS is a local free running oscillator, in contrast to the recovered clock that is created via PTP.
However, I see in the t2 and t3 timestamps of my LinuxPTP instances times refering to the time that is transfered via PTP.
4) Path Trace TLV
Announce messages without a Path Trace TLV are ignored by my device if I set path_trace_enabled to 1.
I think in 802.1AS a Path Trace TLV should be attached to announce messages, but announce messages should not be dropped if a received message does not have one.
5) The PPS signal produced by the i210 seems to be unreliable
I know that the right place to discuss i210 problems would be LMKL, I just mention this here as I assume several of you might have experience with this chip.
I observe that if I enable the PPS signal on the software definable pins of the i210 it initially works fine.
But if there are state changes in the PTP stack because I unplug/replug other devices to the network, the PPS signal of the i210 can disappear.
Calling the corresponding ioctls again (and thus setting the register of the i210 again) restores the signal.
Does this match your experience?