Skip to content

Commit cfd3f5e

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 cfd3f5e

File tree

2 files changed

+110
-0
lines changed

2 files changed

+110
-0
lines changed

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

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -339,6 +339,61 @@ Example:
339339
340340
# ip maddr del 01:80:c4:00:00:0e dev hsr0.5
341341
342+
.. rubric:: *PTP Support*
343+
344+
PTP (Precision Time Protocol) synchronization over HSR (High-availability Seamless Redundancy) is supported using the
345+
`linuxptp-hsr <https://git.kernel.org/pub/scm/linux/kernel/git/bigeasy/linuxptp-hsr.git>`_
346+
implementation on the ``hsr_prp_v2_plus`` branch.
347+
348+
.. rubric:: Prerequisites
349+
350+
Clone and build linuxptp-hsr on each node:
351+
352+
.. code-block:: console
353+
354+
git clone https://git.kernel.org/pub/scm/linux/kernel/git/bigeasy/linuxptp-hsr.git
355+
cd linuxptp-hsr
356+
git checkout hsr_prp_v2_plus
357+
358+
Patch the config files with the actual interface names and the P2P destination MAC address:
359+
360+
.. code-block:: console
361+
362+
sed -i '/^delay_mechanism P2P/a p2p_dst_mac 01:1B:19:00:00:01' configs/hsr-master.cfg configs/hsr-slave.cfg
363+
sed -i 's/^\[eth1\]/[<INTF_A>]/; s/^\[eth2\]/[<INTF_B>]/' configs/hsr-master.cfg configs/hsr-slave.cfg
364+
365+
Build and install:
366+
367+
.. code-block:: console
368+
369+
make && make install
370+
371+
.. rubric:: Running PTP
372+
373+
Set up the interface as described in the Introduction section. On the PTP primary node:
374+
375+
.. code-block:: console
376+
377+
./ptp4l -f configs/hsr-master.cfg
378+
379+
On each PTP secondary node:
380+
381+
.. code-block:: console
382+
383+
./ptp4l -f configs/hsr-slave.cfg
384+
385+
.. rubric:: Verifying PTP Synchronization
386+
387+
Inspect the ``master offset`` values in the ptp4l log output to verify PTP synchronization.
388+
389+
Sample ptp4l output showing a synchronized secondary node:
390+
391+
.. code-block:: text
392+
393+
ptp4l[xx.xxx]: master offset -123 s2 freq +4321 path delay 543
394+
ptp4l[xx.xxx]: master offset 45 s2 freq +4290 path delay 541
395+
ptp4l[xx.xxx]: master offset -78 s2 freq +4310 path delay 544
396+
342397
.. rubric:: Performance
343398

344399
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: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -309,6 +309,61 @@ Example:
309309
310310
# ip maddr del 01:80:c4:00:00:0e dev prp0.5
311311
312+
.. rubric:: *PTP Support*
313+
314+
PTP (Precision Time Protocol) synchronization over PRP (Parallel Redundancy Protocol) is supported using the
315+
`linuxptp-hsr <https://git.kernel.org/pub/scm/linux/kernel/git/bigeasy/linuxptp-hsr.git>`_
316+
implementation on the ``hsr_prp_v2_plus`` branch.
317+
318+
.. rubric:: Prerequisites
319+
320+
Clone and build linuxptp-hsr on each node:
321+
322+
.. code-block:: console
323+
324+
git clone https://git.kernel.org/pub/scm/linux/kernel/git/bigeasy/linuxptp-hsr.git
325+
cd linuxptp-hsr
326+
git checkout hsr_prp_v2_plus
327+
328+
Patch the config files with the actual interface names and the P2P destination MAC address:
329+
330+
.. code-block:: console
331+
332+
sed -i '/^delay_mechanism P2P/a p2p_dst_mac 01:1B:19:00:00:01' configs/prp-master.cfg configs/prp-slave.cfg
333+
sed -i 's/^\[eth1\]/[<INTF_A>]/; s/^\[eth2\]/[<INTF_B>]/' configs/prp-master.cfg configs/prp-slave.cfg
334+
335+
Build and install:
336+
337+
.. code-block:: console
338+
339+
make && make install
340+
341+
.. rubric:: Running PTP
342+
343+
Set up the interface as described above. On the PTP primary node:
344+
345+
.. code-block:: console
346+
347+
./ptp4l -f configs/prp-master.cfg
348+
349+
On the PTP secondary node:
350+
351+
.. code-block:: console
352+
353+
./ptp4l -f configs/prp-slave.cfg
354+
355+
.. rubric:: Verifying PTP Synchronization
356+
357+
Inspect the ``master offset`` values in the ptp4l log output to verify PTP synchronization.
358+
359+
Sample ptp4l output showing a synchronized secondary node:
360+
361+
.. code-block:: text
362+
363+
ptp4l[xx.xxx]: master offset -123 s2 freq +4321 path delay 543
364+
ptp4l[xx.xxx]: master offset 45 s2 freq +4290 path delay 541
365+
ptp4l[xx.xxx]: master offset -78 s2 freq +4310 path delay 544
366+
312367
.. rubric:: Performance
313368

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

0 commit comments

Comments
 (0)