Skip to content

Commit bb4c632

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 bb4c632

5 files changed

Lines changed: 83 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: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -339,6 +339,12 @@ Example:
339339
340340
# ip maddr del 01:80:c4:00:00:0e dev hsr0.5
341341
342+
.. ifconfig:: CONFIG_part_variant in ('AM64X')
343+
344+
.. rubric:: *PTP Support*
345+
346+
For PTP support over HSR, see :ref:`hsr-prp-ptp`.
347+
342348
.. rubric:: Performance
343349

344350
This section describes the throughput and CPU usage metrics in the offload case
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
.. _hsr-prp-ptp:
2+
3+
=======================
4+
HSR and PRP PTP support
5+
=======================
6+
7+
The `linuxptp-hsr <https://git.kernel.org/pub/scm/linux/kernel/git/bigeasy/linuxptp-hsr.git>`_
8+
implementation on the ``hsr_prp_v2_plus`` branch supports PTP (Precision Time Protocol)
9+
synchronization over High-availability Seamless Redundancy (HSR) and Parallel Redundancy
10+
Protocol (PRP) interfaces.
11+
12+
In the following commands, replace ``<proto>`` with ``hsr`` or ``prp`` as appropriate.
13+
14+
.. rubric:: Prerequisites
15+
16+
Complete the following steps on 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. The config files use INI-style sections where ``[eth1]`` and ``[eth2]``
28+
denote the two physical interfaces. The first command appends the ``p2p_dst_mac``
29+
key (destination MAC for P2P delay-request messages) into the
30+
``[delay_mechanism P2P]`` section. The second command replaces the ``[eth1]`` and
31+
``[eth2]`` section headers with the actual interface names:
32+
33+
.. code-block:: console
34+
35+
sed -i '/^delay_mechanism P2P/a p2p_dst_mac 01:1B:19:00:00:01' configs/<proto>-master.cfg configs/<proto>-slave.cfg
36+
sed -i 's/^\[eth1\]/[<INTF_A>]/; s/^\[eth2\]/[<INTF_B>]/' configs/<proto>-master.cfg configs/<proto>-slave.cfg
37+
38+
Build and install:
39+
40+
.. code-block:: console
41+
42+
make && make install
43+
44+
.. rubric:: Running PTP
45+
46+
Set up the HSR or PRP interface as described in the respective offload documentation.
47+
On the PTP primary node:
48+
49+
.. code-block:: console
50+
51+
./ptp4l -f configs/<proto>-master.cfg
52+
53+
On each PTP secondary node:
54+
55+
.. code-block:: console
56+
57+
./ptp4l -f configs/<proto>-slave.cfg
58+
59+
.. rubric:: Verifying PTP synchronization
60+
61+
Inspect the ``master offset`` values in the ptp4l log output to verify PTP synchronization.
62+
63+
Sample ptp4l output showing a synchronized secondary node:
64+
65+
.. code-block:: text
66+
67+
ptp4l[xx.xxx]: master offset -123 s2 freq +4321 path delay 543
68+
ptp4l[xx.xxx]: master offset 45 s2 freq +4290 path delay 541
69+
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: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -309,6 +309,12 @@ Example:
309309
310310
# ip maddr del 01:80:c4:00:00:0e dev prp0.5
311311
312+
.. ifconfig:: CONFIG_part_variant in ('AM64X')
313+
314+
.. rubric:: *PTP Support*
315+
316+
For PTP support over PRP, see :ref:`hsr-prp-ptp`.
317+
312318
.. rubric:: Performance
313319

314320
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)