Skip to content

Commit 609c1a7

Browse files
committed
docs(linux): Add PTP support documentation for HSR and PRP offload
Add a new standalone page HSR_PRP_PTP.rst documenting PTP synchronization support for HSR and PRP interfaces using the linuxptp-hsr implementation (hsr_prp_v2_plus branch). The page covers: - 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 HSR_Offload.rst and PRP_Offload.rst each get a brief PTP Support section with a cross-reference to the new page. HSR_PRP_PTP.rst is added to the toctree in Foundational_Components_Kernel_Drivers.rst. Signed-off-by: MD Danish Anwar <danishanwar@ti.com>
1 parent 6448b30 commit 609c1a7

5 files changed

Lines changed: 75 additions & 0 deletions

File tree

configs/AM64X/AM64X_linux_toc.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ linux/Foundational_Components/Kernel/Kernel_Drivers/Network/CPSW-IET
6464
linux/Foundational_Components/Kernel/Kernel_Drivers/Network/CPSW-TSN-Tuning
6565
linux/Foundational_Components/Kernel/Kernel_Drivers/Network/NETCONF-YANG
6666
linux/Foundational_Components/Kernel/Kernel_Drivers/Network/HSR_PRP_Non_Offload
67+
linux/Foundational_Components/Kernel/Kernel_Drivers/Network/HSR_PRP_PTP
6768
linux/Foundational_Components/Kernel/Kernel_Drivers/Network/HSR_Offload
6869
linux/Foundational_Components/Kernel/Kernel_Drivers/Network/PRP_Offload
6970
linux/Foundational_Components/Kernel/Kernel_Drivers/SPI

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -339,6 +339,10 @@ Example:
339339
340340
# ip maddr del 01:80:c4:00:00:0e dev hsr0.5
341341
342+
.. rubric:: *PTP Support*
343+
344+
For PTP support over HSR, see :ref:`hsr-prp-ptp`.
345+
342346
.. rubric:: Performance
343347

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

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -309,6 +309,10 @@ Example:
309309
310310
# ip maddr del 01:80:c4:00:00:0e dev prp0.5
311311
312+
.. rubric:: *PTP Support*
313+
314+
For PTP support over PRP, see :ref:`hsr-prp-ptp`.
315+
312316
.. rubric:: Performance
313317

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

source/linux/Foundational_Components_Kernel_Drivers.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ Kernel Drivers
2929
Foundational_Components/Kernel/Kernel_Drivers/Network/HSR_PRP_Non_Offload
3030
Foundational_Components/Kernel/Kernel_Drivers/Network/HSR_Offload
3131
Foundational_Components/Kernel/Kernel_Drivers/Network/PRP_Offload
32+
Foundational_Components/Kernel/Kernel_Drivers/Network/HSR_PRP_PTP
3233
Foundational_Components/Kernel/Kernel_Drivers/Network/CPSW-Ethernet
3334
Foundational_Components/Kernel/Kernel_Drivers/Network/CPSW2g
3435
Foundational_Components/Kernel/Kernel_Drivers/Network/NETCONF-YANG

0 commit comments

Comments
 (0)