synce4l is a software implementation of Synchronous Ethernet (Sync-E)
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 Digital Phase Locked Loop (DPLL)
clock on Network Card Interface (NIC).

Application can operate in two mutually exclusive modes. If both modes
are configured simultaneously, the external input takes precedence over
internal one (internal is disabled implicitly).

External input mode
If synce4l is configured to run in "external input" mode, then DPLL
needs to have external 1PPS source attached (GPS or another generator).
In this scenario synce4l always broadcasts clock quality level (QL)
defined in configuration file. Additionally, for this mode
incoming Sync-E frames do not participate in best source selection
algorithm for DPLL.

Internal input mode
In "internal input" mode incoming Sync-E 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 DPLL. The recovered QL is broadcasted to all other interfaces
then. An external clock cannot be used in this mode.

Hardware
synce4l is not bound to any specific NIC hardware.

Theoretically any NIC could be used for enabling Sync-E 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 Sync-E 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 Internal 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 - clock is recovered from its RX path, then is fed
to other ports with Phase-Locked Loop (PLL) circuit powering clock of
other ports.
The NIC driver or dedicated software must provide a user with ability
to:

obtain current state of a DPLL used to syntonize the ports
select one of the ports as a candidate for clock recovery.
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 config knobs for SyncE
  synce4l: add synce in interface and util code
  synce4l: add esmc_socket interface
  synce4l: add synce_clock interface
  synce4l: add synce_dev interface
  synce4l: add synce_dev_ctrl interface
  synce4l: add synce_port interface
  synce4l: add synce_port_ctrl interface
  synce4l: add synce_msg interface
  synce4l: add synce_transport interface
  synce4l: add synce4l application

 README.org                |    2 +
 config.c                  |  198 +++++--
 config.h                  |    8 +
 configs/synce.cfg         |  194 +++++++
 esmc_socket.c             |  111 ++++
 esmc_socket.h             |   53 ++
 interface.c               |   29 +-
 interface.h               |   24 +
 makefile                  |   17 +-
 synce4l.8                 |  239 ++++++++
 synce4l.c                 |  144 +++++
 synce4l_README.md         |  194 +++++++
 synce_clock.c             |  296 ++++++++++
 synce_clock.h             |   52 ++
 synce_dev.c               |  634 ++++++++++++++++++++++
 synce_dev.h               |   76 +++
 synce_dev_ctrl.c          |  165 ++++++
 synce_dev_ctrl.h          |   76 +++
 synce_msg.c               |  271 ++++++++++
 synce_msg.h               |  186 +++++++
 synce_msg_private.h       |   99 ++++
 synce_port.c              |  504 +++++++++++++++++
 synce_port.h              |  197 +++++++
 synce_port_ctrl.c         | 1077 +++++++++++++++++++++++++++++++++++++
 synce_port_ctrl.h         |  177 ++++++
 synce_transport.c         |  116 ++++
 synce_transport.h         |   67 +++
 synce_transport_private.h |   30 ++
 util.c                    |   22 +
 util.h                    |    8 +
 30 files changed, 5216 insertions(+), 50 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.34.1



_______________________________________________
Linuxptp-devel mailing list
Linuxptp-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxptp-devel

Reply via email to