52e35ce91c8b8651eb63912d6fde4743b990fee4
[o-du/phy.git] / docs / PTP-configuration_fh.rst
1 ..    Copyright (c) 2019 Intel
2 ..
3 ..  Licensed under the Apache License, Version 2.0 (the "License");
4 ..  you may not use this file except in compliance with the License.
5 ..  You may obtain a copy of the License at
6 ..
7 ..      http://www.apache.org/licenses/LICENSE-2.0
8 ..
9 ..  Unless required by applicable law or agreed to in writing, software
10 ..  distributed under the License is distributed on an "AS IS" BASIS,
11 ..  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 ..  See the License for the specific language governing permissions and
13 ..  limitations under the License.
14
15 .. |br| raw:: html
16
17    <br />
18    
19 PTP configuration
20 =================
21
22 A.5 PTP Synchronization
23 -----------------------
24 Precision Time Protocol (PTP) provides an efficient way to synchronize
25 time on the network nodes. This protocol uses Primary-Slave architecture.
26 Main Reference Clock (Primary) is a reference clock for the other nodes,
27 which adapt their clocks to the Primary.
28
29 Using Physical Hardware Clock (PHC) from the Main Reference Clock, NIC port
30 precision timestamp packets can be served for other network nodes. Secondary
31 nodes adjust their PHC to the Primary following the IEEE 1588
32 specification.
33
34 There are existing implementations of PTP protocol that are widely used
35 in the industry. One of them is PTP for Linux, which is a set of tools
36 providing necessary PTP functionality. There is no need to re-implement
37 the 1588 protocol because PTP for Linux is precise and efficient enough
38 to be used out of the box.
39
40 To meet xRAN requirements, two tools from PTP for Linux package are
41 required: ptp4l and phc2sys.
42
43 PTP for Linux\* Requirements
44 ----------------------------
45
46 PTP for Linux\* introduces some software and hardware requirements. The
47 machine on which the tools will be run needs to use at least a 3.10
48 Kernel version (built-in PTP support). There are several Kernel options
49 that need to be enabled in Kernel configuration:
50
51 -  CONFIG_PPS
52
53 -  CONFIG_NETWORK_PHY_TIMESTAMPING
54
55 -  PTP_1588_CLOCK
56
57 Be sure that the Kernel is compiled with these options.
58
59 For the best precision, PTP uses hardware timestamping. NIC has its own
60 clock, called Physical Hardware Clock (PHC) to read current time just a
61 moment before the packet is sent to minimalize the delays added by the
62 Kernel processing the packet. Not every NIC supports that feature. To
63 confirm that currently attached NIC support Hardware Timestamps, use
64 ethtool with the command:
65
66 ethtool -T eth0
67
68 where eth0 is the potential PHC port. The output from the command should
69 say that there is Hardware Timestamps support.
70
71 To set up PTP for Linux*:
72
73 1.Download source code::
74
75     git clone http://git.code.sf.net/p/linuxptp/code linuxptp
76     
77     git checkout v2.0
78     
79 2.Apply patch (this is required to work around issue with some of the
80 GM PTP packet size.)::
81
82     diff --git a/msg.c b/msg.c
83     
84     old mode 100644
85     
86     new mode 100755
87     
88     index d1619d4..40d1538
89     
90     --- a/msg.c
91     
92     +++ b/msg.c
93     
94     @@ -399,9 +399,11 @@ int msg_post_recv(struct ptp_message \*m, int cnt)
95     
96     port_id_post_recv(&m->pdelay_resp.requestingPortIdentity);
97     
98     break;
99     
100     case FOLLOW_UP:
101     
102     + cnt -= 4;
103     
104     timestamp_post_recv(m, &m->follow_up.preciseOriginTimestamp);
105     
106     break;
107     
108     case DELAY_RESP:
109     
110     + cnt -= 4;
111     
112     timestamp_post_recv(m, &m->delay_resp.receiveTimestamp);
113     
114     port_id_post_recv(&m->delay_resp.requestingPortIdentity);
115     
116     break;
117
118 3.Build and install ptp41::
119
120    # make && make install
121
122 4.Modify configs/default.cfg to control frequency of Sync interval to
123 0.0625s::
124
125     logSyncInterval -4
126
127 ptp4l 
128 ----------
129
130 This tool handles all PTP traffic on the provided NIC port and updated
131 PHC. It also determines the Primary Reference Clock and tracks synchronization
132 status. This tool can be run as a daemon or as a regular Linux\*
133 application. When the synchronization is reached, it gives output on the
134 screen for precision tracking. The configuration file of ptp4l contains
135 many options that can be set to get the best synchronization precision.
136 Although, even with default.cfg the synchronization quality is good.
137
138 To start the synchronization process run::
139
140     cd linuxptp
141     
142     ./ptp4l -f ./configs/default.cfg -2 -i <if_name> -m
143
144 The output below shows what the output on non-Primary node should look
145 like when synchronization is started. This means that PHC on this
146 machine is synchronized to the Primary PHC::
147
148     ptp4l[1434165.358]: port 1: INITIALIZING to LISTENING on INIT_COMPLETE
149     
150     ptp4l[1434165.358]: port 0: INITIALIZING to LISTENING on INIT_COMPLETE
151     
152     ptp4l[1434166.384]: port 1: new foreign primary fcaf6a.fffe.029708-1
153     
154     ptp4l[1434170.352]: selected best primary clock fcaf6a.fffe.029708
155     
156     ptp4l[1434170.352]: updating UTC offset to 37
157     
158     ptp4l[1434170.352]: port 1: LISTENING to UNCALIBRATED on RS_SLAVE
159     
160     ptp4l[1434171.763]: primary offset -5873 s0 freq -18397 path delay 2778
161     
162     ptp4l[1434172.763]: primary offset -6088 s2 freq -18612 path delay 2778
163     
164     ptp4l[1434172.763]: port 1: UNCALIBRATED to SLAVE on
165     MASTER_CLOCK_SELECTED
166     
167     ptp4l[1434173.763]: primary offset -5886 s2 freq -24498 path delay 2732
168     
169     ptp4l[1434174.763]: primary offset 221 s2 freq -20157 path delay 2728
170     
171     ptp4l[1434175.763]: primary offset 1911 s2 freq -18401 path delay 2724
172     
173     ptp4l[1434176.763]: primary offset 1774 s2 freq -17964 path delay 2728
174     
175     ptp4l[1434177.763]: primary offset 1198 s2 freq -18008 path delay 2728
176     
177     ptp4l[1434178.763]: primary offset 746 s2 freq -18101 path delay 2755
178     
179     ptp4l[1434179.763]: primary offset 218 s2 freq -18405 path delay 2792
180     
181     ptp4l[1434180.763]: primary offset 103 s2 freq -18454 path delay 2792
182     
183     ptp4l[1434181.763]: primary offset -13 s2 freq -18540 path delay 2813
184     
185     ptp4l[1434182.763]: primary offset 9 s2 freq -18521 path delay 2813
186     
187     ptp4l[1434183.763]: primary offset 11 s2 freq -18517 path delay 2813
188     
189 phc2sys
190 -----------
191
192 The PHC clock is independent from the system clock. Synchronizing only
193 PHC does not make the system clock exactly the same as the primary. The
194 xRAN library requires use of the system clock to determine a common
195 point in time on two machines (O-DU and RU) to start transmission at the
196 same moment and keep time frames defined by ORAN Fronthaul specification.
197
198 This application keeps the system clock updated to PHC. It makes it
199 possible to use POSIX timers as a time reference in xRAN application.
200
201 Run phc2sys with the command::
202
203     cd linuxptp
204     
205     ./phc2sys -s enp25s0f0 -w -m -R 8
206
207 Command output will look like::
208
209     ptp4l[1434165.342]: selected /dev/ptp4 as PTP
210     
211     phc2sys[1434344.651]: CLOCK_REALTIME phc offset 450 s2 freq -39119 delay
212     1354
213     
214     phc2sys[1434344.776]: CLOCK_REALTIME phc offset 499 s2 freq -38620 delay
215     1344
216     
217     phc2sys[1434344.902]: CLOCK_REALTIME phc offset 485 s2 freq -38484 delay
218     1347
219     
220     phc2sys[1434345.027]: CLOCK_REALTIME phc offset 476 s2 freq -38348 delay
221     1346
222     
223     phc2sys[1434345.153]: CLOCK_REALTIME phc offset 392 s2 freq -38289 delay
224     1340
225     
226     phc2sys[1434345.278]: CLOCK_REALTIME phc offset 319 s2 freq -38244 delay
227     1340
228     
229     phc2sys[1434345.404]: CLOCK_REALTIME phc offset 278 s2 freq -38190 delay
230     1349
231     
232     phc2sys[1434345.529]: CLOCK_REALTIME phc offset 221 s2 freq -38163 delay
233     1343
234     
235     phc2sys[1434345.654]: CLOCK_REALTIME phc offset 97 s2 freq -38221 delay
236     1342
237     
238     phc2sys[1434345.780]: CLOCK_REALTIME phc offset 67 s2 freq -38222 delay
239     1344
240     
241     phc2sys[1434345.905]: CLOCK_REALTIME phc offset 68 s2 freq -38201 delay
242     1341
243     
244     phc2sys[1434346.031]: CLOCK_REALTIME phc offset 104 s2 freq -38144 delay
245     1340
246     
247     phc2sys[1434346.156]: CLOCK_REALTIME phc offset 58 s2 freq -38159 delay
248     1340
249     
250     phc2sys[1434346.281]: CLOCK_REALTIME phc offset 12 s2 freq -38188 delay
251     1343
252     
253     phc2sys[1434346.407]: CLOCK_REALTIME phc offset -36 s2 freq -38232 delay
254     1342
255     
256     phc2sys[1434346.532]: CLOCK_REALTIME phc offset -103 s2 freq -38310
257     delay 1348
258
259 Configuration C3
260 ------------------
261
262 Configuration C3 27 can be simulated for O-DU using a separate server
263 acting as Fronthaul Network and O-RU at the same time. O-RU server can
264 be configured to relay PTP and act as PTP primary for O-DU. Settings
265 below can be used to instantiate this scenario. The difference is that
266 on the O-DU side, the Fronthaul port can be used as the source of PTP as
267 well as for U-plane and C-plane traffic.
268
269 1.Follow the steps in Section A.6.1 to install PTP on the O-RU server.
270
271 2.Copy configs/default.cfg to configs/default_slave.cfg and modify the
272 copied file as below::
273
274     diff --git a/configs/default.cfg b/configs/default.cfg
275     
276     old mode 100644
277     
278     new mode 100755
279     
280     index e23dfd7..f1ecaf1
281     
282     --- a/configs/default.cfg
283     
284     +++ b/configs/default.cfg
285     
286     @@ -3,26 +3,26 @@
287     
288     # Default Data Set
289     
290     #
291     
292     twoStepFlag 1
293     
294     -slaveOnly 0
295     
296     +slaveOnly 1
297     
298     priority1 128
299     
300     -priority2 128
301     
302     +priority2 255
303     
304     domainNumber 0
305     
306     #utc_offset 37
307     
308     -clockClass 248
309     
310     +clockClass 255
311     
312     clockAccuracy 0xFE
313     
314     offsetScaledLogVariance 0xFFFF
315     
316     free_running 0
317     
318     freq_est_interval 1
319     
320     dscp_event 0
321     
322     dscp_general 0
323     
324     -dataset_comparison ieee1588
325     
326     +dataset_comparison G.8275.x
327     
328     G.8275.defaultDS.localPriority 128
329     
330     maxStepsRemoved 255
331     
332     #
333     
334     # Port Data Set
335     
336     #
337     
338     logAnnounceInterval 1
339     
340     -logSyncInterval 0
341     
342     +logSyncInterval -4
343     
344     operLogSyncInterval 0
345     
346     logMinDelayReqInterval 0
347     
348     logMinPdelayReqInterval 0
349     
350     @@ -37,7 +37,7 @@ G.8275.portDS.localPriority 128
351     
352     asCapable auto
353     
354     BMCA ptp
355     
356     inhibit_announce 0
357     
358     -inhibit_pdelay_req 0
359     
360     +#inhibit_pdelay_req 0
361     
362     ignore_source_id 0
363     
364     #
365     
366     # Run time options
367
368 1.Start secondary port toward PTP GM:: 
369
370     ./ptp4l -f ./configs/default_slave.cfg -2 -i enp25s0f0 –m
371
372 Example of output::
373
374     ./ptp4l -f ./configs/default_slave.cfg -2 -i enp25s0f0 -m
375     
376     ptp4l[3904470.256]: selected /dev/ptp6 as PTP clock
377     
378     ptp4l[3904470.274]: port 1: INITIALIZING to LISTENING on INIT_COMPLETE
379     
380     ptp4l[3904470.275]: port 0: INITIALIZING to LISTENING on INIT_COMPLETE
381     
382     ptp4l[3904471.085]: port 1: new foreign primary fcaf6a.fffe.029708-1
383     
384     ptp4l[3904475.053]: selected best primary clock fcaf6a.fffe.029708
385     
386     ptp4l[3904475.053]: updating UTC offset to 37
387     
388     ptp4l[3904475.053]: port 1: LISTENING to UNCALIBRATED on RS_SLAVE
389     
390     ptp4l[3904477.029]: primary offset 196 s0 freq -18570 path delay 1109
391     
392     ptp4l[3904478.029]: primary offset 212 s2 freq -18554 path delay 1109
393     
394     ptp4l[3904478.029]: port 1: UNCALIBRATED to SLAVE on
395     MASTER_CLOCK_SELECTED
396     
397     ptp4l[3904479.029]: primary offset 86 s2 freq -18468 path delay 1109
398     
399     ptp4l[3904480.029]: primary offset 23 s2 freq -18505 path delay 1124
400     
401     ptp4l[3904481.029]: primary offset 3 s2 freq -18518 path delay 1132
402     
403     ptp4l[3904482.029]: primary offset -169 s2 freq -18689 path delay 1141
404
405 2.Synchronize local timer clock on O-RU for sample application::
406
407    ./phc2sys -s enp25s0f0 -w -m -R 8
408
409 Example of output::
410
411    ./phc2sys -s enp25s0f0 -w -m -R 8
412    
413    phc2sys[3904510.892]: CLOCK_REALTIME phc offset 343 s0 freq -38967 delay
414    1530
415    
416    phc2sys[3904511.017]: CLOCK_REALTIME phc offset 368 s2 freq -38767 delay
417    1537
418    
419    phc2sys[3904511.142]: CLOCK_REALTIME phc offset 339 s2 freq -38428 delay
420    1534
421    
422    phc2sys[3904511.267]: CLOCK_REALTIME phc offset 298 s2 freq -38368 delay
423    1532
424    
425    phc2sys[3904511.392]: CLOCK_REALTIME phc offset 239 s2 freq -38337 delay
426    1534
427    
428    phc2sys[3904511.518]: CLOCK_REALTIME phc offset 145 s2 freq -38360 delay
429    1530
430    
431    phc2sys[3904511.643]: CLOCK_REALTIME phc offset 106 s2 freq -38355 delay
432    1527
433    
434    phc2sys[3904511.768]: CLOCK_REALTIME phc offset -30 s2 freq -38459 delay
435    1534
436    
437    phc2sys[3904511.893]: CLOCK_REALTIME phc offset -92 s2 freq -38530 delay
438    1530
439    
440    phc2sys[3904512.018]: CLOCK_REALTIME phc offset -173 s2 freq -38639
441    delay 1528
442    
443    phc2sys[3904512.143]: CLOCK_REALTIME phc offset -246 s2 freq -38764
444    delay 1530
445    
446    phc2sys[3904512.268]: CLOCK_REALTIME phc offset -300 s2 freq -38892
447    delay 1532
448
449 3. Modify configs/default.cfg as shown below to run PTP primary on
450 Fronthaul of O-RU::
451
452     diff --git a/configs/default.cfg b/configs/default.cfg
453     
454     old mode 100644
455     
456     new mode 100755
457     
458     index e23dfd7..c9e9d4c
459     
460     --- a/configs/default.cfg
461     
462     +++ b/configs/default.cfg
463     
464     @@ -15,14 +15,14 @@ free_running 0
465     
466     freq_est_interval 1
467     
468     dscp_event 0
469     
470     dscp_general 0
471     
472     -dataset_comparison ieee1588
473     
474     +dataset_comparison G.8275.x
475     
476     G.8275.defaultDS.localPriority 128
477     
478     maxStepsRemoved 255
479     
480     #
481     
482     # Port Data Set
483     
484     #
485     
486     logAnnounceInterval 1
487     
488     -logSyncInterval 0
489     
490     +logSyncInterval -4
491     
492     operLogSyncInterval 0
493     
494     logMinDelayReqInterval 0
495     
496     logMinPdelayReqInterval 0
497     
498     @@ -37,7 +37,7 @@ G.8275.portDS.localPriority 128
499     
500     asCapable auto
501     
502     BMCA ptp
503     
504     inhibit_announce 0
505     
506     -inhibit_pdelay_req 0
507     
508     +#inhibit_pdelay_req 0
509     
510     ignore_source_id 0
511     
512     #
513     
514     # Run time options
515
516 4.Start PTP primary toward O-DU::
517
518    ./ptp4l -f ./configs/default.cfg -2 -i enp175s0f1 –m
519
520 Example of output::
521
522    ./ptp4l -f ./configs/default.cfg -2 -i enp175s0f1 -m
523    
524    ptp4l[3903857.249]: selected /dev/ptp3 as PTP clock
525    
526    ptp4l[3903857.266]: port 1: INITIALIZING to LISTENING on INIT_COMPLETE
527    
528    ptp4l[3903857.267]: port 0: INITIALIZING to LISTENING on INIT_COMPLETE
529    
530    ptp4l[3903863.734]: port 1: LISTENING to MASTER on
531    ANNOUNCE_RECEIPT_TIMEOUT_EXPIRES
532    
533    ptp4l[3903863.734]: selected local clock 3cfdfe.fffe.bd005d as best
534    primary
535    
536    ptp4l[3903863.734]: assuming the main reference role
537
538 5.Synchronize local NIC PTP primary clock to local NIC PTP secondary clock::
539
540    ./phc2sys -c enp175s0f1 -s enp25s0f0 -w -m -R 8
541
542 Example of output::
543
544    ./phc2sys -c enp175s0f1 -s enp25s0f0 -w -m -R 8
545
546    phc2sys[3904600.332]: enp175s0f1 phc offset 2042 s0 freq -2445 delay
547    4525
548    
549    phc2sys[3904600.458]: enp175s0f1 phc offset 2070 s2 freq -2223 delay
550    4506
551    
552    phc2sys[3904600.584]: enp175s0f1 phc offset 2125 s2 freq -98 delay 4505
553    
554    phc2sys[3904600.710]: enp175s0f1 phc offset 1847 s2 freq +262 delay 4518
555    
556    phc2sys[3904600.836]: enp175s0f1 phc offset 1500 s2 freq +469 delay 4515
557    
558    phc2sys[3904600.961]: enp175s0f1 phc offset 1146 s2 freq +565 delay 4547
559    
560    phc2sys[3904601.086]: enp175s0f1 phc offset 877 s2 freq +640 delay 4542
561    
562    phc2sys[3904601.212]: enp175s0f1 phc offset 517 s2 freq +543 delay 4517
563    
564    phc2sys[3904601.337]: enp175s0f1 phc offset 189 s2 freq +370 delay 4510
565    
566    phc2sys[3904601.462]: enp175s0f1 phc offset -125 s2 freq +113 delay 4554
567    
568    phc2sys[3904601.587]: enp175s0f1 phc offset -412 s2 freq -212 delay 4513
569    
570    phc2sys[3904601.712]: enp175s0f1 phc offset -693 s2 freq -617 delay 4519
571    
572    phc2sys[3904601.837]: enp175s0f1 phc offset -878 s2 freq -1009 delay
573    4515
574    
575    phc2sys[3904601.962]: enp175s0f1 phc offset -965 s2 freq -1360 delay
576    4518
577    
578    phc2sys[3904602.088]: enp175s0f1 phc offset -1048 s2 freq -1732 delay
579    4510
580    
581    phc2sys[3904602.213]: enp175s0f1 phc offset -1087 s2 freq -2086 delay
582    4531
583    
584    phc2sys[3904602.338]: enp175s0f1 phc offset -1014 s2 freq -2339 delay
585    4528
586    
587    phc2sys[3904602.463]: enp175s0f1 phc offset -1009 s2 freq -2638 delay
588    4531
589
590 6. On O-DU Install PTP for Linux tools from source code the same way as
591 on O-RU above but no need to apply the patch for msg.c
592
593 7. Start secondary port toward PTP primary from O-RU using the same
594 default_slave.cfg as on O-RU (see above)::
595
596     ./ptp4l -f ./configs/default_slave.cfg -2 -i enp181s0f0 –m
597
598 Example of output::
599
600     ./ptp4l -f ./configs/default_slave.cfg -2 -i enp181s0f0 -m
601     
602     ptp4l[809092.918]: selected /dev/ptp6 as PTP clock
603     
604     ptp4l[809092.934]: port 1: INITIALIZING to LISTENING on INIT_COMPLETE
605     
606     ptp4l[809092.934]: port 0: INITIALIZING to LISTENING on INIT_COMPLETE
607     
608     ptp4l[809092.949]: port 1: new foreign primary 3cfdfe.fffe.bd005d-1
609     
610     ptp4l[809096.949]: selected best primary clock 3cfdfe.fffe.bd005d
611     
612     ptp4l[809096.950]: port 1: LISTENING to UNCALIBRATED on RS_SLAVE
613     
614     ptp4l[809098.363]: port 1: UNCALIBRATED to SLAVE on
615     MASTER_CLOCK_SELECTED
616     
617     ptp4l[809099.051]: rms 38643 max 77557 freq +719 +/- 1326 delay 1905 +/-
618     0
619     
620     ptp4l[809100.051]: rms 1134 max 1935 freq -103 +/- 680 delay 1891 +/- 4
621     
622     ptp4l[809101.051]: rms 453 max 855 freq +341 +/- 642 delay 1888 +/- 0
623     
624     ptp4l[809102.052]: rms 491 max 772 freq +1120 +/- 752 delay 1702 +/- 0
625     
626     ptp4l[809103.052]: rms 423 max 654 freq +1352 +/- 653 delay 1888 +/- 0
627     
628     ptp4l[809104.052]: rms 412 max 579 freq +1001 +/- 672 delay 1702 +/- 0
629     
630     ptp4l[809105.053]: rms 441 max 672 freq +807 +/- 709 delay 1826 +/- 88
631     
632     ptp4l[809106.053]: rms 422 max 607 freq +1353 +/- 636 delay 1702 +/- 0
633     
634     ptp4l[809107.054]: rms 401 max 466 freq +946 +/- 646 delay 1702 +/- 0
635     
636     ptp4l[809108.055]: rms 401 max 502 freq +912 +/- 659
637
638 8. Synchronize local clock on O-DU for sample application or l1
639 application::
640
641     ./phc2sys -s enp181s0f0 -w -m -R 8
642
643 Example of output::
644
645    ./phc2sys -s enp181s0f0 -w -m -R 8
646
647     phc2sys[809127.123]: CLOCK_REALTIME phc offset 675 s0 freq -37379 delay
648     1646
649     
650     phc2sys[809127.249]: CLOCK_REALTIME phc offset 696 s2 freq -37212 delay
651     1654
652     
653     phc2sys[809127.374]: CLOCK_REALTIME phc offset 630 s2 freq -36582 delay
654     1648
655     
656     phc2sys[809127.500]: CLOCK_REALTIME phc offset 461 s2 freq -36562 delay
657     1642
658     
659     phc2sys[809127.625]: CLOCK_REALTIME phc offset 374 s2 freq -36510 delay
660     1643
661     
662     phc2sys[809127.751]: CLOCK_REALTIME phc offset 122 s2 freq -36650 delay
663     1649
664     
665     phc2sys[809127.876]: CLOCK_REALTIME phc offset 34 s2 freq -36702 delay
666     1650
667     
668     phc2sys[809128.002]: CLOCK_REALTIME phc offset -112 s2 freq -36837 delay
669     1645
670     
671     phc2sys[809128.127]: CLOCK_REALTIME phc offset -160 s2 freq -36919 delay
672     1643
673     
674     phc2sys[809128.252]: CLOCK_REALTIME phc offset -270 s2 freq -37077 delay
675     1657
676     
677     phc2sys[809128.378]: CLOCK_REALTIME phc offset -285 s2 freq -37173 delay
678     1644
679     
680     phc2sys[809128.503]: CLOCK_REALTIME phc offset -349 s2 freq -37322 delay
681     1644
682     
683     phc2sys[809128.629]: CLOCK_REALTIME phc offset -402 s2 freq -37480 delay
684     1641
685     
686     phc2sys[809128.754]: CLOCK_REALTIME phc offset -377 s2 freq -37576 delay
687     1648
688     
689     phc2sys[809128.879]: CLOCK_REALTIME phc offset -467 s2 freq -37779 delay
690     1650
691     
692     phc2sys[809129.005]: CLOCK_REALTIME phc offset -408 s2 freq -37860 delay
693     1648
694     
695     phc2sys[809129.130]: CLOCK_REALTIME phc offset -480 s2 freq -38054 delay
696     1655
697     
698     phc2sys[809129.256]: CLOCK_REALTIME phc offset -350 s2 freq -38068 delay
699     1650
700
701 Support in xRAN Library
702 ----------------------------
703
704 The xRAN library provides an API to check whether PTP for Linux is
705 running correctly. There is a function called xran_is_synchronized(). It
706 checks if ptp4l and phc2sys are running in the system by making PMC tool
707 requests for current port state and comparing it with the expected
708 value. This verification should be done before initialization.
709
710 *notes. “SECONDARY” is the only expected value in this release; only a
711 non-primary scenario is supported currently.*
712
713 *notes1. Inclusive language terms were used except for the PTP traces where the source code has 
714 not been updated to support the inclusive language terms yet.*
715
716 .. |image0| image:: media/image3.png
717    :width: 2.52364in
718    :height: 3.77174in
719 .. |image1| image:: media/image8.png
720    :width: 6.258in
721    :height: 1.40538in
722 .. |image2| image:: media/image10.emf
723    :width: 6.18493in
724    :height: 0.53448in
725 .. |image3| image:: media/image15.png
726    :width: 6.27856in
727    :height: 2.672in
728 .. |image4| image:: media/image21.JPG
729    :width: 6.17708in
730    :height: 6.09375in