1
0
mirror of https://github.com/openshift/openshift-docs.git synced 2026-02-05 12:46:18 +01:00
Files
openshift-docs/modules/nw-ptp-configuring-linuxptp-services-as-grandmaster-clock-three-nic.adoc
2025-04-22 08:25:48 +00:00

107 lines
3.9 KiB
Plaintext

// Module included in the following assemblies:
//
// * networking/ptp/configuring-ptp.adoc
:_mod-docs-content-type: PROCEDURE
[id="configuring-linuxptp-services-as-grandmaster-clock-three-nic_{context}"]
= Configuring linuxptp services as a grandmaster clock for 3 E810 NICs
You can configure the `linuxptp` services (`ptp4l`, `phc2sys`, `ts2phc`) as a grandmaster clock (T-GM) for 3 E810 NICs by creating a `PtpConfig` custom resource (CR) that configures the NICs.
You can configure the `linuxptp` services as a T-GM with 3 NICs for the following E810 NICs:
* Intel E810-XXVDA4T Westport Channel NIC
* Intel E810-CQDA2T Logan Beach NIC
For distributed RAN (D-RAN) use cases, you can configure PTP for 3 NICs as follows:
* NIC 1 is synced to the Global Navigation Satellite System (GNSS)
* NICs 2 and 3 are synced to NIC 1 with 1PPS faceplate connections
Use the following example `PtpConfig` CRs as the basis to configure `linuxptp` services as a 3-card Intel E810 T-GM.
.Prerequisites
* For T-GM clocks in production environments, install 3 Intel E810 NICs in the bare-metal cluster host.
* Install the OpenShift CLI (`oc`).
* Log in as a user with `cluster-admin` privileges.
* Install the PTP Operator.
.Procedure
. Create the `PtpConfig` CR. For example:
.. Save the following YAML in the `three-nic-grandmaster-clock-ptp-config.yaml` file:
+
.PTP grandmaster clock configuration for 3 E810 NICs
[%collapsible]
====
[source,yaml]
----
include::snippets/ptp_PtpConfigThreeCardGmWpc.yaml[]
----
====
+
[NOTE]
====
Set the value for `ts2phc.nmea_serialport` to `/dev/gnss0`.
====
.. Create the CR by running the following command:
+
[source,terminal]
----
$ oc create -f three-nic-grandmaster-clock-ptp-config.yaml
----
.Verification
. Check that the `PtpConfig` profile is applied to the node.
.. Get the list of pods in the `openshift-ptp` namespace by running the following command:
+
[source,terminal]
----
$ oc get pods -n openshift-ptp -o wide
----
+
.Example output
[source,terminal]
----
NAME READY STATUS RESTARTS AGE IP NODE
linuxptp-daemon-74m3q 3/3 Running 3 4d15h 10.16.230.7 compute-1.example.com
ptp-operator-5f4f48d7c-x6zkn 1/1 Running 1 4d15h 10.128.1.145 compute-1.example.com
----
.. Check that the profile is correct. Run the following command, and examine the logs of the `linuxptp` daemon that corresponds to the node you specified in the `PtpConfig` profile:
+
[source,terminal]
----
$ oc logs linuxptp-daemon-74m3q -n openshift-ptp -c linuxptp-daemon-container
----
+
.Example output
[source,terminal]
----
ts2phc[2527.586]: [ts2phc.0.config:7] adding tstamp 1742826342.000000000 to clock /dev/ptp11 <1>
ts2phc[2527.586]: [ts2phc.0.config:7] adding tstamp 1742826342.000000000 to clock /dev/ptp7 <1>
ts2phc[2527.586]: [ts2phc.0.config:7] adding tstamp 1742826342.000000000 to clock /dev/ptp14 <1>
ts2phc[2527.586]: [ts2phc.0.config:7] nmea delay: 56308811 ns
ts2phc[2527.586]: [ts2phc.0.config:6] /dev/ptp14 offset 0 s2 freq +0 <2>
ts2phc[2527.587]: [ts2phc.0.config:6] /dev/ptp7 offset 0 s2 freq +0 <2>
ts2phc[2527.587]: [ts2phc.0.config:6] /dev/ptp11 offset 0 s2 freq -0 <2>
I0324 14:25:05.000439 106907 stats.go:61] state updated for ts2phc =s2
I0324 14:25:05.000504 106907 event.go:419] dpll State s2, gnss State s2, tsphc state s2, gm state s2,
I0324 14:25:05.000906 106907 stats.go:61] state updated for ts2phc =s2
I0324 14:25:05.001059 106907 stats.go:61] state updated for ts2phc =s2
ts2phc[1742826305]:[ts2phc.0.config] ens4f0 nmea_status 1 offset 0 s2
GM[1742826305]:[ts2phc.0.config] ens4f0 T-GM-STATUS s2 <3>
----
<1> `ts2phc` is updating the PTP hardware clock.
<2> Estimated PTP device offset between PTP device and the reference clock is 0 nanoseconds.
The PTP device is in sync with the leader clock.
<3> T-GM is in a locked state (s2).