Skip to content

Commit c471d5b

Browse files
committed
docs(linux): Add PTP support documentation for HSR and PRP offload
Document PTP synchronization support over HSR and PRP interfaces using the linuxptp-hsr implementation (hsr_prp_v2_plus branch). Add Prerequisites, Running PTP, and Verifying PTP Synchronization subsections to both HSR_Offload.rst and PRP_Offload.rst covering: - Cloning and building linuxptp-hsr - Patching config files with interface names and p2p_dst_mac - Running ptp4l with primary/secondary configs - Verifying sync via master offset values Signed-off-by: MD Danish Anwar <danishanwar@ti.com>
1 parent 6448b30 commit c471d5b

3 files changed

Lines changed: 66 additions & 0 deletions

File tree

source/linux/Foundational_Components/Kernel/Kernel_Drivers/Network/HSR_Offload.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -339,6 +339,11 @@ Example:
339339
340340
# ip maddr del 01:80:c4:00:00:0e dev hsr0.5
341341
342+
.. |PTP_PROTO_FULL| replace:: High-availability Seamless Redundancy (HSR)
343+
.. |PTP_CFG_PREFIX| replace:: hsr
344+
345+
.. include:: _ptp_support.rst
346+
342347
.. rubric:: Performance
343348

344349
This section describes the throughput and CPU usage metrics in the offload case

source/linux/Foundational_Components/Kernel/Kernel_Drivers/Network/PRP_Offload.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -309,6 +309,11 @@ Example:
309309
310310
# ip maddr del 01:80:c4:00:00:0e dev prp0.5
311311
312+
.. |PTP_PROTO_FULL| replace:: Parallel Redundancy Protocol (PRP)
313+
.. |PTP_CFG_PREFIX| replace:: prp
314+
315+
.. include:: _ptp_support.rst
316+
312317
.. rubric:: Performance
313318

314319
This section describes the throughput and CPU usage metrics in the offload case
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
.. rubric:: *PTP Support*
2+
3+
PTP (Precision Time Protocol) synchronization over |PTP_PROTO_FULL| is supported using the
4+
`linuxptp-hsr <https://git.kernel.org/pub/scm/linux/kernel/git/bigeasy/linuxptp-hsr.git>`_
5+
implementation on the ``hsr_prp_v2_plus`` branch.
6+
7+
.. rubric:: Prerequisites
8+
9+
The following will need to be done for each node.
10+
11+
Clone linuxptp-hsr:
12+
13+
.. code-block:: console
14+
15+
git clone https://git.kernel.org/pub/scm/linux/kernel/git/bigeasy/linuxptp-hsr.git
16+
cd linuxptp-hsr
17+
git checkout hsr_prp_v2_plus
18+
19+
Patch the config files with the actual interface names and the P2P destination MAC address:
20+
21+
.. parsed-literal::
22+
23+
sed -i '/^delay_mechanism P2P/a p2p_dst_mac 01:1B:19:00:00:01' configs/|PTP_CFG_PREFIX|-master.cfg configs/|PTP_CFG_PREFIX|-slave.cfg
24+
sed -i 's/^\[eth1\]/[<INTF_A>]/; s/^\[eth2\]/[<INTF_B>]/' configs/|PTP_CFG_PREFIX|-master.cfg configs/|PTP_CFG_PREFIX|-slave.cfg
25+
26+
Build and install:
27+
28+
.. code-block:: console
29+
30+
make && make install
31+
32+
.. rubric:: Running PTP
33+
34+
Set up the interface as described in the Introduction section. On the PTP primary node:
35+
36+
.. parsed-literal::
37+
38+
./ptp4l -f configs/|PTP_CFG_PREFIX|-master.cfg
39+
40+
On each PTP secondary node:
41+
42+
.. parsed-literal::
43+
44+
./ptp4l -f configs/|PTP_CFG_PREFIX|-slave.cfg
45+
46+
.. rubric:: Verifying PTP Synchronization
47+
48+
Inspect the ``master offset`` values in the ptp4l log output to verify PTP synchronization.
49+
50+
Sample ptp4l output showing a synchronized secondary node:
51+
52+
.. code-block:: text
53+
54+
ptp4l[xx.xxx]: master offset -123 s2 freq +4321 path delay 543
55+
ptp4l[xx.xxx]: master offset 45 s2 freq +4290 path delay 541
56+
ptp4l[xx.xxx]: master offset -78 s2 freq +4310 path delay 544

0 commit comments

Comments
 (0)