synce4l is a software implementation of Synchronous Ethernet (SyncE) according to ITU-T Recommendation G.8264. The design goal is to provide logic to supported hardware by processing Ethernet Synchronization Messaging Channel (ESMC) and control Ethernet Equipment Clock (EEC) on Network Card Interface (NIC).
Application can operate in two input modes: line or external. External input mode If `synce4l` is configured to run in external input mode then EEC needs to have external 1PPS source attached (GPS or other generator). In this scenario `synce4l` always broadcasts clock quality level (QL) defined in configuration file. Additionally, for external input mode incoming SyncE frames do not participate in best source selection algorithm for EEC. Line input mode In line input mode incoming SyncE frames are processed and best clock source is extracted from the link having the best quality level. `synce4l` configures such "best quality" port as a source to recover clock for EEC. The recovered QL is broadcasted to all other interfaces then. An external clock source cannot be used in this mode. Hardware synce4l is not bound to any specific NIC hardware. Theoretically any NIC could be used for enabling SyncE device in External input mode - the NIC in this mode is in leader role (similar to Grand Master role in PTP), providing its Quality Level information in ESMC frames to its neighbors. It will not syntonize to any of its neighbor ports, since RX frames are not monitored. Only other SyncE enabled neighbor ports could recover clock from that peer and syntonize to it. Practically this mode shall be used only if the NIC PHY ports are fed with stable and reliable frequency clock, Quality Level values that are sent to the peers are configured by the user. This is user responsibility to decide and set proper Quality-Level value for the device, corresponding to the quality of frequency clock generator of used hardware. When enabling line input mode, the NIC must be a device that actually supports Synchronous Ethernet, which means it is able to syntonize frequency of all configured ports within the device to one chosen port. The NIC driver or dedicated software must provide a user with ability to: - obtain current state of a EEC used to syntonize the ports, - select one of the ports as a candidate for clock recovery, - disable other ports previously set as recovery sources. Both abilities are configurable in config file - the user must provide a shell commands - as explained in manual and descriptions inside of example config file. Arkadiusz Kubalewski (11): synce4l: add synce_msg interface synce4l: add esmc_socket interface synce4l: add synce_transport interface synce4l: add synce in interface and util code synce4l: add synce_port_ctrl interface synce4l: add synce_port interface synce4l: add synce_dev_ctrl interface synce4l: add synce_dev interface synce4l: add config knobs for SyncE synce4l: add synce_clock interface synce4l: add synce4l application .gitignore | 1 + README.org | 2 + config.c | 195 +++++-- config.h | 8 + configs/synce.cfg | 175 +++++++ esmc_socket.c | 99 ++++ esmc_socket.h | 42 ++ interface.c | 29 +- interface.h | 24 + makefile | 9 +- synce4l.8 | 222 ++++++++ synce4l.c | 132 +++++ synce4l_README.md | 202 ++++++++ synce_clock.c | 284 +++++++++++ synce_clock.h | 39 ++ synce_dev.c | 624 +++++++++++++++++++++++ synce_dev.h | 64 +++ synce_dev_ctrl.c | 153 ++++++ synce_dev_ctrl.h | 64 +++ synce_msg.c | 261 ++++++++++ synce_msg.h | 174 +++++++ synce_msg_private.h | 87 ++++ synce_port.c | 471 +++++++++++++++++ synce_port.h | 174 +++++++ synce_port_ctrl.c | 1230 +++++++++++++++++++++++++++++++++++++++++++++ synce_port_ctrl.h | 165 ++++++ synce_transport.c | 102 ++++ synce_transport.h | 55 ++ synce_transport_private.h | 18 + util.c | 22 + util.h | 8 + 31 files changed, 5089 insertions(+), 46 deletions(-) create mode 100644 configs/synce.cfg create mode 100644 esmc_socket.c create mode 100644 esmc_socket.h create mode 100644 synce4l.8 create mode 100644 synce4l.c create mode 100644 synce4l_README.md create mode 100644 synce_clock.c create mode 100644 synce_clock.h create mode 100644 synce_dev.c create mode 100644 synce_dev.h create mode 100644 synce_dev_ctrl.c create mode 100644 synce_dev_ctrl.h create mode 100644 synce_msg.c create mode 100644 synce_msg.h create mode 100644 synce_msg_private.h create mode 100644 synce_port.c create mode 100644 synce_port.h create mode 100644 synce_port_ctrl.c create mode 100644 synce_port_ctrl.h create mode 100644 synce_transport.c create mode 100644 synce_transport.h create mode 100644 synce_transport_private.h -- 2.9.5 base-commit: 58c7f9dfcdb55ee3d7616f19dc5fc3cf4da76449 _______________________________________________ Linuxptp-devel mailing list Linuxptp-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxptp-devel