Skip to content

Commit 07ede92

Browse files
feat(linux): Add HSR documentation for AM65x, AM335x, AM437x and AM57x
Add HSR offload and non-offload documentation support for AM65x, AM335x, AM437x and AM57x. Update the hsr scripts to include interface up/down before enabling HSR. Update PRUSS documentation for AM335x, AM437x and AM57x. Signed-off-by: Meghana Malladi <[email protected]>
1 parent e9d4460 commit 07ede92

File tree

7 files changed

+280
-268
lines changed

7 files changed

+280
-268
lines changed

configs/AM335X/AM335X_linux_toc.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ linux/Foundational_Components/Kernel/Kernel_Drivers/GPIO
5757
linux/Foundational_Components/Kernel/Kernel_Drivers/I2C
5858
linux/Foundational_Components/Kernel/Kernel_Drivers/Network/CPSW
5959
linux/Foundational_Components/Kernel/Kernel_Drivers/Network/PRUSS
60+
linux/Foundational_Components/Kernel/Kernel_Drivers/Network/HSR_PRP_Non_Offload
61+
linux/Foundational_Components/Kernel/Kernel_Drivers/Network/HSR_Offload
6062
linux/Foundational_Components/Kernel/Kernel_Drivers/PWM
6163
linux/Foundational_Components/Kernel/Kernel_Drivers/SPI
6264
linux/Foundational_Components/Kernel/Kernel_Drivers/Storage/NAND

configs/AM437X/AM437X_linux_toc.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ linux/Foundational_Components/Kernel/Kernel_Drivers/GPIO
5757
linux/Foundational_Components/Kernel/Kernel_Drivers/I2C
5858
linux/Foundational_Components/Kernel/Kernel_Drivers/Network/CPSW
5959
linux/Foundational_Components/Kernel/Kernel_Drivers/Network/PRUSS
60+
linux/Foundational_Components/Kernel/Kernel_Drivers/Network/HSR_PRP_Non_Offload
61+
linux/Foundational_Components/Kernel/Kernel_Drivers/Network/HSR_Offload
6062
linux/Foundational_Components/Kernel/Kernel_Drivers/PWM
6163
linux/Foundational_Components/Kernel/Kernel_Drivers/QSPI
6264
linux/Foundational_Components/Kernel/Kernel_Drivers/SPI

configs/AM57X/AM57X_linux_toc.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,8 @@ linux/Foundational_Components/Kernel/Kernel_Drivers/I2C
6060
linux/Foundational_Components/Kernel/Kernel_Drivers/Network/CPSW
6161
linux/Foundational_Components/Kernel/Kernel_Drivers/Network/NetCP
6262
linux/Foundational_Components/Kernel/Kernel_Drivers/Network/PRUSS
63+
linux/Foundational_Components/Kernel/Kernel_Drivers/Network/HSR_PRP_Non_Offload
64+
linux/Foundational_Components/Kernel/Kernel_Drivers/Network/HSR_Offload
6365
linux/Foundational_Components/Kernel/Kernel_Drivers/PCIe/PCIe_End_Point
6466
linux/Foundational_Components/Kernel/Kernel_Drivers/PCIe/PCIe_Root_Complex
6567
linux/Foundational_Components_Power_Management

configs/AM65X/AM65X_linux_toc.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ linux/Foundational_Components/Kernel/Kernel_Drivers/I2C
5656
linux/Foundational_Components/Kernel/Kernel_Drivers/Network/CPSW2g
5757
linux/Foundational_Components/Kernel/Kernel_Drivers/Network/CPSW-EST
5858
linux/Foundational_Components/Kernel/Kernel_Drivers/Network/CPSW-IET
59+
linux/Foundational_Components/Kernel/Kernel_Drivers/Network/HSR_PRP_Non_Offload
60+
linux/Foundational_Components/Kernel/Kernel_Drivers/Network/HSR_Offload
5961
linux/Foundational_Components/Kernel/Kernel_Drivers/PCIe/PCIe_End_Point
6062
linux/Foundational_Components/Kernel/Kernel_Drivers/PCIe/PCIe_Root_Complex
6163
linux/Foundational_Components/Kernel/Kernel_Drivers/PWM

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

Lines changed: 27 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@ HSR Offload
44

55
.. rubric:: **Introduction**
66

7-
HSR framework in linux allows offloading below functionalities to the
7+
HSR (High-availability Seamless Redundancy) framework in linux allows offloading below functionalities to the
88
device
99
hsr-fwd-offload: For forwarding HSR frames one port to another i.e port-to-port
1010
forwarding
1111

1212
hsr-dup-offload: Duplicate the outgoing HSR frame
1313

14-
The ICSSG HSR firmware supports port-to-port forwarding, Tx packet duplication
15-
and this allows to offload these capabilities from HSR driver in software to the PRU-ICSSG.
14+
The (Programmable Real-time Unit and Industrial Communication Subsystem) PRU-ICSS HSR firmware supports port-to-port forwarding, Tx packet duplication
15+
and this allows to offload these capabilities from HSR driver in software to the PRU subsystem.
1616

1717
To enable offloading using below commands
1818
To enable port-to-port offload
@@ -29,10 +29,11 @@ To enable Tx packet duplication
2929
ethtool -K <interface> hsr-dup-offload on
3030
3131
.. note::
32-
The ICSSG HSR firmware is designed to always carry out port-to-port
33-
forwarding. So whenever any of the HSR features are to be offloaded, the
34-
port-to-port forwarding must also be offloaded. It is not possible to offload
35-
only Tx packet duplication functionality.
32+
33+
The ICSS HSR firmware always run with port-to-port forwarding.
34+
So whenever any of the HSR features are to be offloaded, the port-to-port
35+
forwarding must also be offloaded. It is not possible to offload
36+
only transmission (Tx) packet duplication functionality.
3637

3738
The below script sets up an HSR interface with the port-to-port
3839
forwarding and Tx packet duplication offloaded
@@ -70,8 +71,12 @@ forwarding and Tx packet duplication offloaded
7071
echo "slave-a=$ifa"
7172
echo "slave-b=$ifb"
7273
73-
ip link set hsr0 down
74-
ip link delete hsr0 2> /dev/null
74+
ip link set $if down
75+
ip link delete $if 2> /dev/null
76+
77+
ip link set $ifa down
78+
ip link set $ifb down
79+
sleep 1
7580
7681
if [ "$1" = "hsr_hw" ]
7782
then
@@ -99,6 +104,9 @@ forwarding and Tx packet duplication offloaded
99104
100105
ip addr add "$ip"/24 dev $if
101106
ip link set $if up
107+
ip link set $ifa up
108+
ip link set $ifb up
109+
sleep 1
102110
103111
To create HSR interface with IP address 192.168.2.20 using eth1 and eth2,
104112
run the script by passing the arguments as below
@@ -400,12 +408,15 @@ CPU usage at Node B found to be negligible
400408
0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 100.00
401409
1 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 100.00
402410
403-
.. rubric:: Througput at Node A
411+
.. ifconfig:: CONFIG_part_variant in ('AM64X', 'AM65X')
412+
413+
.. rubric:: Througput at Node A
414+
415+
.. list-table:: Throughput performance
416+
:widths: 25 25
404417

405-
.. list-table:: Throughput performance
406-
:widths: 25 25
418+
* - Sender
419+
- Receiver
420+
* - 505 Mbits/sec
421+
- 504 Mbits/sec
407422

408-
* - Sender
409-
- Receiver
410-
* - 505 Mbits/sec
411-
- 504 Mbits/sec

0 commit comments

Comments
 (0)