|
| 1 | +// Module included in the following assemblies: |
| 2 | +// |
| 3 | +// * networking/ptp/configuring-ptp.adoc |
| 4 | + |
| 5 | +:_mod-docs-content-type: PROCEDURE |
| 6 | +[id="configuring-linuxptp-services-as-grandmaster-clock-dual-nic_{context}"] |
| 7 | += Configuring linuxptp services as a grandmaster clock for dual E810 Westport Channel NICs |
| 8 | + |
| 9 | +You can configure the `linuxptp` services (`ptp4l`, `phc2sys`, `ts2phc`) as grandmaster clock (T-GM) for dual E810 Westport Channel NICs by creating a `PtpConfig` custom resource (CR) that configures the host NICs. |
| 10 | + |
| 11 | +For distributed RAN (D-RAN) use cases, you can configure PTP for dual NICs as follows: |
| 12 | + |
| 13 | +* NIC one is synced to the global navigation satellite system (GNSS) time source. |
| 14 | +* NIC two is synced to the 1PPS timing output provided by NIC one. This configuration is provided by the PTP hardware plugin in the `PtpConfig` CR. |
| 15 | +
|
| 16 | +The dual NIC PTP T-GM configuration uses a single instance of `ptp4l` and one `ts2phc` process reporting two `ts2phc` instances, one for each NIC. |
| 17 | +The host system clock is synchronized from the NIC that is connected to the GNSS time source. |
| 18 | + |
| 19 | +[NOTE] |
| 20 | +==== |
| 21 | +Use the following example `PtpConfig` CR as the basis to configure `linuxptp` services as T-GM for dual Intel Westport Channel E810-XXVDA4T network interfaces. |
| 22 | +
|
| 23 | +To configure PTP fast events, set appropriate values for `ptp4lOpts`, `ptp4lConf`, and `ptpClockThreshold`. |
| 24 | +`ptpClockThreshold` is used only when events are enabled. |
| 25 | +See "Configuring the PTP fast event notifications publisher" for more information. |
| 26 | +==== |
| 27 | + |
| 28 | +.Prerequisites |
| 29 | + |
| 30 | +* For T-GM clocks in production environments, install two Intel E810 Westport Channel NICs in the bare-metal cluster host. |
| 31 | +
|
| 32 | +* Install the OpenShift CLI (`oc`). |
| 33 | +
|
| 34 | +* Log in as a user with `cluster-admin` privileges. |
| 35 | +
|
| 36 | +* Install the PTP Operator. |
| 37 | +
|
| 38 | +.Procedure |
| 39 | + |
| 40 | +. Create the `PtpConfig` CR. For example: |
| 41 | + |
| 42 | +.. Save the following YAML in the `grandmaster-clock-ptp-config-dual-nics.yaml` file: |
| 43 | ++ |
| 44 | +.PTP grandmaster clock configuration for dual E810 NICs |
| 45 | +[%collapsible] |
| 46 | +==== |
| 47 | +[source,yaml] |
| 48 | +---- |
| 49 | +include::snippets/ptp_PtpConfigDualCardGmWpc.yaml[] |
| 50 | +---- |
| 51 | +==== |
| 52 | ++ |
| 53 | +[NOTE] |
| 54 | +==== |
| 55 | +For E810 Westport Channel NICs, set the value for `ts2phc.nmea_serialport` to `/dev/gnss0`. |
| 56 | +==== |
| 57 | + |
| 58 | +.. Create the CR by running the following command: |
| 59 | ++ |
| 60 | +[source,terminal] |
| 61 | +---- |
| 62 | +$ oc create -f grandmaster-clock-ptp-config-dual-nics.yaml |
| 63 | +---- |
| 64 | + |
| 65 | +.Verification |
| 66 | + |
| 67 | +. Check that the `PtpConfig` profile is applied to the node. |
| 68 | + |
| 69 | +.. Get the list of pods in the `openshift-ptp` namespace by running the following command: |
| 70 | ++ |
| 71 | +[source,terminal] |
| 72 | +---- |
| 73 | +$ oc get pods -n openshift-ptp -o wide |
| 74 | +---- |
| 75 | ++ |
| 76 | +.Example output |
| 77 | +[source,terminal] |
| 78 | +---- |
| 79 | +NAME READY STATUS RESTARTS AGE IP NODE |
| 80 | +linuxptp-daemon-74m2g 3/3 Running 3 4d15h 10.16.230.7 compute-1.example.com |
| 81 | +ptp-operator-5f4f48d7c-x7zkf 1/1 Running 1 4d15h 10.128.1.145 compute-1.example.com |
| 82 | +---- |
| 83 | + |
| 84 | +.. Check that the profile is correct. Examine the logs of the `linuxptp` daemon that corresponds to the node you specified in the `PtpConfig` profile. |
| 85 | +Run the following command: |
| 86 | ++ |
| 87 | +[source,terminal] |
| 88 | +---- |
| 89 | +$ oc logs linuxptp-daemon-74m2g -n openshift-ptp -c linuxptp-daemon-container |
| 90 | +---- |
| 91 | ++ |
| 92 | +.Example output |
| 93 | +[source,terminal] |
| 94 | +---- |
| 95 | +ts2phc[509863.660]: [ts2phc.0.config] nmea delay: 347527248 ns |
| 96 | +ts2phc[509863.660]: [ts2phc.0.config] ens2f0 extts index 0 at 1705516553.000000000 corr 0 src 1705516553.652499081 diff 0 |
| 97 | +ts2phc[509863.660]: [ts2phc.0.config] ens2f0 master offset 0 s2 freq -0 |
| 98 | +I0117 18:35:16.000146 1633226 stats.go:57] state updated for ts2phc =s2 |
| 99 | +I0117 18:35:16.000163 1633226 event.go:417] dpll State s2, gnss State s2, tsphc state s2, gm state s2, |
| 100 | +ts2phc[1705516516]:[ts2phc.0.config] ens2f0 nmea_status 1 offset 0 s2 |
| 101 | +GM[1705516516]:[ts2phc.0.config] ens2f0 T-GM-STATUS s2 |
| 102 | +ts2phc[509863.677]: [ts2phc.0.config] ens7f0 extts index 0 at 1705516553.000000010 corr -10 src 1705516553.652499081 diff 0 |
| 103 | +ts2phc[509863.677]: [ts2phc.0.config] ens7f0 master offset 0 s2 freq -0 |
| 104 | +I0117 18:35:16.016597 1633226 stats.go:57] state updated for ts2phc =s2 |
| 105 | +phc2sys[509863.719]: [ptp4l.0.config] CLOCK_REALTIME phc offset -6 s2 freq +15441 delay 510 |
| 106 | +phc2sys[509863.782]: [ptp4l.0.config] CLOCK_REALTIME phc offset -7 s2 freq +15438 delay 502 |
| 107 | +---- |
0 commit comments