Anda di halaman 1dari 23

HSR and PRP Redundancy on RT Linux

Part 3: Redundancy and Linux

TI Confidential – NDA Restrictions


Which Operating System on the host for HSR/PRP?
Application
Host Publisher/ Transport Layer
Subsriber Network Layer

Create Duplicate
Duplicate Discard
LRE
Duplicate Duplicate
Discard Discard

Ports TX A RX TX B RX
Which Operating System on the host for HSR/PRP?
Application
Host Publisher/ Transport Layer
Subsriber Network Layer

Create Duplicate
Duplicate Discard
LRE
Duplicate Duplicate
Discard Discard

Ports TX A RX TX B RX
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
Linux architecture
User Space

Linux Kernel

Network Hardware
Focus on application in User Space
IEC61850
User Space Application

Linux Kernel

Network Hardware
Existing Linux network stack – No redundancy
IEC61850
User Space eth2
Application

Linux Kernel Network Stack

Ethernet Driver

Network Hardware port0


Adding a second port for redundancy
IEC61850
User Space eth2 eth3
Application

Linux Kernel Network Stack

Ethernet Driver

Network Hardware port0 port1


Need LRE to handle duplicates
User Space IEC61850 Application LRE eth2 eth3

Linux Kernel Network Stack

Ethernet Driver

Network Hardware port0 port1


Should we duplicate the LRE?
User Space IEC61850 Application LRE eth2 eth3 IEC61850 Application LRE

Linux Kernel Network Stack

Ethernet Driver

Network Hardware port0 port1


Move the LRE lower in the stack
User Space IEC61850 Application LRE IEC61850 Application LRE

Linux Kernel Network Stack

eth-slave-0 eth-slave-1

Ethernet Driver

Network Hardware slave-0 slave-1


Adding a HSR driver to implement protocols
User Space IEC61850 Application IEC61850 Application

Linux Kernel Network Stack

HSR
LRE

eth-slave-0 eth-slave-1

Ethernet Driver

Network Hardware slave-0 slave-1


Adding capability to create a HSR connection
IEC61850
User Space Application iproute2 ip command

Linux Kernel Network Stack netlink socket


hsr0

HSR
LRE

eth-slave-0 eth-slave-1

Ethernet Driver

Network Hardware slave-0 slave-1


Adding packet forward and LRE
IEC61850
User Space Application iproute2 ip command

Linux Kernel Network Stack netlink socket


hsr0

Packet Forward HSR


LRE
Redundancy Sequence
Management Number

eth-slave-0 eth-slave-1

Ethernet Driver

Network Hardware slave-0 slave-1


Creating supervisory packets
IEC61850
User Space Application iproute2 ip command

Linux Kernel Network Stack netlink socket


hsr0

Packet Forward HSR


LRE
Network Supervision Redundancy Sequence
(announcement/check) Management Number

eth-slave-0 eth-slave-1

Ethernet Driver

Network Hardware slave-0 slave-1


Existing HSR Driver
IEC61850
User Space Application iproute2 ip command

Linux Kernel Network Stack netlink socket


hsr0

Packet Forward HSR


LRE
Network Supervision Redundancy Sequence
(announcement/check) Management Number

eth-slave-0 eth-slave-1

Ethernet Driver

Network Hardware slave-0 slave-1


Modifying the HSR driver
Net-SNMP agent (snmpd)
User Space IEC-62439 module iproute2 ip command

Linux Kernel Network Stack netlink socket


hsr0

IEC-62439 MIB Packet Forward HSR


LRE
Network Supervision Redundancy Sequence
(announcement/check) Management Number
Color code
Exists
eth-slave-0 eth-slave-1
Missing

Ethernet Driver

Network Hardware slave-0 slave-1


Adding PRP to the driver
Net-SNMP agent (snmpd)
User Space IEC-62439 module iproute2 ip command

Linux Kernel Network Stack netlink socket


prp0

IEC-62439 MIB Packet Forward HSR


LRE
Network Supervision Redundancy Sequence
(announcement/check) Management Number
Color code
Exists
eth-slave-0 eth-slave-1
Missing

Ethernet Driver

Network Hardware slave-0 slave-1


Adding PRP to the driver
Net-SNMP agent (snmpd)
User Space IEC-62439 module iproute2 ip command

Linux Kernel Network Stack netlink socket


prp0

IEC-62439 MIB Packet Forward

LRE
Network Supervision Redundancy Sequence
(announcement/check) Management Number
Color code
Exists
eth-slave-0 eth-slave-1
Missing

Ethernet Driver

Network Hardware slave-0 slave-1


Minimal changes for PRP
Net-SNMP agent (snmpd)
User Space IEC-62439 module iproute2 ip command

Linux Kernel Network Stack netlink socket


prp0

IEC-62439 MIB Packet Forward HSR


LRE
Network Supervision Redundancy Sequence
(announcement/check) Management Number
Color code
Exists
eth-slave-0 eth-slave-1
Missing

Ethernet Driver

Network Hardware slave-0 slave-1


Why RT Linux?
Net-SNMP agent (snmpd)
User Space IEC-62439 module iproute2 ip command

Linux Kernel Network Stack netlink socket


hsr0/prp0

IEC-62439 MIB Packet Forward HSR


LRE
Network Supervision Redundancy Sequence
(announcement/check) Management Number
Color code
Exists
• More deterministic eth-slave-0 eth-slave-1
Missing
latency to meet
requirements Ethernet Driver

Network Hardware slave-0 slave-1


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