>But you haven't even identified a problem. clientOnly and boundary_clock_jbod
>work just fine together:
1. Using boundary_clock_jbod has few issues which weren’t mentioned
earlier(see mail trail for the issues).
Also boundary_clock_jbod might not be right term to be used for Ordinary Clock
Client/Slave/Sub-ordinate modes.
Boundary Clock and Ordinary are two different clocks.
So to tackle the problems we have today, we have evaluated two approaches:
A) Rename existing boundary_clock_jbod to something more meaningful to
convey that its applicable for OC/BC modes(
Something like jbod_clock) and then define separate options for boundary
clock just like existing ClientOnly/Slave only
Options. Then fix existing issues we have today.
B) Define separate config option for Ordinary clock Slave/Client modes :
slave_clock_job/client_clock_jbod and handle the
multiple client port’s case.
We have evaluated both and decided to take 2nd approach to keep it separate,
clean and address the issues pertaining to each clock mode separately.
2. Below are the list of issues we have today for Boundary clock jbod with
clientOnly option
a. When the redundant port part of the clock bundle stops receiving
Announce packets, announce timeout occurs continuously and triggers BMCA which
affects the port which is already SLAVE
Example:
./ptp4l -f ~/config_ptp_8275_1.conf -i sriov0 -i eno2 2 -H -m
option slaveOnly is deprecated, please use clientOnly instead
ptp4l[627776.931]: selected /dev/ptp0 as PTP clock
ptp4l[627776.931]: port 2 (eno2): just a bunch of devices
ptp4l[627776.952]: port 1 (sriov0): INITIALIZING to LISTENING on INIT_COMPLETE
ptp4l[627776.972]: port 2 (eno2): INITIALIZING to LISTENING on INIT_COMPLETE
ptp4l[627776.972]: port 0 (/var/run/ptp4l): INITIALIZING to LISTENING on
INIT_COMPLETE
ptp4l[627776.972]: port 0 (/var/run/ptp4lro): INITIALIZING to LISTENING on
INIT_COMPLETE
ptp4l[627776.972]: port 1 (sriov0): received SYNC without timestamp
ptp4l[627777.036]: port 1 (sriov0): new foreign master c4b239.fffe.483fbf-80
ptp4l[627777.288]: selected best master clock 9c65ee.fffe.76e665
ptp4l[627777.288]: updating UTC offset to 37
ptp4l[627777.288]: port 1 (sriov0): LISTENING to UNCALIBRATED on RS_SLAVE
ptp4l[627777.444]: selected best master clock 9c65ee.fffe.76e665
ptp4l[627777.444]: updating UTC offset to 37
ptp4l[627777.926]: selected best master clock 9c65ee.fffe.76e665
ptp4l[627777.926]: updating UTC offset to 37
ptp4l[627778.263]: port 1 (sriov0): UNCALIBRATED to SLAVE on
MASTER_CLOCK_SELECTED
ptp4l[627778.328]: selected best master clock 9c65ee.fffe.76e665
ptp4l[627778.328]: updating UTC offset to 37
ptp4l[627778.328]: rms 7 max 14 freq -605 +/- 0 delay 616 +/- 2
ptp4l[627778.744]: selected best master clock 9c65ee.fffe.76e665
ptp4l[627778.744]: updating UTC offset to 37
ptp4l[627778.744]: clockcheck: clock jumped backward or running slower than
expected!
ptp4l[627778.744]: port 1 (sriov0): SLAVE to UNCALIBRATED on
SYNCHRONIZATION_FAULT
ptp4l[627778.888]: clockcheck: clock jumped forward or running faster than
expected!
ptp4l[627779.161]: selected best master clock 9c65ee.fffe.76e665
ptp4l[627779.161]: updating UTC offset to 37
ptp4l[627779.264]: clockcheck: clock jumped forward or running faster than
expected!
ptp4l[627779.335]: rms 5 max 11 freq -594 +/- 5 delay 614 +/- 1
ptp4l[627779.593]: selected best master clock 9c65ee.fffe.76e665
ptp4l[627779.593]: updating UTC offset to 37
ptp4l[627779.976]: selected best master clock 9c65ee.fffe.76e665
ptp4l[627779.976]: updating UTC offset to 37
b. As the other PTP redundant ports part of bundle are in LISTENING state,
BMCA will not be able to select best master when there is best clock carried in
the other ports (other than the port which is already locked). Please refer to
IEEE1588 section 9.2.4 where they mention the definition of LISTENING and
PASSIVE state interpretations.
Two tackle the above two problems, changes done are as follows
1. We have changed the state machine to move the port to PASSIVE state
when the new configuration parameter is active.
2. Stop announce timeouts on redundant ports.
3. Existing boundary_clock_jbod in BC mode was tested to ensure that there
are no other breakages with the proposed changes.
> 1. Your are changing the core state machines from IEEE 1588. We don't
> deviate from the standard, especially not from the critical foundation.
> If we do deviate, then only on minor points and only with a very
> strong reason. However, you have given no justification at all for
> this change.
According to section 9.2.4 table 27 in IEEE1588 2008
LISTENING state means that it is waiting for announce packets or waiting for
announce receipt timer to expire
PASSIVE state means that the port is receiving announce packets, but BMCA
determined that port to be in PASSIVE state and hence will not communicate.
For redundant ports the state is LISENING in existing implementation when the
port is receiving announce packets, instead of PASSIVE.
Thanks,
Amar B S
From: Richard Cochran<mailto:[email protected]>
Sent: 21 April 2021 22:36
To: Amar Subramanyam<mailto:[email protected]>
Cc:
[email protected]<mailto:[email protected]>
Subject: Re: [Linuxptp-devel] [PATCH] To support Ordinary
Clock-Subordinate/Slave just a bunch of devices(jbod) feature.
CAUTION: This email originated from outside of Altiostar. Do not click on links
or open attachments unless you recognize the sender and you are sure the
content is safe. You will never be asked to reset your Altiostar password via
email.
On Thu, Apr 15, 2021 at 11:16:00AM +0300, Amar Subramanyam via Linuxptp-devel
wrote:
> This change brings slave clock jbod feature which allows ptp4l to work as a
> Ordinary Subordinate/Slave clock using "just a bunch of devices" that are not
> synchronized to each other but a collection of clocks synchronized by an
> external
> source.The best master will be decided by BMCA among the collection of the
> clocks.
> This feature gets enabled by ptp4l config option: slave_clock_jbod and
> by default it is disabled.
This patch is unacceptable for two reasons...
> bmc.c | 4 ++++
> clock.c | 14 ++++++++++++++
> clock.h | 7 +++++++
> config.c | 1 +
> designated_fsm.c | 4 ++--
> designated_fsm.h | 6 ++++--
> fsm.c | 51 ++++++++++++++++++++++++++++++++++++++++++++++-----
1. Your are changing the core state machines from IEEE 1588. We don't
deviate from the standard, especially not from the critical foundation.
If we do deviate, then only on minor points and only with a very
strong reason. However, you have given no justification at all for
this change.
2. You hack your feature all over the place, like:
if (my_special_flag) { do_my_special_thing(); }
This a both red flag and a code smell. Changes must respect the
architecture. If the architecture needs changes, then you must
change it, step by step.
But you haven't even identified a problem. clientOnly and
boundary_clock_jbod work just fine together:
./ptp4l -m -q --clientOnly=1 --boundary_clock_jbod=1 -i eth6 -i eth4 -i eth3
ptp4l[94622.316]: selected /dev/ptp1 as PTP clock
ptp4l[94622.316]: port 2 (eth4): just a bunch of devices
ptp4l[94622.316]: port 3 (eth3): just a bunch of devices
ptp4l[94622.318]: port 1 (eth6): INITIALIZING to LISTENING on INIT_COMPLETE
ptp4l[94622.319]: port 2 (eth4): INITIALIZING to LISTENING on INIT_COMPLETE
ptp4l[94622.320]: port 3 (eth3): INITIALIZING to LISTENING on INIT_COMPLETE
ptp4l[94622.320]: port 0 (/var/run/ptp4l): INITIALIZING to LISTENING on
INIT_COMPLETE
ptp4l[94622.320]: port 0 (/var/run/ptp4lro): INITIALIZING to LISTENING on
INIT_COMPLETE
ptp4l[94624.185]: port 1 (eth6): new foreign master 00e00c.fffe.bce560-1
ptp4l[94628.224]: selected best master clock 00e00c.fffe.bce560
ptp4l[94628.224]: port 1 (eth6): LISTENING to UNCALIBRATED on RS_SLAVE
ptp4l[94628.825]: selected best master clock 00e00c.fffe.bce560
ptp4l[94629.136]: selected best master clock 00e00c.fffe.bce560
ptp4l[94629.767]: master offset 1619024566521062408 s0 freq +0 path delay
50273
ptp4l[94630.787]: master offset 1619024566520947488 s1 freq -112695 path delay
50273
ptp4l[94631.806]: master offset -5796 s2 freq -118491 path delay 50273
ptp4l[94631.806]: port 1 (eth6): UNCALIBRATED to SLAVE on MASTER_CLOCK_SELECTED
ptp4l[94632.826]: master offset 50923 s2 freq -63510 path delay -555
ptp4l[94633.846]: master offset 899 s2 freq -98258 path delay -555
ptp4l[94634.866]: master offset -15796 s2 freq -114683 path delay 1392
ptp4l[94635.885]: master offset -12462 s2 freq -116088 path delay 27
ptp4l[94636.058]: selected best master clock 00e00c.fffe.bce560
ptp4l[94636.130]: selected best master clock 00e00c.fffe.bce560
ptp4l[94636.905]: master offset -8424 s2 freq -115788 path delay -555
ptp4l[94637.925]: master offset -5263 s2 freq -115154 path delay -555
ptp4l[94638.945]: master offset -2474 s2 freq -113944 path delay -762
ptp4l[94639.965]: master offset -1157 s2 freq -113370 path delay -762
ptp4l[94640.984]: master offset -532 s2 freq -113092 path delay -658
ptp4l[94642.004]: master offset -7 s2 freq -112726 path delay -658
Thanks,
Richard
_______________________________________________
Linuxptp-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linuxptp-devel