This patch series presents a functional implementation of the
Common Mean Link Delay Service (CMLDS).

CMLDS is optional in IEEE 1588-2019/clause 16.6, and mandatory in
the IEEE 802.1AS-2020 PTP Profile/clause 11.2.17 for time-aware systems
that implement multiple domains. Accordingly, this implementation draws
upon both standards documents.

A gPTP domain 0 ptp4l instance may be configured to expose CMLDS over one
or more links and queried by other gPTP domains (ptp4l instances) on its
node to retrieve link delay measurements using the COMMON_P2P delay mechanism.
Communications between the ptp4l instances for this query/response occurs over
the UDS.

Summary:

* CMLDS is enabled and accessed by ptp4l instances through settings in
their respective config files.

* A per-port 'run_cmlds' option exposes CMLDS on a Link Port in a ptp4l
instance which consequently executes CMLDS Pdelay transactions using
transportSpecific/majorSdoId of 0x2 and domainNumber=0 over its link.
The PTP Port continues to respond to PdelayReqs in its domain.

* A per-port 'cmlds_portNumber' option assigns a CMLDS Link Port portNumber
that is used to identify a CMLDS Link Port.

* A global 'cmlds_clockIdentity' option assigns a unique clockIdentity
for CMLDS in ptp4l instances with one or more CMLDS Link Ports.

* A new management TLV: MID_CMLDS_INFO_NP for CMLDS Link Ports to convey
link delay measurements to requesting PTP Ports over the UDS.

* A per-port 'cmlds_uds_address' option in PTP Ports (which query the
CMLDS) is used to specify the 'uds_address' of the ptp4l instance that
exposes the target CMLDS Link Port.

* The user is expected to appropriately configure the time-aware system with
CMLDS to functional and standards compliance: CMLDS is enabled only once per
physical port, CMLDS is exposed in gPTP domain 0 ptp4l instances, unique vclock
assignments, domain and CMLDS clockIdentities, and uds_address for all
ptp4l instances.

You may test as below on two PTP nodes (1, 2):
* Bring up two ptp4l instances on node 1 (with 2 vclocks):
  * gPTP-cmlds.cfg configures a ptp4l instance for gPTP domain 0 with a
    single CMLDS Link Port.
  * gPTP-common-p2p.cfg configures a ptp4l instance for gPTP domain 1 with
    a single PTP Port that queries the CMLDS and uses the COMMON_P2P delay
    mechanism.
  * Specify the correct interface name and 'phc_index' (to the vclocks) in
    the config files.
* Bring up two ptp4l instances as above on node 2.
  * In addition to the interface name and 'phc_index', modify
    'cmlds_clockIdentity' in gPTP-cmlds.cfg, and 'clockIdentity' in
    gPTP-common-p2p.cfg so that they are distinct from node 1's
    configuration.

Patches 1-8 comprise the CMLDS implementation summarized above.

Patch 9 is an independent change to make 'allowedLostResponses'
a configurable parameter. This was to meet a general 802.1AS-2020
conformance requirement.

---
v2:
* Minor canges for Avnu test conformance.
* Addressed v1 review comments received from Erez.
* Documented newly added config file options in ptp4l.8.

Andrew Zaborowski (1):
  Implement the COMMON_P2P delay mechanism

Kishen Maloor (8):
  Add new TLV for CommonMeanLinkDelayInformation
  Add configuration options for CMLDS
  Add DM_COMMON_P2P
  Update the PdelayReq/Res flows for CMLDS Link Ports
  Add port_cmlds_ignore()
  Add plumbing for interacting with the CMLDS
  Sample config files for testing CMLDS
  Make allowedLostResponses configurable

 clock.c                     |  11 +-
 clock.h                     |   6 +
 config.c                    |   6 +
 configs/gPTP-cmlds.cfg      |  34 ++++
 configs/gPTP-common-p2p.cfg |  35 ++++
 dm.h                        |   3 +
 msg.h                       |   2 +
 pmc.c                       |  13 ++
 pmc_common.c                |   1 +
 port.c                      | 372 ++++++++++++++++++++++++++++++++++--
 port.h                      |   8 +
 port_private.h              |   9 +
 ptp4l.8                     |  28 +++
 tlv.c                       |  18 ++
 tlv.h                       |  11 ++
 unicast_client.c            |  10 +-
 16 files changed, 542 insertions(+), 25 deletions(-)
 create mode 100644 configs/gPTP-cmlds.cfg
 create mode 100644 configs/gPTP-common-p2p.cfg

--
2.31.1


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

Reply via email to