|
| 1 | +// Module included in the following assemblies: |
| 2 | +// |
| 3 | +// * networking/using-ptp.adoc |
| 4 | + |
| 5 | +:_content-type: PROCEDURE |
| 6 | +[id="cnf-configuring-cvl-nic-as-ptp-slave_{context}"] |
| 7 | += Configuring linuxptp services as an ordinary clock for Intel Columbiaville NIC |
| 8 | + |
| 9 | +You can configure `linuxptp` services as a single ordinary clock for nodes with an Intel 800-Series Columbiaville NIC installed. |
| 10 | + |
| 11 | +[NOTE] |
| 12 | +==== |
| 13 | +The following `PtpConfig` CR also configures PTP fast events by setting values for `ptp4lOpts`, `ptp4lConf` and `ptpClockThreshold`. |
| 14 | +==== |
| 15 | + |
| 16 | +.Prerequisites |
| 17 | + |
| 18 | +* Install one or more Intel 800-Series Columbiaville NICs in your cluster bare-metal hosts. |
| 19 | +* Install the OpenShift CLI (`oc`). |
| 20 | +* Log in as a user with `cluster-admin` privileges. |
| 21 | +
|
| 22 | +.Procedure |
| 23 | + |
| 24 | +. Create the `PtpConfig` CR for nodes with matching role. |
| 25 | + |
| 26 | +.. Save the following YAML in the `cvl-ptp-ordinary-clock.yaml` file: |
| 27 | ++ |
| 28 | +[source,yaml] |
| 29 | +---- |
| 30 | +apiVersion: ptp.openshift.io/v1 |
| 31 | +kind: PtpConfig |
| 32 | +metadata: |
| 33 | + name: slave |
| 34 | + namespace: openshift-ptp |
| 35 | +spec: |
| 36 | + profile: |
| 37 | + - name: "slave" |
| 38 | + interface: <interface_name> <1> |
| 39 | + ptp4lOpts: "-2 --summary_interval -4" <2> |
| 40 | + phc2sysOpts: "-a -r -m -n 24 -N 8 -R 16" |
| 41 | + ptpSchedulingPolicy: "SCHED_FIFO" <3> |
| 42 | + ptpSchedulingPriority: 65 <4> |
| 43 | + ptp4lConf: | |
| 44 | + [global] |
| 45 | + # |
| 46 | + # Default Data Set |
| 47 | + # |
| 48 | + twoStepFlag 1 |
| 49 | + slaveOnly 0 |
| 50 | + priority1 128 |
| 51 | + priority2 128 |
| 52 | + domainNumber 24 |
| 53 | + #utc_offset 37 |
| 54 | + clockClass 248 |
| 55 | + clockAccuracy 0xFE |
| 56 | + offsetScaledLogVariance 0xFFFF |
| 57 | + free_running 0 |
| 58 | + freq_est_interval 1 |
| 59 | + dscp_event 0 |
| 60 | + dscp_general 0 |
| 61 | + dataset_comparison ieee1588 |
| 62 | + G.8275.defaultDS.localPriority 128 |
| 63 | + # |
| 64 | + # Port Data Set |
| 65 | + # |
| 66 | + logAnnounceInterval -3 |
| 67 | + logSyncInterval -4 |
| 68 | + logMinDelayReqInterval -4 |
| 69 | + logMinPdelayReqInterval -4 |
| 70 | + announceReceiptTimeout 3 |
| 71 | + syncReceiptTimeout 0 |
| 72 | + delayAsymmetry 0 |
| 73 | + fault_reset_interval -128 |
| 74 | + neighborPropDelayThresh 20000000 |
| 75 | + masterOnly 0 |
| 76 | + G.8275.portDS.localPriority 128 |
| 77 | + # |
| 78 | + # Run time options |
| 79 | + # |
| 80 | + assume_two_step 0 |
| 81 | + logging_level 6 |
| 82 | + path_trace_enabled 0 |
| 83 | + follow_up_info 0 |
| 84 | + hybrid_e2e 0 |
| 85 | + inhibit_multicast_service 0 |
| 86 | + net_sync_monitor 0 |
| 87 | + tc_spanning_tree 0 |
| 88 | + tx_timestamp_timeout 10 |
| 89 | + unicast_listen 0 |
| 90 | + unicast_master_table 0 |
| 91 | + unicast_req_duration 3600 |
| 92 | + use_syslog 1 |
| 93 | + verbose 0 |
| 94 | + summary_interval 0 |
| 95 | + kernel_leap 1 |
| 96 | + check_fup_sync 0 |
| 97 | + # |
| 98 | + # Servo Options |
| 99 | + # |
| 100 | + pi_proportional_const 0.0 |
| 101 | + pi_integral_const 0.0 |
| 102 | + pi_proportional_scale 0.0 |
| 103 | + pi_proportional_exponent -0.3 |
| 104 | + pi_proportional_norm_max 0.7 |
| 105 | + pi_integral_scale 0.0 |
| 106 | + pi_integral_exponent 0.4 |
| 107 | + pi_integral_norm_max 0.3 |
| 108 | + step_threshold 0.0 |
| 109 | + first_step_threshold 0.00002 |
| 110 | + max_frequency 900000000 |
| 111 | + clock_servo pi |
| 112 | + sanity_freq_limit 200000000 |
| 113 | + ntpshm_segment 0 |
| 114 | + # |
| 115 | + # Transport options |
| 116 | + # |
| 117 | + transportSpecific 0x0 |
| 118 | + ptp_dst_mac 01:1B:19:00:00:00 |
| 119 | + p2p_dst_mac 01:80:C2:00:00:0E |
| 120 | + udp_ttl 1 |
| 121 | + udp6_scope 0x0E |
| 122 | + uds_address /var/run/ptp4l |
| 123 | + # |
| 124 | + # Default interface options |
| 125 | + # |
| 126 | + clock_type OC |
| 127 | + network_transport UDPv4 |
| 128 | + delay_mechanism E2E |
| 129 | + time_stamping hardware |
| 130 | + tsproc_mode filter |
| 131 | + delay_filter moving_median |
| 132 | + delay_filter_length 10 |
| 133 | + egressLatency 0 |
| 134 | + ingressLatency 0 |
| 135 | + boundary_clock_jbod 0 |
| 136 | + # |
| 137 | + # Clock description |
| 138 | + # |
| 139 | + productDescription ;; |
| 140 | + revisionData ;; |
| 141 | + manufacturerIdentity 00:00:00 |
| 142 | + userDescription ; |
| 143 | + timeSource 0xA0 |
| 144 | + ptpClockThreshold: <6> |
| 145 | + holdOverTimeout: 5 |
| 146 | + maxOffsetThreshold: 100 |
| 147 | + minOffsetThreshold: -100 |
| 148 | + recommend: |
| 149 | + - profile: "slave" |
| 150 | + priority: 4 |
| 151 | + match: |
| 152 | + - nodeLabel: "node-role.kubernetes.io/<mcp-role>" <5> |
| 153 | +---- |
| 154 | +<1> Name of the network interface that connects to the upstream PTP leader clock, for example, `ens787f1`. |
| 155 | +<2> Set `--summary_interval` to `-4` to use PTP fast events. |
| 156 | +<3> Scheduling policy for `ptp4l` and `phc2sys` processes. Default value is `SCHED_OTHER`. Use `SCHED_FIFO` on systems that support FIFO scheduling. |
| 157 | +<4> Integer value from 1-65 used to set FIFO priority for `ptp4l` and `phc2sys` processes. Required if `SCHED_FIFO` is set for `ptpSchedulingPolicy`. |
| 158 | +<5> `MachineConfig` node role that corresponds to the cluster nodes where the Columbiaville NICs are installed, for example, `worker-cnf`. |
| 159 | +<6> Optional. If `ptpClockThreshold` stanza is not present, default values are used for `ptpClockThreshold` fields. Stanza shows default `ptpClockThreshold` values. |
| 160 | + |
| 161 | +.. Create the `PtpConfig` CR: |
| 162 | ++ |
| 163 | +[source,terminal] |
| 164 | +---- |
| 165 | +$ oc create -f cvl-ptp-ordinary-clock.yaml |
| 166 | +---- |
| 167 | + |
| 168 | +.Verification steps |
| 169 | + |
| 170 | +. Check that the `PtpConfig` profile is applied to the node. |
| 171 | + |
| 172 | +.. Get the list of pods in the `openshift-ptp` namespace by running the following command: |
| 173 | ++ |
| 174 | +[source,terminal] |
| 175 | +---- |
| 176 | +$ oc get pods -n openshift-ptp -o wide |
| 177 | +---- |
| 178 | ++ |
| 179 | +.Example output |
| 180 | +[source,terminal] |
| 181 | +---- |
| 182 | +NAME READY STATUS RESTARTS AGE IP NODE |
| 183 | +linuxptp-daemon-4xkbb 1/1 Running 0 43m 10.1.196.24 compute-0.example.com |
| 184 | +linuxptp-daemon-tdspf 1/1 Running 0 43m 10.1.196.25 compute-1.example.com |
| 185 | +ptp-operator-657bbb64c8-2f8sj 1/1 Running 0 43m 10.129.0.61 control-plane-1.example.com |
| 186 | +---- |
| 187 | + |
| 188 | +.. Check that the profile is correct. Examine the logs of the `linuxptp` daemon that corresponds to the node you specified in the `PtpConfig` profile. Run the following command: |
| 189 | ++ |
| 190 | +[source,terminal] |
| 191 | +---- |
| 192 | +$ oc logs linuxptp-daemon-4xkbb -n openshift-ptp |
| 193 | +---- |
| 194 | ++ |
| 195 | +.Example output |
| 196 | +[source,terminal] |
| 197 | +---- |
| 198 | +I1115 09:41:17.117596 4143292 daemon.go:107] in applyNodePTPProfile |
| 199 | +I1115 09:41:17.117604 4143292 daemon.go:109] updating NodePTPProfile to: |
| 200 | +I1115 09:41:17.117607 4143292 daemon.go:110] ------------------------------------ |
| 201 | +I1115 09:41:17.117612 4143292 daemon.go:102] Profile Name: profile1 |
| 202 | +I1115 09:41:17.117616 4143292 daemon.go:102] Interface: ens787f1 |
| 203 | +I1115 09:41:17.117620 4143292 daemon.go:102] Ptp4lOpts: -2 -s --summary_interval -4 |
| 204 | +I1115 09:41:17.117623 4143292 daemon.go:102] Phc2sysOpts: -a -r -n 24 |
| 205 | +I1115 09:41:17.117626 4143292 daemon.go:116] ------------------------------------ |
| 206 | +---- |
0 commit comments