Skip to content

Commit 0018b8c

Browse files
authored
Merge pull request #39713 from aireilly/TELCODOCS-323
[TELCODOCS-323] - CNF-2772 PTP updates for OpenShift 4.10
2 parents fbf5bce + 3dd755f commit 0018b8c

15 files changed

+633
-180
lines changed
85.2 KB
Loading

modules/cnf-about-ptp-and-clock-synchronization.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,5 @@ Fast event notifications are generated by the PTP Operator in {product-title} fo
1616

1717
[NOTE]
1818
====
19-
PTP fast event notifications are available only for network interfaces configured to use PTP ordinary clocks.
19+
PTP fast event notifications are available for network interfaces configured to use PTP ordinary clocks or PTP boundary clocks.
2020
====

modules/cnf-about-ptp-fast-event-notifications-framework.adoc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,10 @@
66
[id="cnf-about-ptp-fast-event-notifications-framework_{context}"]
77
= About the PTP fast event notifications framework
88

9-
You can subscribe Distributed unit (DU) applications to Precision Time Protocol (PTP) fast events notifications that are generated by {product-title} with the PTP Operator and `cloud-event-proxy` sidecar container. You enable the `cloud-event-proxy` sidecar container by setting the `enableEventPublisher` field to `true` in the `ptpOperatorConfig` custom resource (CR) and specifying a `transportHost` address. PTP fast events use an Advanced Message Queuing Protocol (AMQP) event notification bus provided by the AMQ Interconnect Operator. AMQ Interconnect is a component of Red Hat AMQ, a messaging router that provides flexible routing of messages between any AMQP-enabled endpoints.
9+
You can subscribe distributed unit (DU) applications to Precision Time Protocol (PTP) fast events notifications that are generated by {product-title} with the PTP Operator and `cloud-event-proxy` sidecar container. You enable the `cloud-event-proxy` sidecar container by setting the `enableEventPublisher` field to `true` in the `ptpOperatorConfig` custom resource (CR) and specifying an Advanced Message Queuing Protocol (AMQP) `transportHost` address. PTP fast events use an AMQP event notification bus provided by the AMQ Interconnect Operator. AMQ Interconnect is a component of Red Hat AMQ, a messaging router that provides flexible routing of messages between any AMQP-enabled endpoints. An overview of the PTP fast events framework is below:
10+
11+
.Overview of PTP fast events
12+
image::218_OpenShift_PTP_events_0222.png[Overview of PTP fast events]
1013

1114
The `cloud-event-proxy` sidecar container can access the same resources as the primary vRAN application without using any of the resources of the primary application and with no significant latency.
1215

Lines changed: 206 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,206 @@
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+
----

modules/cnf-configuring-the-ptp-fast-event-publisher.adoc

Lines changed: 30 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -16,51 +16,53 @@ To start using PTP fast event notifications for a network interface in your clus
1616
1717
.Procedure
1818

19-
. Modify the `spec.ptpEventConfig` field of the `PtpOperatorConfig` resource and set appropriate values by running the following command:
20-
+
21-
[source,terminal]
22-
----
23-
$ oc edit PtpOperatorConfig default -n openshift-ptp
24-
----
19+
. Modify the default PTP Operator config to enable PTP fast events.
20+
21+
.. Save the following YAML in the `ptp-operatorconfig.yaml` file:
2522
+
2623
[source,yaml]
2724
----
28-
...
25+
apiVersion: ptp.openshift.io/v1
26+
kind: PtpOperatorConfig
27+
metadata:
28+
name: default
29+
namespace: openshift-ptp
2930
spec:
3031
daemonNodeSelector:
31-
node-role.kubernetes.io/worker: ""
32+
node-role.kubernetes.io/worker: ""
3233
ptpEventConfig:
3334
enableEventPublisher: true <1>
3435
transportHost: amqp://<instance_name>.<namespace>.svc.cluster.local <2>
3536
----
3637
<1> Set `enableEventPublisher` to `true` to enable PTP fast event notifications.
37-
<2> Set `transportHost` to the AMQ router you configured where `<instance_name>` and `<namespace>` correspond to the AMQ Interconnect router instance name and namespace, for example, `amqp://amq-interconnect.amq-interconnect.svc.cluster.local`
38+
<2> Set `transportHost` to the AMQ router that you configured where `<instance_name>` and `<namespace>` correspond to the AMQ Interconnect router instance name and namespace, for example, `amqp://amq-interconnect.amq-interconnect.svc.cluster.local`
3839

39-
. Create a `PtpConfig` custom resource for the PTP enabled interface, and set the required values for `ptpClockThreshold`, for example:
40+
.. Update the `PtpOperatorConfig` CR:
41+
+
42+
[source,terminal]
43+
----
44+
$ oc apply -f ptp-operatorconfig.yaml
45+
----
46+
47+
. Create a `PtpConfig` custom resource (CR) for the PTP enabled interface, and set the required values for `ptpClockThreshold` and `ptp4lOpts`. The following YAML illustrates the required values that you must set in the `PtpConfig` CR:
4048
+
4149
[source,yaml]
4250
----
43-
apiVersion: ptp.openshift.io/v1
44-
kind: PtpConfig
45-
metadata:
46-
name: example-ptpconfig
47-
namespace: openshift-ptp
4851
spec:
4952
profile:
5053
- name: "profile1"
5154
interface: "enp5s0f0"
52-
ptp4lOpts: "-2 -s --summary_interval -4"
55+
ptp4lOpts: "-2 -s --summary_interval -4" <1>
5356
phc2sysOpts: "-a -r -m -n 24 -N 8 -R 16"
54-
ptpClockThreshold:
55-
holdOverTimeout: 5 <1>
56-
maxOffsetThreshold: 100 <2>
57-
minOffsetThreshold: -100 <3>
58-
recommend:
59-
- profile: "profile1"
60-
priority: 4
61-
match:
62-
- nodeLabel: "node-role.kubernetes.io/worker"
57+
ptp4lConf: "" <2>
58+
ptpClockThreshold: <3>
59+
holdOverTimeout: 5 <4>
60+
maxOffsetThreshold: 100 <5>
61+
minOffsetThreshold: -100 <6>
6362
----
64-
<1> Number of seconds to stay in the clock holdover state. Holdover state is the period between local and master clock synchronizations.
65-
<2> Maximum offset value in nanoseconds. Offset is the time difference between the local and master clock.
66-
<3> Minimum offset value in nanoseconds.
63+
<1> Append `--summary_interval -4` to use PTP fast events.
64+
<2> Specify a string that contains the configuration to replace the default /etc/ptp4l.conf file. To use the default configuration, leave the field empty.
65+
<3> Optional. If `ptpClockThreshold` stanza is not present, default values are used for `ptpClockThreshold` fields. Stanza shows default `ptpClockThreshold` values.
66+
<4> Number of seconds to stay in the clock holdover state. Holdover state is the period between local and master clock synchronizations.
67+
<5> Maximum offset value in nanoseconds. Offset is the time difference between the local and master clock.
68+
<6> Minimum offset value in nanoseconds.

0 commit comments

Comments
 (0)