Am Montag, dem 24.04.2023 um 14:59 -0700 schrieb Richard Cochran: On Mon, Apr 24, 2023 at 10:45:56AM +0200, Stephan Wurm wrote:
@@ -210,6 +219,40 @@ enum port_state ptp_fsm(enum port_state state, enum fsm_event event, int mdiff) + case PS_PASSIVE_SLAVE: + switch (event) { + case EV_DESIGNATED_DISABLED: + next = PS_DISABLED; + break; + case EV_FAULT_DETECTED: + next = PS_FAULTY; + break; + case EV_ANNOUNCE_RECEIPT_TIMEOUT_EXPIRES: + next = PS_MASTER; + break; + case EV_SYNCHRONIZATION_FAULT: + next = PS_LISTENING; + break; + case EV_RS_MASTER: + next = PS_PRE_MASTER; + break; + case EV_RS_GRAND_MASTER: + next = PS_GRAND_MASTER; + break; + case EV_RS_PASSIVE: + next = PS_PASSIVE; + break; + case EV_RS_SLAVE: + next = PS_SLAVE; + break; You can't just add random states into the ieee 1588 state machine. It was not my intention, to add any random states, but I understand this conflicts with the IEEE 1588 standard. The port state PASSIVE_SLAVE is required for the core feature of doubly-attached clocks as described by specification IEC 62439-2:2016 Appendix A, which is an industrial standard accounting for high precision and high availability needs. It explicitly extends the IEEE 1588 state machine. Other standards in power automation are referencing this redundancy mechanism, e.g. the Power Profile v2 (IEEE C37.238-2017) or the Power Utility Profile (IEC 61850-9-3:2016). A doubly-attached clock in this context allows for redundant connection of a clock to a grandmaster clock via two independent interface ports. Provided, the same grandmaster is evaluated as best clock at both interfaces, one port synchronizes as SLAVE, while the other port remains passive (PASSIVE_SLAVE). Now the passive port can instantly step in, whenever the active port loses its synchronization (FAULTY). Do you see any chance to add this extension to linuxptp? Maybe only on demand, e.g. at compile time or activateable with a separate configuration option? Thanks, Richard Best regards Stephan
_______________________________________________ Linuxptp-devel mailing list Linuxptp-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxptp-devel