![Page 1: HSR and PRP Redundancy on RT Linux - TI.com · PDF fileHSR and PRP Redundancy on RT Linux ... Discard . Duplicate Discard . TX . A . RX . Host . LRE . Ports . Duplicate Discard](https://reader034.vdocument.in/reader034/viewer/2022052122/5a9e60b37f8b9a76178b45ea/html5/thumbnails/1.jpg)
TI Confidential – NDA Restrictions
HSR and PRP Redundancy on RT Linux
Part 3: Redundancy and Linux
![Page 2: HSR and PRP Redundancy on RT Linux - TI.com · PDF fileHSR and PRP Redundancy on RT Linux ... Discard . Duplicate Discard . TX . A . RX . Host . LRE . Ports . Duplicate Discard](https://reader034.vdocument.in/reader034/viewer/2022052122/5a9e60b37f8b9a76178b45ea/html5/thumbnails/2.jpg)
Which Operating System on the host for HSR/PRP? Application
Publisher/ Subsriber
Transport Layer Network Layer
B TX RX
Create Duplicate
Duplicate Discard
Duplicate Discard
A TX RX
Host
LRE
Ports
Duplicate Discard
![Page 3: HSR and PRP Redundancy on RT Linux - TI.com · PDF fileHSR and PRP Redundancy on RT Linux ... Discard . Duplicate Discard . TX . A . RX . Host . LRE . Ports . Duplicate Discard](https://reader034.vdocument.in/reader034/viewer/2022052122/5a9e60b37f8b9a76178b45ea/html5/thumbnails/3.jpg)
Application Publisher/ Subsriber
Transport Layer Network Layer
B TX RX
Create Duplicate
Duplicate Discard
Duplicate Discard
A TX RX
Host
LRE
Ports
Duplicate Discard
Which Operating System on the host for HSR/PRP?
![Page 4: HSR and PRP Redundancy on RT Linux - TI.com · PDF fileHSR and PRP Redundancy on RT Linux ... Discard . Duplicate Discard . TX . A . RX . Host . LRE . Ports . Duplicate Discard](https://reader034.vdocument.in/reader034/viewer/2022052122/5a9e60b37f8b9a76178b45ea/html5/thumbnails/4.jpg)
Linux is recognized with networking • Since these applications are networking based, Linux seems like a natural choice
– Allows scale across products and platforms – Reuse common networking stack, applications, tools, scripts, etc.
• Some packet deadlines may require RT Linux • TI-RTOS solutions are also available
![Page 5: HSR and PRP Redundancy on RT Linux - TI.com · PDF fileHSR and PRP Redundancy on RT Linux ... Discard . Duplicate Discard . TX . A . RX . Host . LRE . Ports . Duplicate Discard](https://reader034.vdocument.in/reader034/viewer/2022052122/5a9e60b37f8b9a76178b45ea/html5/thumbnails/5.jpg)
User Space
Linux Kernel
Network Hardware
Linux architecture
![Page 6: HSR and PRP Redundancy on RT Linux - TI.com · PDF fileHSR and PRP Redundancy on RT Linux ... Discard . Duplicate Discard . TX . A . RX . Host . LRE . Ports . Duplicate Discard](https://reader034.vdocument.in/reader034/viewer/2022052122/5a9e60b37f8b9a76178b45ea/html5/thumbnails/6.jpg)
User Space
Linux Kernel
Network Hardware
Focus on application in User Space IEC61850 Application
![Page 7: HSR and PRP Redundancy on RT Linux - TI.com · PDF fileHSR and PRP Redundancy on RT Linux ... Discard . Duplicate Discard . TX . A . RX . Host . LRE . Ports . Duplicate Discard](https://reader034.vdocument.in/reader034/viewer/2022052122/5a9e60b37f8b9a76178b45ea/html5/thumbnails/7.jpg)
User Space
Linux Kernel
Network Hardware
Existing Linux network stack – No redundancy
Ethernet Driver
Network Stack
eth2
port0
IEC61850 Application
![Page 8: HSR and PRP Redundancy on RT Linux - TI.com · PDF fileHSR and PRP Redundancy on RT Linux ... Discard . Duplicate Discard . TX . A . RX . Host . LRE . Ports . Duplicate Discard](https://reader034.vdocument.in/reader034/viewer/2022052122/5a9e60b37f8b9a76178b45ea/html5/thumbnails/8.jpg)
User Space
Linux Kernel
Network Hardware
Adding a second port for redundancy IEC61850 Application
Ethernet Driver
Network Stack
eth2
port0 port1
eth3
![Page 9: HSR and PRP Redundancy on RT Linux - TI.com · PDF fileHSR and PRP Redundancy on RT Linux ... Discard . Duplicate Discard . TX . A . RX . Host . LRE . Ports . Duplicate Discard](https://reader034.vdocument.in/reader034/viewer/2022052122/5a9e60b37f8b9a76178b45ea/html5/thumbnails/9.jpg)
User Space
Linux Kernel
Network Hardware
Need LRE to handle duplicates IEC61850 Application
Ethernet Driver
Network Stack
eth2
port0 port1
eth3 LRE
![Page 10: HSR and PRP Redundancy on RT Linux - TI.com · PDF fileHSR and PRP Redundancy on RT Linux ... Discard . Duplicate Discard . TX . A . RX . Host . LRE . Ports . Duplicate Discard](https://reader034.vdocument.in/reader034/viewer/2022052122/5a9e60b37f8b9a76178b45ea/html5/thumbnails/10.jpg)
User Space
Linux Kernel
Network Hardware
Should we duplicate the LRE? IEC61850 Application
Ethernet Driver
Network Stack
eth2
port0 port1
eth3 LRE IEC61850 Application LRE
![Page 11: HSR and PRP Redundancy on RT Linux - TI.com · PDF fileHSR and PRP Redundancy on RT Linux ... Discard . Duplicate Discard . TX . A . RX . Host . LRE . Ports . Duplicate Discard](https://reader034.vdocument.in/reader034/viewer/2022052122/5a9e60b37f8b9a76178b45ea/html5/thumbnails/11.jpg)
User Space
Linux Kernel
Network Hardware
Move the LRE lower in the stack
Ethernet Driver
eth-slave-0 eth-slave-1
Network Stack
slave-0 slave-1
IEC61850 Application LRE IEC61850 Application LRE
![Page 12: HSR and PRP Redundancy on RT Linux - TI.com · PDF fileHSR and PRP Redundancy on RT Linux ... Discard . Duplicate Discard . TX . A . RX . Host . LRE . Ports . Duplicate Discard](https://reader034.vdocument.in/reader034/viewer/2022052122/5a9e60b37f8b9a76178b45ea/html5/thumbnails/12.jpg)
User Space
Linux Kernel
Network Hardware
Adding a HSR driver to implement protocols
HSR
Ethernet Driver
eth-slave-0 eth-slave-1
Network Stack
slave-0 slave-1
IEC61850 Application IEC61850 Application
LRE
![Page 13: HSR and PRP Redundancy on RT Linux - TI.com · PDF fileHSR and PRP Redundancy on RT Linux ... Discard . Duplicate Discard . TX . A . RX . Host . LRE . Ports . Duplicate Discard](https://reader034.vdocument.in/reader034/viewer/2022052122/5a9e60b37f8b9a76178b45ea/html5/thumbnails/13.jpg)
User Space
Linux Kernel
Network Hardware
Adding capability to create a HSR connection
Ethernet Driver
eth-slave-0 eth-slave-1
Network Stack
slave-0 slave-1
IEC61850 Application iproute2 ip command
netlink socket
hsr0
HSR
LRE
![Page 14: HSR and PRP Redundancy on RT Linux - TI.com · PDF fileHSR and PRP Redundancy on RT Linux ... Discard . Duplicate Discard . TX . A . RX . Host . LRE . Ports . Duplicate Discard](https://reader034.vdocument.in/reader034/viewer/2022052122/5a9e60b37f8b9a76178b45ea/html5/thumbnails/14.jpg)
HSR
User Space
Linux Kernel
Network Hardware
Adding packet forward and LRE iproute2 ip command
netlink socket
Ethernet Driver
Packet Forward
eth-slave-0 eth-slave-1
Network Stack
hsr0
slave-0 slave-1
LRE Sequence Number
Redundancy Management
IEC61850 Application
![Page 15: HSR and PRP Redundancy on RT Linux - TI.com · PDF fileHSR and PRP Redundancy on RT Linux ... Discard . Duplicate Discard . TX . A . RX . Host . LRE . Ports . Duplicate Discard](https://reader034.vdocument.in/reader034/viewer/2022052122/5a9e60b37f8b9a76178b45ea/html5/thumbnails/15.jpg)
HSR
User Space
Linux Kernel
Network Hardware
Creating supervisory packets iproute2 ip command
netlink socket
Ethernet Driver
Packet Forward
eth-slave-0 eth-slave-1
Network Stack
Network Supervision (announcement/check)
hsr0
slave-0 slave-1
LRE Sequence Number
Redundancy Management
IEC61850 Application
![Page 16: HSR and PRP Redundancy on RT Linux - TI.com · PDF fileHSR and PRP Redundancy on RT Linux ... Discard . Duplicate Discard . TX . A . RX . Host . LRE . Ports . Duplicate Discard](https://reader034.vdocument.in/reader034/viewer/2022052122/5a9e60b37f8b9a76178b45ea/html5/thumbnails/16.jpg)
User Space
Linux Kernel
Network Hardware
Existing HSR Driver iproute2 ip command
netlink socket
Ethernet Driver
eth-slave-0 eth-slave-1
Network Stack
hsr0
slave-0 slave-1
IEC61850 Application
HSR Packet Forward
Network Supervision (announcement/check)
LRE Sequence Number
Redundancy Management
![Page 17: HSR and PRP Redundancy on RT Linux - TI.com · PDF fileHSR and PRP Redundancy on RT Linux ... Discard . Duplicate Discard . TX . A . RX . Host . LRE . Ports . Duplicate Discard](https://reader034.vdocument.in/reader034/viewer/2022052122/5a9e60b37f8b9a76178b45ea/html5/thumbnails/17.jpg)
HSR Packet Forward
Network Supervision (announcement/check)
LRE Sequence Number
Redundancy Management
User Space
Linux Kernel
Network Hardware
Modifying the HSR driver
IEC-62439 MIB
iproute2 ip command
netlink socket
Ethernet Driver
eth-slave-0 eth-slave-1
Network Stack
hsr0
slave-0 slave-1
Missing
Exists Color code
Net-SNMP agent (snmpd) IEC-62439 module
![Page 18: HSR and PRP Redundancy on RT Linux - TI.com · PDF fileHSR and PRP Redundancy on RT Linux ... Discard . Duplicate Discard . TX . A . RX . Host . LRE . Ports . Duplicate Discard](https://reader034.vdocument.in/reader034/viewer/2022052122/5a9e60b37f8b9a76178b45ea/html5/thumbnails/18.jpg)
HSR Packet Forward
Network Supervision (announcement/check)
LRE Sequence Number
Redundancy Management
User Space
Linux Kernel
Network Hardware
Adding PRP to the driver
IEC-62439 MIB
iproute2 ip command
netlink socket
Ethernet Driver
eth-slave-0 eth-slave-1
Network Stack
prp0
slave-0 slave-1
Missing
Exists Color code
Net-SNMP agent (snmpd) IEC-62439 module
![Page 19: HSR and PRP Redundancy on RT Linux - TI.com · PDF fileHSR and PRP Redundancy on RT Linux ... Discard . Duplicate Discard . TX . A . RX . Host . LRE . Ports . Duplicate Discard](https://reader034.vdocument.in/reader034/viewer/2022052122/5a9e60b37f8b9a76178b45ea/html5/thumbnails/19.jpg)
User Space
Linux Kernel
Network Hardware
Adding PRP to the driver
IEC-62439 MIB
iproute2 ip command
netlink socket
Ethernet Driver
Packet Forward
eth-slave-0 eth-slave-1
Network Stack
Network Supervision (announcement/check)
prp0
slave-0 slave-1
LRE Sequence Number
Redundancy Management
Missing
Exists Color code
Net-SNMP agent (snmpd) IEC-62439 module
![Page 20: HSR and PRP Redundancy on RT Linux - TI.com · PDF fileHSR and PRP Redundancy on RT Linux ... Discard . Duplicate Discard . TX . A . RX . Host . LRE . Ports . Duplicate Discard](https://reader034.vdocument.in/reader034/viewer/2022052122/5a9e60b37f8b9a76178b45ea/html5/thumbnails/20.jpg)
HSR Packet Forward
Network Supervision (announcement/check)
LRE Sequence Number
Redundancy Management
User Space
Linux Kernel
Network Hardware
Minimal changes for PRP
IEC-62439 MIB
iproute2 ip command
netlink socket
Ethernet Driver
eth-slave-0 eth-slave-1
Network Stack
prp0
slave-0 slave-1
Missing
Exists Color code
Net-SNMP agent (snmpd) IEC-62439 module
![Page 21: HSR and PRP Redundancy on RT Linux - TI.com · PDF fileHSR and PRP Redundancy on RT Linux ... Discard . Duplicate Discard . TX . A . RX . Host . LRE . Ports . Duplicate Discard](https://reader034.vdocument.in/reader034/viewer/2022052122/5a9e60b37f8b9a76178b45ea/html5/thumbnails/21.jpg)
HSR Packet Forward
Network Supervision (announcement/check)
LRE Sequence Number
Redundancy Management
User Space
Linux Kernel
Network Hardware
Why RT Linux?
IEC-62439 MIB
iproute2 ip command
netlink socket
Ethernet Driver
eth-slave-0 eth-slave-1
Network Stack
hsr0/prp0
slave-0 slave-1
Missing
Exists Color code
Net-SNMP agent (snmpd) IEC-62439 module
• More deterministic latency to meet requirements
![Page 22: HSR and PRP Redundancy on RT Linux - TI.com · PDF fileHSR and PRP Redundancy on RT Linux ... Discard . Duplicate Discard . TX . A . RX . Host . LRE . Ports . Duplicate Discard](https://reader034.vdocument.in/reader034/viewer/2022052122/5a9e60b37f8b9a76178b45ea/html5/thumbnails/22.jpg)
Section summary • Given the focus on networking, Linux is a good OS choice • Redundancy requires at least two ports • HSR implementation abstracts two ports to one HSR port implemented lower in the
stack • PRP implementation is very similar • With either implementation, upper software layers (i.e. applications) are abstracted
from details • RT Linux provides more deterministic latencies to meet requirements
![Page 23: HSR and PRP Redundancy on RT Linux - TI.com · PDF fileHSR and PRP Redundancy on RT Linux ... Discard . Duplicate Discard . TX . A . RX . Host . LRE . Ports . Duplicate Discard](https://reader034.vdocument.in/reader034/viewer/2022052122/5a9e60b37f8b9a76178b45ea/html5/thumbnails/23.jpg)
For more information • HSR and PRP on RT Linux Training Series: http://training.ti.com/hsr-prp-rt-linux-training-series
• Sitara Processors Product Overview: http://www.ti.com/sitara
• AM571x Industrial Development Kit (IDK): http://www.ti.com/tool/tmdxidk5718
• AM572x Industrial Development Kit (IDK): http://www.ti.com/tool/tmdxidk5728
• Processor SDK Software Developer Guides: – Linux: http://processors.wiki.ti.com/index.php/Processor_SDK_Linux_Software_Developer’s_Guide – RTOS: http://processors.wiki.ti.com/index.php/Processor_SDK_RTOS_Software_Developer_Guide
• PRP TI Design using TI-RTOS: http://www.ti.com/tool/tidep0054
• HSR TI Design using TI-RTOS: http://www.ti.com/tool/tidep0053
• For questions regarding topics covered in this training, visit the Sitara Processors support forum at the TI E2E Community website: https://e2e.ti.com/support/arm/sitara_arm/f/791