|
| 1 | +// Module included in the following assemblies: |
| 2 | +// |
| 3 | +// * networking/using-ptp.adoc |
| 4 | + |
| 5 | +:_content-type: REFERENCE |
| 6 | +[id="nw-ptp-grandmaster-clock-configuration-reference_{context}"] |
| 7 | += Grandmaster clock PtpConfig configuration reference |
| 8 | + |
| 9 | +The following reference information describes the configuration options for the `PtpConfig` custom resource (CR) that configures the `linuxptp` services (`ptp4l`, `phc2sys`, `ts2phc`) as grandmaster clock. |
| 10 | + |
| 11 | +.PtpConfig configuration options for PTP Grandmaster clock |
| 12 | +[cols="1,3" options="header"] |
| 13 | +|==== |
| 14 | +|PtpConfig CR field |
| 15 | +|Description |
| 16 | + |
| 17 | +|`plugins` |
| 18 | +|Specify an array of `.exec.cmdline` options that configure the NIC for grandmaster clock operation. Grandmaster clock configuration requires certain PTP pins to be disabled. |
| 19 | + |
| 20 | +The plugin mechanism allows the PTP Operator to do automated hardware configuration. |
| 21 | +For the Intel Westport Channel NIC, when `enableDefaultConfig` is true, The PTP Operator runs a hard-coded script to do the required configuration for the NIC. |
| 22 | + |
| 23 | +|`ptp4lOpts` |
| 24 | +|Specify system configuration options for the `ptp4l` service. |
| 25 | +The options should not include the network interface name `-i <interface>` and service config file `-f /etc/ptp4l.conf` because the network interface name and the service config file are automatically appended. |
| 26 | + |
| 27 | +|`ptp4lConf` |
| 28 | +|Specify the required configuration to start `ptp4l` as grandmaster clock. |
| 29 | +For example, the `ens2f1` interface synchronizes downstream connected devices. |
| 30 | +For grandmaster clocks, set `clockClass` to `6` and set `clockAccuracy` to `0x27`. |
| 31 | +Set `timeSource` to `0x20` for when receiving the timing signal from a Global navigation satellite system (GNSS). |
| 32 | + |
| 33 | +|`tx_timestamp_timeout` |
| 34 | +|Specify the maximum amount of time to wait for the transmit (TX) timestamp from the sender before discarding the data. |
| 35 | + |
| 36 | +|`boundary_clock_jbod` |
| 37 | +|Specify the JBOD boundary clock time delay value. |
| 38 | +This value is used to correct the time values that are passed between the network time devices. |
| 39 | + |
| 40 | +|`phc2sysOpts` |
| 41 | +a|Specify system config options for the `phc2sys` service. |
| 42 | +If this field is empty the PTP Operator does not start the `phc2sys` service. |
| 43 | +[NOTE] |
| 44 | +==== |
| 45 | +Ensure that the network interface listed here is configured as grandmaster and is referenced as required in the `ts2phcConf` and `ptp4lConf` fields. |
| 46 | +==== |
| 47 | + |
| 48 | +|`ptpSchedulingPolicy` |
| 49 | +|Configure the scheduling policy for `ptp4l` and `phc2sys` processes. |
| 50 | +Default value is `SCHED_OTHER`. |
| 51 | +Use `SCHED_FIFO` on systems that support FIFO scheduling. |
| 52 | + |
| 53 | +|`ptpSchedulingPriority` |
| 54 | +|Set an integer value from 1-65 to configure FIFO priority for `ptp4l` and `phc2sys` processes when `ptpSchedulingPolicy` is set to `SCHED_FIFO`. |
| 55 | +The `ptpSchedulingPriority` field is not used when `ptpSchedulingPolicy` is set to `SCHED_OTHER`. |
| 56 | + |
| 57 | +|`ptpClockThreshold` |
| 58 | +|Optional. |
| 59 | +If `ptpClockThreshold` stanza is not present, default values are used for `ptpClockThreshold` fields. |
| 60 | +Stanza shows default `ptpClockThreshold` values. `ptpClockThreshold` values configure how long after the PTP master clock is disconnected before PTP events are triggered. |
| 61 | +`holdOverTimeout` is the time value in seconds before the PTP clock event state changes to `FREERUN` when the PTP master clock is disconnected. |
| 62 | +The `maxOffsetThreshold` and `minOffsetThreshold` settings configure offset values in nanoseconds that compare against the values for `CLOCK_REALTIME` (`phc2sys`) or master offset (`ptp4l`). |
| 63 | +When the `ptp4l` or `phc2sys` offset value is outside this range, the PTP clock state is set to `FREERUN`. When the offset value is within this range, the PTP clock state is set to `LOCKED`. |
| 64 | + |
| 65 | +|`ts2phcConf` |
| 66 | +a|Sets the configuration for the `ts2phc` command. |
| 67 | + |
| 68 | +`leapfile` is the default path to the current leap seconds definition file in the PTP Operator container image. |
| 69 | + |
| 70 | +`ts2phc.nmea_serialport` is the serial port device that is connected to the NMEA GPS clock source. |
| 71 | +When configured, the GNSS receiver is accessible on `/dev/gnss<id>`. |
| 72 | +If the host has multiple GNSS receivers, you can find the correct device by enumerating either of the following devices: |
| 73 | + |
| 74 | +* `/sys/class/net/<eth_port>/device/gnss/` |
| 75 | +* `/sys/class/gnss/gnss<id>/device/` |
| 76 | +
|
| 77 | +|`ts2phcOpts` |
| 78 | +|Set options for the `ts2phc` command. |
| 79 | + |
| 80 | +|`recommend` |
| 81 | +|Specify an array of one or more `recommend` objects that define rules on how the `profile` should be applied to nodes. |
| 82 | + |
| 83 | +|`.recommend.profile` |
| 84 | +|Specify the `.recommend.profile` object name that is defined in the `profile` section. |
| 85 | + |
| 86 | +|`.recommend.priority` |
| 87 | +|Specify the `priority` with an integer value between `0` and `99`. |
| 88 | +A larger number gets lower priority, so a priority of `99` is lower than a priority of `10`. |
| 89 | +If a node can be matched with multiple profiles according to rules defined in the `match` field, the profile with the higher priority is applied to that node. |
| 90 | + |
| 91 | +|`.recommend.match` |
| 92 | +|Specify `.recommend.match` rules with `nodeLabel` or `nodeName`. |
| 93 | + |
| 94 | +|`.recommend.match.nodeLabel` |
| 95 | +|Set `nodeLabel` with the `key` of `node.Labels` from the node object by using the `oc |
| 96 | +get nodes --show-labels` command. |
| 97 | +For example: `node-role.kubernetes.io/worker`. |
| 98 | + |
| 99 | +|`.recommend.match.nodeName` |
| 100 | +|Set `nodeName` with value of `node.Name` from the node object by using the `oc get nodes` command. |
| 101 | +For example: `compute-1.example.com`. |
| 102 | +|==== |
0 commit comments