Skip to content

Commit f27b2d6

Browse files
authored
Merge pull request #55553 from aireilly/telcodocs-1043-partner-agreed-ptp-config
TELCODOCS-1043 - Adding partner agreed PTP config
2 parents a593b6c + 2e26ec7 commit f27b2d6

File tree

3 files changed

+353
-260
lines changed

3 files changed

+353
-260
lines changed

modules/nw-ptp-configuring-linuxptp-services-as-boundary-clock.adoc

Lines changed: 169 additions & 120 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,10 @@ You can configure the `linuxptp` services (`ptp4l`, `phc2sys`) as boundary clock
1010

1111
[NOTE]
1212
====
13-
Use the following example `PtpConfig` CR as the basis to configure `linuxptp` services as the boundary clock for your particular hardware and environment. This example CR also configures PTP fast events by setting appropriate values for `ptp4lOpts`, `ptp4lConf`, and `ptpClockThreshold`. `ptpClockThreshold` is used only when events are enabled.
13+
Use the following example `PtpConfig` CR as the basis to configure `linuxptp` services as the boundary clock for your particular hardware and environment.
14+
This example CR does not configure PTP fast events. To configure PTP fast events, set appropriate values for `ptp4lOpts`, `ptp4lConf`, and `ptpClockThreshold`.
15+
`ptpClockThreshold` is used only when events are enabled.
16+
See "Configuring the PTP fast event notifications publisher" for more information.
1417
====
1518

1619
.Prerequisites
@@ -25,155 +28,201 @@ Use the following example `PtpConfig` CR as the basis to configure `linuxptp` se
2528

2629
. Create the following `PtpConfig` CR, and then save the YAML in the `boundary-clock-ptp-config.yaml` file.
2730
+
31+
.Recommended PTP boundary clock configuration
2832
[source,yaml]
2933
----
34+
---
3035
apiVersion: ptp.openshift.io/v1
3136
kind: PtpConfig
3237
metadata:
33-
name: boundary-clock-ptp-config <1>
38+
name: boundary-clock-ptp-config
3439
namespace: openshift-ptp
3540
spec:
36-
profile: <2>
37-
- name: "<profile_name>" <3>
38-
ptp4lOpts: "-2 --summary_interval -4" <4>
39-
ptp4lConf: | <5>
40-
[ens1f0] <6>
41+
profile:
42+
- name: boundary-clock
43+
phc2sysOpts: "-a -r -n 24"
44+
ptp4lOpts: "-2"
45+
ptpSchedulingPolicy: SCHED_FIFO
46+
ptpSchedulingPriority: 10
47+
ptp4lConf: |
48+
[<interface_1>]
4149
masterOnly 0
42-
[ens1f3] <7>
50+
[<interface_2>]
51+
masterOnly 1
52+
[<interface_3>]
53+
masterOnly 1
54+
[<interface_4>]
4355
masterOnly 1
4456
[global]
4557
#
4658
# Default Data Set
4759
#
48-
twoStepFlag 1
49-
#slaveOnly 1
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 G.8275.x
62-
G.8275.defaultDS.localPriority 128
60+
twoStepFlag 1
61+
slaveOnly 0
62+
priority1 128
63+
priority2 128
64+
domainNumber 24
65+
clockClass 248
66+
clockAccuracy 0xFE
67+
offsetScaledLogVariance 0xFFFF
68+
free_running 0
69+
freq_est_interval 1
70+
dscp_event 0
71+
dscp_general 0
72+
dataset_comparison G.8275.x
73+
G.8275.defaultDS.localPriority 128
6374
#
6475
# Port Data Set
6576
#
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 4
74-
neighborPropDelayThresh 20000000
75-
masterOnly 0
76-
G.8275.portDS.localPriority 128
77+
logAnnounceInterval -3
78+
logSyncInterval -4
79+
logMinDelayReqInterval -4
80+
logMinPdelayReqInterval -4
81+
announceReceiptTimeout 3
82+
syncReceiptTimeout 0
83+
delayAsymmetry 0
84+
fault_reset_interval 4
85+
neighborPropDelayThresh 20000000
86+
masterOnly 0
87+
G.8275.portDS.localPriority 128
7788
#
78-
# Runtime options
89+
# Run time options
7990
#
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 <8>
89-
unicast_listen 0
90-
unicast_master_table 0
91-
unicast_req_duration 3600
92-
use_syslog 1
93-
verbose 0
94-
summary_interval -4
95-
kernel_leap 1
96-
check_fup_sync 0
91+
assume_two_step 0
92+
logging_level 6
93+
path_trace_enabled 0
94+
follow_up_info 0
95+
hybrid_e2e 0
96+
inhibit_multicast_service 0
97+
net_sync_monitor 0
98+
tc_spanning_tree 0
99+
tx_timestamp_timeout 50
100+
unicast_listen 0
101+
unicast_master_table 0
102+
unicast_req_duration 3600
103+
use_syslog 1
104+
verbose 0
105+
summary_interval 0
106+
kernel_leap 1
107+
check_fup_sync 0
97108
#
98109
# Servo Options
99110
#
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 2.0
109-
first_step_threshold 0.00002
110-
max_frequency 900000000
111-
clock_servo pi
112-
sanity_freq_limit 200000000
113-
ntpshm_segment 0
111+
pi_proportional_const 0.0
112+
pi_integral_const 0.0
113+
pi_proportional_scale 0.0
114+
pi_proportional_exponent -0.3
115+
pi_proportional_norm_max 0.7
116+
pi_integral_scale 0.0
117+
pi_integral_exponent 0.4
118+
pi_integral_norm_max 0.3
119+
step_threshold 2.0
120+
first_step_threshold 0.00002
121+
max_frequency 900000000
122+
clock_servo pi
123+
sanity_freq_limit 200000000
124+
ntpshm_segment 0
114125
#
115126
# Transport options
116127
#
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
128+
transportSpecific 0x0
129+
ptp_dst_mac 01:1B:19:00:00:00
130+
p2p_dst_mac 01:80:C2:00:00:0E
131+
udp_ttl 1
132+
udp6_scope 0x0E
133+
uds_address /var/run/ptp4l
123134
#
124135
# Default interface options
125136
#
126-
clock_type BC
127-
network_transport L2
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 <9>
137+
clock_type BC
138+
network_transport L2
139+
delay_mechanism E2E
140+
time_stamping hardware
141+
tsproc_mode filter
142+
delay_filter moving_median
143+
delay_filter_length 10
144+
egressLatency 0
145+
ingressLatency 0
146+
boundary_clock_jbod 0
136147
#
137148
# Clock description
138149
#
139-
productDescription ;;
140-
revisionData ;;
141-
manufacturerIdentity 00:00:00
142-
userDescription ;
143-
timeSource 0xA0
144-
phc2sysOpts: "-a -r -n 24" <10>
145-
ptpSchedulingPolicy: SCHED_OTHER <11>
146-
ptpSchedulingPriority: 10 <12>
147-
ptpClockThreshold: <13>
148-
holdOverTimeout: 5
149-
maxOffsetThreshold: 100
150-
minOffsetThreshold: -100
151-
recommend: <14>
152-
- profile: "<profile_name>" <15>
153-
priority: 10 <16>
154-
match: <17>
155-
- nodeLabel: "<node_label>" <18>
156-
nodeName: "<node_name>" <19>
150+
productDescription ;;
151+
revisionData ;;
152+
manufacturerIdentity 00:00:00
153+
userDescription ;
154+
timeSource 0xA0
155+
recommend:
156+
- profile: boundary-clock
157+
priority: 4
158+
match:
159+
- nodeLabel: node-role.kubernetes.io/master
160+
nodeName: <nodename>
157161
----
158-
<1> The name of the `PtpConfig` CR.
159-
<2> Specify an array of one or more `profile` objects.
160-
<3> Specify the name of a profile object which uniquely identifies a profile object.
161-
<4> Specify system config options for the `ptp4l` service. 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.
162-
<5> Specify the needed configuration to start `ptp4l` as boundary clock. For example, `ens1f0` synchronizes from a grandmaster clock and `ens1f3` synchronizes connected devices.
163-
<6> The interface that receives the synchronization clock.
164-
<7> The interface that sends the synchronization clock.
165-
<8> For Intel Columbiaville 800 Series NICs, set `tx_timestamp_timeout` to `50`.
166-
<9> For Intel Columbiaville 800 Series NICs, ensure `boundary_clock_jbod` is set to `0`. For Intel Fortville X710 Series NICs, ensure `boundary_clock_jbod` is set to `1`.
167-
<10> Specify system config options for the `phc2sys` service. If this field is empty the PTP Operator does not start the `phc2sys` service.
168-
<11> Scheduling policy for ptp4l and phc2sys processes. Default value is `SCHED_OTHER`. Use `SCHED_FIFO` on systems that support FIFO scheduling.
169-
<12> Integer value from 1-65 used to set FIFO priority for `ptp4l` and `phc2sys` processes when `ptpSchedulingPolicy` is set to `SCHED_FIFO`. The `ptpSchedulingPriority` field is not used when `ptpSchedulingPolicy` is set to `SCHED_OTHER`.
170-
<13> Optional. If `ptpClockThreshold` stanza is not present, default values are used for `ptpClockThreshold` fields. Stanza shows default `ptpClockThreshold` values. `ptpClockThreshold` values configure how long after the PTP master clock is disconnected before PTP events are triggered. `holdOverTimeout` is the time value in seconds before the PTP clock event state changes to `FREERUN` when the PTP master clock is disconnected. The `maxOffsetThreshold` and `minOffsetThreshold` settings configure offset values in nanoseconds that compare against the values for `CLOCK_REALTIME` (`phc2sys`) or master offset (`ptp4l`). 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`.
171-
<14> Specify an array of one or more `recommend` objects that define rules on how the `profile` should be applied to nodes.
172-
<15> Specify the `profile` object name defined in the `profile` section.
173-
<16> Specify the `priority` with an integer value between `0` and `99`. A larger number gets lower priority, so a priority of `99` is lower than a priority of `10`. 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.
174-
<17> Specify `match` rules with `nodeLabel` or `nodeName`.
175-
<18> Specify `nodeLabel` with the `key` of `node.Labels` from the node object by using the `oc get nodes --show-labels` command. For example: `node-role.kubernetes.io/worker`.
176-
<19> Specify `nodeName` with `node.Name` from the node object by using the `oc get nodes` command. For example: `node-role.kubernetes.io/worker`. For example: `compute-0.example.com`.
162+
+
163+
.PTP boundary clock CR configuration options
164+
[cols="1,3" options="header"]
165+
|====
166+
|Custom resource field
167+
|Description
168+
169+
|`name`
170+
|The name of the `PtpConfig` CR.
171+
172+
|`profile`
173+
|Specify an array of one or more `profile` objects.
174+
175+
|`name`
176+
|Specify the name of a profile object which uniquely identifies a profile object.
177+
178+
|`ptp4lOpts`
179+
|Specify system config options for the `ptp4l` service. 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.
180+
181+
|`ptp4lConf`
182+
|Specify the required configuration to start `ptp4l` as boundary clock. For example, `ens1f0` synchronizes from a grandmaster clock and `ens1f3` synchronizes connected devices.
183+
184+
|`<interface_1>`
185+
|The interface that receives the synchronization clock.
186+
187+
|`<interface_2>`
188+
|The interface that sends the synchronization clock.
189+
190+
|`tx_timestamp_timeout`
191+
|For Intel Columbiaville 800 Series NICs, set `tx_timestamp_timeout` to `50`.
192+
193+
|`boundary_clock_jbod`
194+
|For Intel Columbiaville 800 Series NICs, ensure `boundary_clock_jbod` is set to `0`. For Intel Fortville X710 Series NICs, ensure `boundary_clock_jbod` is set to `1`.
195+
196+
|`phc2sysOpts`
197+
|Specify system config options for the `phc2sys` service. If this field is empty, the PTP Operator does not start the `phc2sys` service.
198+
199+
|`ptpSchedulingPolicy`
200+
|Scheduling policy for ptp4l and phc2sys processes. Default value is `SCHED_OTHER`. Use `SCHED_FIFO` on systems that support FIFO scheduling.
201+
202+
|`ptpSchedulingPriority`
203+
|Integer value from 1-65 used to set FIFO priority for `ptp4l` and `phc2sys` processes when `ptpSchedulingPolicy` is set to `SCHED_FIFO`. The `ptpSchedulingPriority` field is not used when `ptpSchedulingPolicy` is set to `SCHED_OTHER`.
204+
205+
|`ptpClockThreshold`
206+
|Optional. If `ptpClockThreshold` is not present, default values are used for the `ptpClockThreshold` fields. `ptpClockThreshold` configures how long after the PTP master clock is disconnected before PTP events are triggered. `holdOverTimeout` is the time value in seconds before the PTP clock event state changes to `FREERUN` when the PTP master clock is disconnected. The `maxOffsetThreshold` and `minOffsetThreshold` settings configure offset values in nanoseconds that compare against the values for `CLOCK_REALTIME` (`phc2sys`) or master offset (`ptp4l`). 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`.
207+
208+
|`recommend`
209+
|Specify an array of one or more `recommend` objects that define rules on how the `profile` should be applied to nodes.
210+
211+
|`.recommend.profile`
212+
|Specify the `.recommend.profile` object name defined in the `profile` section.
213+
214+
|`.recommend.priority`
215+
|Specify the `priority` with an integer value between `0` and `99`. A larger number gets lower priority, so a priority of `99` is lower than a priority of `10`. 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.
216+
217+
|`.recommend.match`
218+
|Specify `.recommend.match` rules with `nodeLabel` or `nodeName`.
219+
220+
|`.recommend.match.nodeLabel`
221+
|Update `nodeLabel` with the `key` of `node.Labels` from the node object by using the `oc get nodes --show-labels` command. For example: `node-role.kubernetes.io/worker`.
222+
223+
|`.recommend.match.nodeLabel`
224+
|Update `nodeName` with value of `node.Name` from the node object by using the `oc get nodes` command. For example: `compute-0.example.com`.
225+
|====
177226
178227
. Create the CR by running the following command:
179228
+
@@ -217,7 +266,7 @@ I1115 09:41:17.117604 4143292 daemon.go:109] updating NodePTPProfile to:
217266
I1115 09:41:17.117607 4143292 daemon.go:110] ------------------------------------
218267
I1115 09:41:17.117612 4143292 daemon.go:102] Profile Name: profile1
219268
I1115 09:41:17.117616 4143292 daemon.go:102] Interface:
220-
I1115 09:41:17.117620 4143292 daemon.go:102] Ptp4lOpts: -2 --summary_interval -4
269+
I1115 09:41:17.117620 4143292 daemon.go:102] Ptp4lOpts: -2
221270
I1115 09:41:17.117623 4143292 daemon.go:102] Phc2sysOpts: -a -r -n 24
222271
I1115 09:41:17.117626 4143292 daemon.go:116] ------------------------------------
223272
----

0 commit comments

Comments
 (0)