Skip to content

Commit 588a7df

Browse files
authored
Merge pull request #100729 from slovern/TELCODOCS-2100
TELCODOCS-2100 - redoing PR 100372
2 parents e7509ab + de4ab6e commit 588a7df

File tree

2 files changed

+370
-0
lines changed

2 files changed

+370
-0
lines changed
Lines changed: 368 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,368 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * networking/ptp/configuring-ptp.adoc
4+
5+
:_mod-docs-content-type: PROCEDURE
6+
[id="nw-ptp-t-bc-t-tsc-holdover_{context}"]
7+
= Applying unassisted holdover for boundary clocks and time slave clocks
8+
9+
The unassisted holdover feature enables an Intel E810-XXVDA4T Network Interface Card (NIC), configured as either a PTP boundary clock (T-BC) or a PTP time slave clock (T-TSC), to maintain highly accurate time synchronization even when the upstream timing signal is lost. This is achieved by relying on the NIC's internal oscillator to enter a stable, controlled drift state.
10+
11+
The `ts2phc` service monitors the `ptp4l` instance bound to the timing receiver (TR) port. If, for example, the TR port stops operating as the time receiver, the upstream grandmaster clock (T-GM) deteriorates in quality or the link disconnects, the system enters holdover mode and reconfigures itself dynamically.
12+
13+
:FeatureName: Applying unassisted holdover for T-BC and T-TSC
14+
include::snippets/technology-preview.adoc[leveloffset=+1]
15+
16+
.Prerequisites
17+
* Install the OpenShift CLI (`oc`).
18+
* Log in as a user with `cluster-admin` privileges.
19+
* Install the PTP Operator.
20+
* An Intel E810-XXVDA4T NIC.
21+
22+
.Procedure
23+
24+
. Configure the triple port T-BC NIC. See the example below where the `PtpConfig` resource contains two profiles, one for time transmitter ports (00-tbc-tt) and one to configure all the hardware, the TR port, and `ts2phc` and `phc2sys` processes:
25+
+
26+
[source,yaml]
27+
----
28+
apiVersion: ptp.openshift.io/v1
29+
kind: PtpConfig
30+
metadata:
31+
name: t-bc
32+
namespace: openshift-ptp
33+
spec:
34+
profile:
35+
- name: 00-tbc-tt
36+
ptp4lConf: |
37+
[ens4f0]
38+
masterOnly 1 <1>
39+
[ens8f0]
40+
masterOnly 1 <1>
41+
[ens1f0]
42+
masterOnly 1 <1>
43+
[global]
44+
#
45+
# Default Data Set
46+
#
47+
twoStepFlag 1
48+
slaveOnly 0
49+
priority1 128
50+
priority2 128
51+
domainNumber 25
52+
clockClass 248
53+
clockAccuracy 0xFE
54+
offsetScaledLogVariance 0xFFFF
55+
free_running 0
56+
freq_est_interval 1
57+
dscp_event 0
58+
dscp_general 0
59+
dataset_comparison G.8275.x
60+
G.8275.defaultDS.localPriority 128
61+
#
62+
# Port Data Set
63+
#
64+
logAnnounceInterval -3
65+
logSyncInterval -4
66+
logMinDelayReqInterval -4
67+
logMinPdelayReqInterval -4
68+
announceReceiptTimeout 3
69+
syncReceiptTimeout 0
70+
delayAsymmetry 0
71+
fault_reset_interval -4
72+
neighborPropDelayThresh 20000000
73+
masterOnly 0
74+
G.8275.portDS.localPriority 128
75+
#
76+
# Run time options
77+
#
78+
assume_two_step 0
79+
logging_level 6
80+
path_trace_enabled 0
81+
follow_up_info 0
82+
hybrid_e2e 0
83+
inhibit_multicast_service 0
84+
net_sync_monitor 0
85+
tc_spanning_tree 0
86+
tx_timestamp_timeout 50
87+
unicast_listen 0
88+
unicast_master_table 0
89+
unicast_req_duration 3600
90+
use_syslog 1
91+
verbose 0
92+
summary_interval 0
93+
kernel_leap 1
94+
check_fup_sync 0
95+
clock_class_threshold 135
96+
#
97+
# Servo Options
98+
#
99+
pi_proportional_const 0.60
100+
pi_integral_const 0.001
101+
pi_proportional_scale 0.0
102+
pi_proportional_exponent -0.3
103+
pi_proportional_norm_max 0.7
104+
pi_integral_scale 0.0
105+
pi_integral_exponent 0.4
106+
pi_integral_norm_max 0.3
107+
step_threshold 2.0
108+
first_step_threshold 0.00002
109+
max_frequency 900000000
110+
clock_servo pi
111+
sanity_freq_limit 200000000
112+
ntpshm_segment 0
113+
#
114+
# Transport options
115+
#
116+
transportSpecific 0x0
117+
ptp_dst_mac AA:BB:CC:DD:EE:FF
118+
p2p_dst_mac BB:CC:DD:EE:FF:GG
119+
udp_ttl 1
120+
udp6_scope 0x0E
121+
uds_address /var/run/ptp4l
122+
#
123+
# Default interface options
124+
#
125+
clock_type BC
126+
network_transport L2
127+
delay_mechanism E2E
128+
time_stamping hardware
129+
tsproc_mode filter
130+
delay_filter moving_median
131+
delay_filter_length 10
132+
egressLatency 0
133+
ingressLatency 0
134+
boundary_clock_jbod 1
135+
#
136+
# Clock description
137+
#
138+
productDescription ;;
139+
revisionData ;;
140+
manufacturerIdentity 00:00:00
141+
userDescription ;
142+
timeSource 0xA0
143+
ptp4lOpts: -2 --summary_interval -4
144+
ptpSchedulingPolicy: SCHED_FIFO
145+
ptpSchedulingPriority: 10
146+
ptpSettings:
147+
controllingProfile: 01-tbc-tr
148+
logReduce: "false"
149+
- name: 01-tbc-tr
150+
phc2sysOpts: -r -n 25 -N 8 -R 16 -u 0 -m -s ens4f1 <2>
151+
plugins: <3>
152+
e810:
153+
enableDefaultConfig: false
154+
interconnections: <4>
155+
- gnssInput: false
156+
id: ens4f0
157+
part: E810-XXVDA4T
158+
phaseOutputConnectors:
159+
- SMA1
160+
- SMA2
161+
upstreamPort: ens4f1
162+
- id: ens1f0
163+
inputConnector:
164+
connector: SMA1
165+
part: E810-XXVDA4T
166+
- id: ens8f0
167+
inputConnector:
168+
connector: SMA1
169+
part: E810-XXVDA4T
170+
pins:
171+
ens4f0:
172+
SMA1: 2 1
173+
SMA2: 2 2
174+
U.FL1: 0 1
175+
U.FL2: 0 2
176+
ens1f0:
177+
SMA1: 1 1
178+
SMA2: 0 2
179+
U.FL1: 0 1
180+
U.FL2: 0 2
181+
ens8f0:
182+
SMA1: 1 1
183+
SMA2: 0 2
184+
U.FL1: 0 1
185+
U.FL2: 0 2
186+
settings:
187+
LocalHoldoverTimeout: 14400
188+
LocalMaxHoldoverOffSet: 1500
189+
MaxInSpecOffset: 100
190+
ptp4lConf: |
191+
# The interface name is hardware-specific
192+
[ens4f1]
193+
masterOnly 0
194+
[global]
195+
#
196+
# Default Data Set
197+
#
198+
twoStepFlag 1
199+
slaveOnly 0
200+
priority1 128
201+
priority2 128
202+
domainNumber 25
203+
clockClass 248
204+
clockAccuracy 0xFE
205+
offsetScaledLogVariance 0xFFFF
206+
free_running 0
207+
freq_est_interval 1
208+
dscp_event 0
209+
dscp_general 0
210+
dataset_comparison G.8275.x
211+
G.8275.defaultDS.localPriority 128
212+
#
213+
# Port Data Set
214+
#
215+
logAnnounceInterval -3
216+
logSyncInterval -4
217+
logMinDelayReqInterval -4
218+
logMinPdelayReqInterval -4
219+
announceReceiptTimeout 3
220+
syncReceiptTimeout 0
221+
delayAsymmetry 0
222+
fault_reset_interval -4
223+
neighborPropDelayThresh 20000000
224+
masterOnly 0
225+
G.8275.portDS.localPriority 128
226+
#
227+
# Run time options
228+
#
229+
assume_two_step 0
230+
logging_level 6
231+
path_trace_enabled 0
232+
follow_up_info 0
233+
hybrid_e2e 0
234+
inhibit_multicast_service 0
235+
net_sync_monitor 0
236+
tc_spanning_tree 0
237+
tx_timestamp_timeout 50
238+
unicast_listen 0
239+
unicast_master_table 0
240+
unicast_req_duration 3600
241+
use_syslog 1
242+
verbose 0
243+
summary_interval 0
244+
kernel_leap 1
245+
check_fup_sync 0
246+
clock_class_threshold 135
247+
#
248+
# Servo Options
249+
#
250+
pi_proportional_const 0.60
251+
pi_integral_const 0.001
252+
pi_proportional_scale 0.0
253+
pi_proportional_exponent -0.3
254+
pi_proportional_norm_max 0.7
255+
pi_integral_scale 0.0
256+
pi_integral_exponent 0.4
257+
pi_integral_norm_max 0.3
258+
step_threshold 2.0
259+
first_step_threshold 0.00002
260+
max_frequency 900000000
261+
clock_servo pi
262+
sanity_freq_limit 200000000
263+
ntpshm_segment 0
264+
#
265+
# Transport options
266+
#
267+
transportSpecific 0x0
268+
ptp_dst_mac AA:BB:CC:DD:EE:HH
269+
p2p_dst_mac BB:CC:DD:EE:FF:II
270+
udp_ttl 1
271+
udp6_scope 0x0E
272+
uds_address /var/run/ptp4l
273+
#
274+
# Default interface options
275+
#
276+
clock_type OC
277+
network_transport L2
278+
delay_mechanism E2E
279+
time_stamping hardware
280+
tsproc_mode filter
281+
delay_filter moving_median
282+
delay_filter_length 10
283+
egressLatency 0
284+
ingressLatency 0
285+
boundary_clock_jbod 1
286+
#
287+
# Clock description
288+
#
289+
productDescription ;;
290+
revisionData ;;
291+
manufacturerIdentity 00:00:00
292+
userDescription ;
293+
timeSource 0xA0
294+
ptp4lOpts: -2 --summary_interval -4
295+
ptpSchedulingPolicy: SCHED_FIFO
296+
ptpSchedulingPriority: 10
297+
ptpSettings:
298+
inSyncConditionThreshold: "10"
299+
inSyncConditionTimes: "12"
300+
logReduce: "false"
301+
ts2phcConf: |
302+
[global]
303+
use_syslog 0
304+
verbose 1
305+
logging_level 7
306+
ts2phc.pulsewidth 100000000
307+
leapfile /usr/share/zoneinfo/leap-seconds.list
308+
domainNumber 25 <5>
309+
uds_address /var/run/ptp4l.0.socket <6>
310+
[ens4f0] <7>
311+
ts2phc.extts_polarity rising
312+
ts2phc.extts_correction -10
313+
ts2phc.master 0
314+
[ens1f0]
315+
ts2phc.extts_polarity rising
316+
ts2phc.extts_correction -27
317+
ts2phc.master 0
318+
[ens8f0]
319+
ts2phc.extts_polarity rising
320+
ts2phc.extts_correction -27
321+
ts2phc.master 0
322+
ts2phcOpts: -s generic -a --ts2phc.rh_external_pps 1 <8>
323+
recommend:
324+
- match:
325+
- nodeLabel: node-role.kubernetes.io/master
326+
priority: 4
327+
profile: 00-tbc-tt
328+
- match:
329+
- nodeLabel: node-role.kubernetes.io/master
330+
priority: 4
331+
profile: 01-tbc-tr
332+
----
333+
<1> All TT ports have the `masterOnly` set to 1.
334+
<2> The `phc2sysOpts` setting in the TR profile specifies the upstream port `ens4f1` as the source of the node time synchronization.
335+
<3> The TR profile contains the hardware plugin section.
336+
<4> The interconnections section in the hardware plugin has three NICs: `ens4f0`, `ens1f0`, and `ens8f0`. The leading NIC, `ens4f0`, is the only one with the `gnnsInput` field, set to `false`, and the `upstreamPort` field that specifies the TR port. It also has a list of `phaseOutputConnectors`, `SMA1` and `SMA2`. The following NICs have the `inputConnector` field. Set the time receiver NIC `ens4f0` and the specific TR port. that is `upstreamPort: ens4f1`, for both T-BC and T-TSC configurations.
337+
<5> The `ts2phc` configuration contains the `domainNumber` of the upstream PTP domain.
338+
<6> The `ts2phc` configuration contains the `uds_address`. Its value is not important because the daemon patches it with the correct address.
339+
<7> The `ts2phc` configuration must include all NICs participating in this setup (`ens4f0`, `ens1f0`, and `ens8f0`).
340+
<8> `ts2phcOpts` sets the source as generic with `-s generic` and automatic with `-a`. The last option, `--ts2phc.rh_external_pps 1`, configures it to operate with external phase source, the digital phase-locked loop (DPLL).
341+
+
342+
[NOTE]
343+
====
344+
In the single-NIC case, disable all pins or enable outputs if using for 1PPS measurements.
345+
====
346+
347+
[NOTE]
348+
====
349+
To render this configuration for T-TSC operation, remove the `00-tbc-tt` profile and adjust the `ts2phcConf` section to list only the TR NIC.
350+
====
351+
352+
.Verification
353+
354+
To get the T-BC status, run the following command:
355+
356+
[source,terminal]
357+
----
358+
$ oc -linuxptp-daemon-container logs ds/linuxptp-daemon --since=1s -f |grep T-BC
359+
----
360+
361+
.Example output
362+
[source,terminal]
363+
----
364+
T-BC[1760525446]:[ts2phc.1.config] ens4f0 offset 1 T-BC-STATUS s2
365+
T-BC[1760525447]:[ts2phc.1.config] ens4f0 offset 1 T-BC-STATUS s2
366+
T-BC[1760525448]:[ts2phc.1.config] ens4f0 offset -1 T-BC-STATUS s2
367+
----
368+
This is reported every second, where `s2` indicates it is locked, `s1` indicates holdover is activated, and `s0`, unlocked.

networking/advanced_networking/ptp/configuring-ptp.adoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ include::modules/nw-ptp-three-nic-hardware-config-reference.adoc[leveloffset=+2]
4646

4747
include::modules/nw-ptp-holdover-in-a-grandmaster-clock.adoc[leveloffset=+1]
4848

49+
include::modules/nw-ptp-t-bc-t-tsc-holdover.adoc[leveloffset=+1]
50+
4951
[role="_additional-resources"]
5052
.Additional resources
5153

0 commit comments

Comments
 (0)