### Run pre-built container image with built-in config Source: https://github.com/xilinx-cns/sfptpd/blob/master/INSTALL.md One-line quick start example that runs a pre-built container image with a built-in example configuration, specifying a default interface and PTP domain on the command line. ```sh sudo docker run \ --network=host \ --cap-add NET_BIND_SERVICE,NET_ADMIN,NET_RAW,SYS_TIME \ $(for d in $(ls /dev/ptp*); do echo "--device $d"; done) \ ghcr.io/xilinx-cns/sfptpd:master-dev -f /config/ptp_master_freerun.cfg \ -i bond0 -D 100 ``` -------------------------------- ### Run sfptpd back-to-back PTP example Source: https://github.com/xilinx-cns/sfptpd/blob/master/README.md A simple back-to-back PTP example. On host A, run sfptpd as master using the provided configuration file. On host B, stop ntpd and chronyd services, then run sfptpd as slave. The daemon must normally be started as root. ```sh # On host A: sudo build/sfptpd -i eth1 -f config/ptp_master_freerun.cfg # On host B, first disabling ntpd and chronyd for simplicity: for i in ntp{,d} chrony{,d}; do sudo service $i stop 2>/dev/null; done sudo build/sfptpd -i eth1 -f config/ptp_slave.cfg ``` -------------------------------- ### Install sfptpd to /usr/local with sudo make install Source: https://github.com/xilinx-cns/sfptpd/blob/master/INSTALL.md Default installation command that installs sfptpd to /usr/local. Requires sudo privileges. ```sh sudo make install ``` -------------------------------- ### Install sfptpd to /usr with prefix override Source: https://github.com/xilinx-cns/sfptpd/blob/master/INSTALL.md Installs sfptpd to /usr by overriding the prefix variable. Requires sudo privileges. ```sh sudo make prefix=/usr install ``` -------------------------------- ### Install sfptpd into a container image staging directory Source: https://github.com/xilinx-cns/sfptpd/blob/master/INSTALL.md Installs sfptpd into a staging directory for container image creation, omitting init scripts. ```sh make DESTDIR=../staging INST_INITS= install ``` -------------------------------- ### Install sfptpd without Python 3 Source: https://github.com/xilinx-cns/sfptpd/blob/master/INSTALL.md Installs sfptpd to /usr while omitting the sfptpmon component, for systems without Python 3. ```sh sudo make prefix=/usr INST_OMIT=sfptpmon install ``` -------------------------------- ### Require hardware timestamping for PTP instance Source: https://github.com/xilinx-cns/sfptpd/blob/master/CHANGELOG.md Requires hardware timestamping for the PTP sync instance. The instance will refuse to start if the requirement cannot be met. ```ini [ptp1] timestamping hw ``` -------------------------------- ### New command line options for init system integration Source: https://github.com/xilinx-cns/sfptpd/blob/master/CHANGELOG.md New command line options for better init system integration. The --user option allows running as non-root with minimum required capabilities. --daemon and --no-daemon supersede the deprecated 'daemon' config file option. ```text --daemon supersedes now-deprecated 'daemon' config file option --no-daemon overrides now-deprecated 'daemon' config file option --version outputs version number --test-config tests configuration file --user USER[:GROUP] ``` -------------------------------- ### Run container image with local config via stdin Source: https://github.com/xilinx-cns/sfptpd/blob/master/INSTALL.md Runs the sfptpd container with host networking, required capabilities, and device mappings, feeding a local configuration via stdin. In production, map a configuration file instead. ```sh sudo docker run \ --network=host \ --cap-add NET_BIND_SERVICE,NET_ADMIN,NET_RAW,SYS_TIME \ $(for d in $(ls /dev/{ptp*,pps*}); do echo "--device $d"; done) \ -i sfptpd:latest \ -v -f - < config/default.cfg ``` -------------------------------- ### Build RPM for EL6 on EL7 build host Source: https://github.com/xilinx-cns/sfptpd/blob/master/INSTALL.md Builds a source RPM for EL6 by setting RPM_OSVER=el6. After building, invoke rpmbuild --rebuild on the generated el6.src.rpm. ```sh RPM_OSVER=el6 make build_srpm ``` -------------------------------- ### Configure PTP as PPS time-of-day source Source: https://github.com/xilinx-cns/sfptpd/blob/master/CHANGELOG.md Specifies a single sync instance (ptp1) as the PTP time-of-day source in a global PPS section. This allows PTP to be used as the PPS time-of-day source. ```ini [pps] time_of_day ptp1 ``` -------------------------------- ### Build source RPM with make build_srpm Source: https://github.com/xilinx-cns/sfptpd/blob/master/scripts/rpm/README.md Builds the sfptpd source RPM using the build system's default rpm macro for %{dist} to select the spec file. ```sh make build_srpm ``` -------------------------------- ### Build container image with make patch_version and docker build Source: https://github.com/xilinx-cns/sfptpd/blob/master/INSTALL.md Builds a container image by patching the version and building with Docker using the Containerfile. ```sh make patch_version docker build -f Containerfile . ``` -------------------------------- ### Configure crny sync module with instance Source: https://github.com/xilinx-cns/sfptpd/blob/master/CHANGELOG.md Configures the 'crny' sync module with an instance named 'crny1' to operate alongside chronyd. An implicit instance is created for backward compatibility with the 'ntp' module. ```ini [general] sync_module crny crny1 ``` -------------------------------- ### Enable non-Solarflare NIC support with non_solarflare_nics Source: https://github.com/xilinx-cns/sfptpd/blob/master/README.md Enable synchronization of non-Solarflare network adapters. By default, non-Solarflare adapters are not synchronized to avoid a potential limitation with some drivers. ```ini non_solarflare_nics on ``` -------------------------------- ### Enable PTP Enterprise Profile Source: https://github.com/xilinx-cns/sfptpd/blob/master/CHANGELOG.md Selects the draft PTP Enterprise Profile, which applies suitable defaults and configuration constraints. This option should appear before other options in the [ptp] section. ```ini [ptp] ptp_profile enterprise ``` -------------------------------- ### Configure phc_pps_methods for PPS inputs Source: https://github.com/xilinx-cns/sfptpd/blob/master/CHANGELOG.md Configures the preferred order of PPS input methods. The methods are tried in the order listed. ```ini [general] phc_pps_methods devpps devptp ``` -------------------------------- ### Add run_dir to sfptpd config for EL6 Source: https://github.com/xilinx-cns/sfptpd/blob/master/INSTALL.md Configuration snippet to add to the sfptpd config file when building for EL6, specifying the run directory. ```text run_dir /var/run/sfptpd ``` -------------------------------- ### Build Debian package with debuild Source: https://github.com/xilinx-cns/sfptpd/blob/master/INSTALL.md Builds a Debian package using debuild with options to ignore signing and clean build. ```sh debuild -i -us -uc -b ``` -------------------------------- ### Configure IPv6 PTP transport with link-local scope Source: https://github.com/xilinx-cns/sfptpd/blob/master/CHANGELOG.md Configures the IPv6/UDP PTP transport (annex E) with link-local scope. Both link-local and global scopes are supported. ```ini [ptp] transport ipv6 scope link-local ``` -------------------------------- ### Enable hardware timestamping with tstool Source: https://github.com/xilinx-cns/sfptpd/blob/master/INSTALL.md Command to enable hardware timestamping on an interface in the host namespace when using MACVLAN or IPVLAN networking. ```sh tstool interface set_ts ens1f0 on all ``` -------------------------------- ### Configure clustering discriminator for NTP Source: https://github.com/xilinx-cns/sfptpd/blob/master/CHANGELOG.md Enables the clustering discriminator feature, designating the NTP sync instance 'ntp1' as the discriminator between multiple active sync instances. The value 100000000 represents 100ms in nanoseconds, and 1 is the discriminator priority. This configuration excludes wildly divergent time sources from sync instance selection. ```ini [general] clustering discriminator ntp1 100000000 1 ``` -------------------------------- ### Configure phc_diff_methods for non-Xilinx NICs Source: https://github.com/xilinx-cns/sfptpd/blob/master/CHANGELOG.md Configures the preferred order of clock diff methods for non-Xilinx NICs. The methods are tried in the order listed. ```ini [general] phc_diff_methods sys-offset-precise pps sys-offset-ext sys-offset read-time ``` -------------------------------- ### Fetch real-time stats as JSON Lines via curl Source: https://github.com/xilinx-cns/sfptpd/blob/master/CHANGELOG.md Use this command to retrieve real-time stats in JSON Lines format from the OpenMetrics HTTP socket. The socket path is /run/sfptpd/metrics.sock and the endpoint is /rt-stats.jsonl. ```bash curl --unix-socket /run/sfptpd/metrics.sock http://_/rt-stats.jsonl ``` -------------------------------- ### SPDX license and copyright footer Source: https://github.com/xilinx-cns/sfptpd/blob/master/scripts/rpm/README.md Standard SPDX license identifier and copyright notice for the documentation. ```text SPDX-License-Identifier: BSD-3-Clause SPDX-FileCopyrightText: (c) Copyright 2024 Advanced Micro Devices, Inc. ``` -------------------------------- ### Ignore missing PTP subsystem and clock Source: https://github.com/xilinx-cns/sfptpd/blob/master/CHANGELOG.md Allows operation without a kernel PTP subsystem or PTP/PPS hardware clock. Intended for esoteric and diagnostic use cases; not recommended or supported in production. ```ini [general] ignore_critical no-ptp-subsystem no-ptp-clock ``` -------------------------------- ### Set trace level for bic component Source: https://github.com/xilinx-cns/sfptpd/blob/master/CHANGELOG.md Enables a separate trace component to help understand detailed reasons for changes in sync instance selection. Disable in normal use to avoid excessive logging. ```ini [general] trace_level bic 3 ``` -------------------------------- ### Override RPM_OSVER for RHEL 10 build Source: https://github.com/xilinx-cns/sfptpd/blob/master/scripts/rpm/README.md Overrides the default OS version to el9 when building on and for RHEL 10, which does not yet have a distinct spec file. ```sh RPM_OSVER=el9 make build_srpm ``` -------------------------------- ### Set chrony control script Source: https://github.com/xilinx-cns/sfptpd/blob/master/CHANGELOG.md Sets a user-defined script to reconfigure and restart chronyd as a workaround for the lack of a 'clock control' facility in chronyd. Provides parity with ntpd use cases. ```ini [crny] control_script /usr/share/doc/sfptpd/examples/chrony_clockcontrol.py ``` -------------------------------- ### Ignore critical clock-control-conflict Source: https://github.com/xilinx-cns/sfptpd/blob/master/CHANGELOG.md Disables the startup check for an uncontrollable chronyd service, allowing operation but blocking system clock updates when a conflict occurs. Recommended to configure the system clock as read-only in such situations. ```ini [general] ignore_critical clock-control-conflict ``` -------------------------------- ### Set PTP protocol version to 2.1 Source: https://github.com/xilinx-cns/sfptpd/blob/master/CHANGELOG.md Sets the PTP protocol version to 2.1 (IEEE1588-2019 revision). This is required to use new features such as the COMMUNICATION_CAPABILITIES TLV, ensuring interoperability with intolerant peer devices. ```ini [ptp] ptp_version 2.1 ``` -------------------------------- ### Disable assume_one_phc_per_nic Source: https://github.com/xilinx-cns/sfptpd/blob/master/CHANGELOG.md Disables the default assumption that multiple PHC devices on the same PCI device represent the same clock. Note that this may not be the most effective workaround for non-Solarflare interfaces; consider an explicit clock_list instead. ```ini [general] assume_one_phc_per_nic off ``` -------------------------------- ### Limit maximum NIC clock skew adjustment Source: https://github.com/xilinx-cns/sfptpd/blob/master/CHANGELOG.md Limits the maximum NIC clock skew adjustment to 50000000 ppb, which may be less than the NIC's advertised capabilities. ```ini [general] limit_freq_adj 50000000 ``` -------------------------------- ### Merge spec file changes from el9 to el8 Source: https://github.com/xilinx-cns/sfptpd/blob/master/scripts/rpm/README.md Merges changes from the el9 spec file into the el8 directory using git diff and patch with the --merge option. Use --dry-run to preview changes. ```sh cd scripts/rpm/el8 git diff -- ../el9/sfptpd.spec | patch -u --merge ``` -------------------------------- ### Disable implicit crny sync instance Source: https://github.com/xilinx-cns/sfptpd/blob/master/CHANGELOG.md Disables the implicit sync instance for the 'crny' module by specifying no instances, simplifying logging and diagnostics. ```ini [general] sync_module crny ```