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 is facilitated by the UDS. Note: We are currently working towards Avnu test compliance for this feature. Summary: * CMLDS is enabled and accessed by ptp4l instances through settings in their respective config files. * A per-port 'run_cmlds' setting 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' setting assigns a CMLDS Link Port portNumber that is used to identify a CMLDS Link Port. * A global 'cmlds_clockIdentity' setting 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. * A per-port 'cmlds_uds_address' setting in PTP Ports (which query the CMLDS) is used to specify the 'uds_address' of the ptp4l instance that exposes the CMLDS Link Port. 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. #TODO: * Document the new configuration options in ptp4l.8. Andrew Zaborowski (1): Implement the COMMON_P2P delay mechanism Kishen Maloor (7): 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 clock.c | 11 +- clock.h | 6 + config.c | 5 + 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 | 363 ++++++++++++++++++++++++++++++++++-- port.h | 8 + port_private.h | 8 + tlv.c | 18 ++ tlv.h | 11 ++ unicast_client.c | 10 +- 15 files changed, 508 insertions(+), 20 deletions(-) create mode 100644 configs/gPTP-cmlds.cfg create mode 100644 configs/gPTP-common-p2p.cfg base-commit: c4117705a96d1eaa89ac224559f217909dd6d882 -- 2.31.1 _______________________________________________ Linuxptp-devel mailing list Linuxptp-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxptp-devel