24
1 Crash Farming and Gang Programming over Ethernet: Old Concepts Meet New Challenges Tools and Techniques in Managing Address Conflicts Associated with Parallel Testing and Flashing of Identical Ethernet Devices IEEE-SA Ethernet & IP @ Automotive Technology Day September 24 th , 2019 John Simon, Product & Applications Manager

Crash Farming and Gang Programming over Ethernet: Old ... · Old Concepts Meet New Challenges Tools and Techniques in Managing Address Conflicts Associated with Parallel Testing and

  • Upload
    others

  • View
    4

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Crash Farming and Gang Programming over Ethernet: Old ... · Old Concepts Meet New Challenges Tools and Techniques in Managing Address Conflicts Associated with Parallel Testing and

1

Crash Farming and Gang Programming over Ethernet:Old Concepts Meet New Challenges

Tools and Techniques in Managing Address Conflicts Associated with Parallel Testing and Flashing of Identical Ethernet Devices

IEEE-SA Ethernet & IP @ Automotive Technology DaySeptember 24th, 2019

John Simon,Product & Applications Manager

Page 2: Crash Farming and Gang Programming over Ethernet: Old ... · Old Concepts Meet New Challenges Tools and Techniques in Managing Address Conflicts Associated with Parallel Testing and

2

2019 IEEE-SA Ethernet & IP @ Automotive Technology Day

Agenda• Background• What is a Crash Farm?• Gang Programming and its similarities• Ideal vs. Practical Solutions• Summary & Conclusions

Page 3: Crash Farming and Gang Programming over Ethernet: Old ... · Old Concepts Meet New Challenges Tools and Techniques in Managing Address Conflicts Associated with Parallel Testing and

3

2019 IEEE-SA Ethernet & IP @ Automotive Technology Day

Background

• Reproducing the fault can be incredibly time consuming

• Resets/Reboots• Application Crashes• Memory Leaks/Corruption• Deadlocks• Power Moding Issues

• Limited quantity and access to complete vehicle systems

Despite all the lessons learned, the most talented engineers, disciplined processes, and today’s incredible development tools……The most elusive defects will likely be found late in Product Development.

• All the easy bugs have been fixed!• Growing Sample Size• System Integration• Feature Creep• Unintended Use Cases• Inherent Compulsion to Push

Boundaries

Page 4: Crash Farming and Gang Programming over Ethernet: Old ... · Old Concepts Meet New Challenges Tools and Techniques in Managing Address Conflicts Associated with Parallel Testing and

4

2019 IEEE-SA Ethernet & IP @ Automotive Technology Day

“Crash Farm”?

ECUECU

ECUECU

Server FarmECU

Crash Farm

ECU

Reset App Crash

No-Wake

Deadlock

No-Sleep

Page 5: Crash Farming and Gang Programming over Ethernet: Old ... · Old Concepts Meet New Challenges Tools and Techniques in Managing Address Conflicts Associated with Parallel Testing and

5

2019 IEEE-SA Ethernet & IP @ Automotive Technology Day

What is a Crash Farm?

• Power Mode Cycles (Full/Interrupted)• No Boot• No Sleep• Loss of Function• Time Variance

• Robustness & Stability Tests• High CPU Loading• High Memory Usage• Any Abusive Test Imaginable

• Use Case Specific• Memory Leaks• Rogue Driver/DMA• Application Crash• System Reset

• Proactive Use• Bootloader/Kernel Changes• Part Substitutions• Regression Testing

A Crash Farm does not necessarily emulate an entire system

Target specific sequences of events or use cases

Page 6: Crash Farming and Gang Programming over Ethernet: Old ... · Old Concepts Meet New Challenges Tools and Techniques in Managing Address Conflicts Associated with Parallel Testing and

6

2019 IEEE-SA Ethernet & IP @ Automotive Technology Day

Gang Programming

Gang Programmer

ECU

ECU ECUECUECU

ECUECUECU

ECU

Programming Master

Gang Programming

1 2 3 4 5 6 7 8 90

ECU

Page 7: Crash Farming and Gang Programming over Ethernet: Old ... · Old Concepts Meet New Challenges Tools and Techniques in Managing Address Conflicts Associated with Parallel Testing and

7

2019 IEEE-SA Ethernet & IP @ Automotive Technology Day

Crash Farm / Gang Programming TopologyECU

192.168.1.10002:FC:00:00:00:AA

ECU192.168.1.100

02:FC:00:00:00:AA

ECU192.168.1.100

02:FC:00:00:00:AA

ECU192.168.1.100

02:FC:00:00:00:AA

ECU192.168.1.100

02:FC:00:00:00:AA

Test Application 192.168.1.200

02:FC:70:00:00:FFTCPUDPDOIPSOME I/PAVB/TSN

12345

0

Test Application• Address each ECU individually• Distinguish responses from multiple ECUs• Emulate other devices with fixed MAC/IP

AutomagicalDevice

Ideal Solution• No Programming / Simple Configuration• Minimal Cost• Minimal impact to test app development

(no special API)

Identical ECUs• Address

Conflicts• Will not

respond to arbitrary address

Page 8: Crash Farming and Gang Programming over Ethernet: Old ... · Old Concepts Meet New Challenges Tools and Techniques in Managing Address Conflicts Associated with Parallel Testing and

8

2019 IEEE-SA Ethernet & IP @ Automotive Technology Day

Gang Programming Current Implementation vs. Potential

12x 100BASE-T1 Interface

ETH01

Reflash Management

TCP/IPPrg Mstr IP

ETH #12

API

Programming Master

Instance #12

Programming Master

Instance #1

TCP/IPPrg Mstr IP

ECU #12

ECU IP

ECU #1

ECU IP

Automagical Device

ETH01

TCP/IP

ETH #12

Programming Master

ECU #12

ECU IP

ECU #1

ECU IP

Current Implementation Potential Implementation

Address ConflictsAddress Conflicts

Prg Mstr IP

• Fixed IP address for Programming Master

• Multiple NICs / Single IP Address

• Drives independent application and stack for each NIC

Page 9: Crash Farming and Gang Programming over Ethernet: Old ... · Old Concepts Meet New Challenges Tools and Techniques in Managing Address Conflicts Associated with Parallel Testing and

9

2019 IEEE-SA Ethernet & IP @ Automotive Technology Day

Low Tech: MUX

Switch

ECU192.168.1.100

02:FC:00:00:00:AA

ECU192.168.1.100

02:FC:00:00:00:AA

ECU192.168.1.100

02:FC:00:00:00:AA

ECU192.168.1.100

02:FC:00:00:00:AA

ECU192.168.1.100

02:FC:00:00:00:AA

Test Application 192.168.1.200

02:FC:70:00:00:FF

Address Conflicts

12345

0

Disadvantages• Cannot monitor continuously• Potential unintended behavior

• Link changing states• Loss of communication

Possible Implementations• Mechanical Relays• Solid State MUX• Switch with dynamic Port Based VLAN

Page 10: Crash Farming and Gang Programming over Ethernet: Old ... · Old Concepts Meet New Challenges Tools and Techniques in Managing Address Conflicts Associated with Parallel Testing and

10

2019 IEEE-SA Ethernet & IP @ Automotive Technology Day

Switch

Switch: UDP Inbound to ECUECU

192.168.1.10002:FC:00:00:00:AA

ECU192.168.1.100

02:FC:00:00:00:AA

ECU192.168.1.100

02:FC:00:00:00:AA

ECU192.168.1.100

02:FC:00:00:00:AA

ECU192.168.1.100

02:FC:00:00:00:AA

Test Application 192.168.1.200

02:FC:70:00:00:FF

Address Conflicts

12345

0UDPPort 100

UDPPort 100

UDPPort 100

UDPPort 100

UDPPort 100

UDPPort 100

One to Many = No Conflicts

Page 11: Crash Farming and Gang Programming over Ethernet: Old ... · Old Concepts Meet New Challenges Tools and Techniques in Managing Address Conflicts Associated with Parallel Testing and

11

2019 IEEE-SA Ethernet & IP @ Automotive Technology Day

Switch

Switch: UDP Inbound to Test ApplicationECU

192.168.1.10002:FC:00:00:00:AA

ECU192.168.1.100

02:FC:00:00:00:AA

ECU192.168.1.100

02:FC:00:00:00:AA

ECU192.168.1.100

02:FC:00:00:00:AA

ECU192.168.1.100

02:FC:00:00:00:AA

Test Application 192.168.1.200

02:FC:70:00:00:FF

Address Conflicts

12345

0

UDPPort 100

UDPPort 100

UDPPort 100

UDPPort 100

VID AVID BVID CVID DVID E

Use VLANs to differentiate UDP streamsUDP

Port 100

UDPPort 100

UDPPort 100

UDPPort 100

UDPPort 100

UDPPort 100

UDPPort 100

UDPPort 100

UDPPort 100

UDPPort 100

UDPPort 100

(VID = VLAN ID)

Many to One = Conflicts

Not adequate to resolve conflicts for TCP

Page 12: Crash Farming and Gang Programming over Ethernet: Old ... · Old Concepts Meet New Challenges Tools and Techniques in Managing Address Conflicts Associated with Parallel Testing and

12

2019 IEEE-SA Ethernet & IP @ Automotive Technology Day

Switch

Network Address TranslationECU

192.168.1.10002:FC:00:00:00:AA

ECU192.168.1.100

02:FC:00:00:00:AA

ECU192.168.1.100

02:FC:00:00:00:AA

ECU192.168.1.100

02:FC:00:00:00:AA

ECU192.168.1.100

02:FC:00:00:00:AA

Test Application 192.168.1.200

02:FC:70:00:00:FF

Address Conflicts

12345

0

RouterUnique IP/MAC

Router

Router

Router

Router

No AVB/TSN

172.16.1.10101:FC:00:00:00:01

Router

172.16.1.10301:FC:00:00:00:03

172.16.1.10201:FC:00:00:00:02

172.16.1.10401:FC:00:00:00:04

172.16.1.10501:FC:00:00:00:05

Works for anything running on top of IP• TCP/UDP• DOIP• SOME I/P• Higher Layer Protocols

MediaConv

MediaConv

MediaConv

MediaConv

MediaConv

( + ) x = $$$Router MediaConv # ECUs

Page 13: Crash Farming and Gang Programming over Ethernet: Old ... · Old Concepts Meet New Challenges Tools and Techniques in Managing Address Conflicts Associated with Parallel Testing and

13

2019 IEEE-SA Ethernet & IP @ Automotive Technology Day

Switch

Switch with GatewayECU

192.168.1.10002:FC:00:00:00:AA

ECU192.168.1.100

02:FC:00:00:00:AA

ECU192.168.1.100

02:FC:00:00:00:AA

ECU192.168.1.100

02:FC:00:00:00:AA

ECU192.168.1.100

02:FC:00:00:00:AA

Address Conflicts

12345

0

6

Gateway Script (NAT)

Test Application 192.168.1.200

02:FC:70:00:00:FF

Bottleneck

Remove bottleneck by bringing the script into an onboard embedded processor.

AVB/TSN

PC

Page 14: Crash Farming and Gang Programming over Ethernet: Old ... · Old Concepts Meet New Challenges Tools and Techniques in Managing Address Conflicts Associated with Parallel Testing and

14

2019 IEEE-SA Ethernet & IP @ Automotive Technology Day

Switch

Switch with Embedded GatewayECU

192.168.1.10002:FC:00:00:00:AA

ECU192.168.1.100

02:FC:00:00:00:AA

ECU192.168.1.100

02:FC:00:00:00:AA

ECU192.168.1.100

02:FC:00:00:00:AA

ECU192.168.1.100

02:FC:00:00:00:AA

Test Application 192.168.1.200

02:FC:70:00:00:FF

Address Conflicts

12345

0 6

Sound complicated? It doesn’t need to be….

Look Familiar?

Gateway Script (NAT)

Page 15: Crash Farming and Gang Programming over Ethernet: Old ... · Old Concepts Meet New Challenges Tools and Techniques in Managing Address Conflicts Associated with Parallel Testing and

15

2019 IEEE-SA Ethernet & IP @ Automotive Technology Day

Switch

Gateway Script for the Switch(NAT with a Twist)

ECU192.168.1.100

02:FC:00:00:00:AA

ECU192.168.1.100

02:FC:00:00:00:AA

ECU192.168.1.100

02:FC:00:00:00:AA

ECU192.168.1.100

02:FC:00:00:00:AA

ECU192.168.1.100

02:FC:00:00:00:AA

Test Application 192.168.1.200

02:FC:70:00:00:FF

Address Conflicts

12345

0 6

If VID = A, B, C, D, or EInsert Unique MAC/IPChange VID = F

If (VID = F) && (Source IP = Test App)Change VID based on dest IPInsert Original ECU MAC/IP

VID AVID BVID CVID DVID E

VID F

Script performs NAT1. Scripts sets Egress port

using VID2. TCAM forwards frame

based on VID

All INGRESS forwarded to script1. VLAN Tags indicate origin2. TCAM forwards to script (Port 6)

Simple Config Table • Tester IDs• ECU IDs• Unique IDs for each port

Gateway Script (NAT)

Page 16: Crash Farming and Gang Programming over Ethernet: Old ... · Old Concepts Meet New Challenges Tools and Techniques in Managing Address Conflicts Associated with Parallel Testing and

16

2019 IEEE-SA Ethernet & IP @ Automotive Technology Day

Can we eliminate the switch?

Active Tap (Independent Port Config)

Gateway with Active TapECU

192.168.1.10002:FC:00:00:00:AA

ECU192.168.1.100

02:FC:00:00:00:AA

ECU192.168.1.100

02:FC:00:00:00:AA

ECU192.168.1.100

02:FC:00:00:00:AA

ECU192.168.1.100

02:FC:00:00:00:AA

Test Application 192.168.1.200

02:FC:70:00:00:FF

Address Conflicts

1

2

3

4

5

0

Gateway ScriptInsert Unique MAC/IP #1

Set Egress Port by Unique IPReplace ECU MAC/IP

Insert Unique MAC/IP #2

Insert Unique MAC/IP #3

Insert Unique MAC/IP #4

Insert Unique MAC/IP #5Simple Config Table • Tester IDs• ECU IDs• Unique IDs for each port

Logging precision with timestamps

AVB/TSN

Page 17: Crash Farming and Gang Programming over Ethernet: Old ... · Old Concepts Meet New Challenges Tools and Techniques in Managing Address Conflicts Associated with Parallel Testing and

17

2019 IEEE-SA Ethernet & IP @ Automotive Technology Day

Other Scripting Details• Checksums

• Layer 2: Done in Hardware• Layer 3: IP Checksum

• Only covers IP header• Surgical change like this is as simple

as adding an offset• Could be done by gateway stack

• Layer 4: TCP Checksum• Dependent on some content of the IP

Header (Pseudo Header)• Changing IP addresses can be as

simple as adding an offset• Obvious performance cost for having

to recalculate the TCP checksum. (includes payload)

• ARP: Easy to script proper responses (if needed)

• Other Protocols• Not difficult in layers 3 and below (TCP

checksum is for entire payload)• Layer 2 protocols may require

manipulating multiple addresses and IDs in header.

Page 18: Crash Farming and Gang Programming over Ethernet: Old ... · Old Concepts Meet New Challenges Tools and Techniques in Managing Address Conflicts Associated with Parallel Testing and

18

2019 IEEE-SA Ethernet & IP @ Automotive Technology Day

Test Setup

1

n

01000BASE-T

ECU #1

ECU #n

NAT/Gateway

• neoECU AVB/TSN• i.MX6Q• Linux 4.1.15• 100BASE-T1

• iPerf 3 Server• IP: 192.168.1.100• MAC: 02:FC:00:00:00:AA

• neoECU AVB/TSN• i.MX6Q• Linux 4.1.15• 1000BASE-T

• iPerf 3 Clients• 1x TCP Socket/ECU• IP: 192.168.1.200• MAC: 02:FC:00:00:00:FF

Test/Programming ApplicationECUs

100B

ASE-

T1

Page 19: Crash Farming and Gang Programming over Ethernet: Old ... · Old Concepts Meet New Challenges Tools and Techniques in Managing Address Conflicts Associated with Parallel Testing and

19

2019 IEEE-SA Ethernet & IP @ Automotive Technology Day

Test Configurations 1 & 2

5x ECUs

1. Switch w/ PC Gateway• Samsung Notebook 9

• Intel i7-7500U• Windows 10

• 5-Port 100BASE-T1 Switch (RAD-Jupiter)• Vehicle Spy 3.9.1 / Gateway Builder

(Beta)• 5x ECUs

2. Switch w/ Embedded Gateway• 5-Port 100BASE-T1 Switch (RAD-Pluto)• Vehicle Spy 3.9.1 / Gateway Builder

(Beta)• 5x ECUs

Switch

Test App

PC GatewaySSH to Test App

1000BASE-T

100BASE-T1

Page 20: Crash Farming and Gang Programming over Ethernet: Old ... · Old Concepts Meet New Challenges Tools and Techniques in Managing Address Conflicts Associated with Parallel Testing and

20

2019 IEEE-SA Ethernet & IP @ Automotive Technology Day

Test Configuration 3

3. Active Tap w/ Embedded Gateway• Vehicle Spy 3.9.1 / Gateway Builder

(Beta)• RAD-Galaxy (12 Independent Ports)• 10x ECUs

10x ECUs

Active Tap

Test App

SSH to Test App

1000BASE-T

100BASE-T1

Page 21: Crash Farming and Gang Programming over Ethernet: Old ... · Old Concepts Meet New Challenges Tools and Techniques in Managing Address Conflicts Associated with Parallel Testing and

21

2019 IEEE-SA Ethernet & IP @ Automotive Technology Day

Performance Summary

Note 1 : Point to point testing (no gateway) demonstrated ~94 Mbps

Note 2: A memory bottleneck was identified in the FPGA the Active Tap of ~130 Mbps aggregate bandwidth across all channels. This bottleneck was resolved, but not merged with beta release in time for revised testing for this presentation.

Switch + Embedded Gateway(RAD-Jupiter)

~350 µS 8 3.8 2.3 1.8 1.4 -- -- -- -- --

Active Tap + Embedded Gateway(RAD-Galaxy)

~60 µS 94(Note 1)

67(Note 2)

44 33 26 22 18 16 14 13

1x ECU 2x ECU 3x ECU 4x ECU 5x ECU 6x ECU 7x ECU 8x ECU 9x ECU 10x ECUSwitch + PC Gateway

(RAD-Jupiter)1.5-2 mS 3.2 1.3 Unstable -- -- -- -- -- -- --

Gateway Latency

TCP Max Bandwidth (Mbps)

Page 22: Crash Farming and Gang Programming over Ethernet: Old ... · Old Concepts Meet New Challenges Tools and Techniques in Managing Address Conflicts Associated with Parallel Testing and

22

2019 IEEE-SA Ethernet & IP @ Automotive Technology Day

Topology Summary

Note 1: A switch supporting gPTP can only be connected to a single Grand Master

Note 2: Depends on scripting environment (Configuration Table vs. Coding)

UDP TCPAVB/TSN

gPTPPrec.

TstampLatency

Agg BW(Mbps)

Cost Complexity Notes

MUX Y Y N N N Low $ LowNot continuousDrops link and/or com

Switch + PC Gateway(RAD-Jupiter)

Y Y Y Y (note 1)

NToo High

~3 $$ Low-High(note 2)

Script BottleneckPC Performance Dependent

Switch + Embedded Gateway(RAD-Jupiter)

Y Y Y Y (note 1)

N High ~8 $$ Low-High(note 2)

Less compromises

Active Tap + Embedded Gateway(RAD-Galaxy)

Y Y Y Y Y MedToday ~130Q4-19 >600

$$$$ Low-High(note 2)

Least compromises (at a cost)

Switch Y N N Y (note 1)

N Low Switch Dependent $$ Low Limited to UDP

Router/NAT Y Y N N N Low Switch Dependent $$ Med

No AVB/TSNMedia Converters Add Up $$

Page 23: Crash Farming and Gang Programming over Ethernet: Old ... · Old Concepts Meet New Challenges Tools and Techniques in Managing Address Conflicts Associated with Parallel Testing and

23

2019 IEEE-SA Ethernet & IP @ Automotive Technology Day

Conclusions and Next Steps• There are a variety of methods to manage conflicting ECU addresses

• In Crash Farm testing, define the scope of testing and evaluate tradeoffs to choose the best topology.• Gang Programming,

• Using a Router/Media Converter on each ECU is not the most elegant solution but has best performance.• Switch or Active Tap with Gateway may have sufficient performance, but additional testing would be required.

• The initial plan for a SOME/IP Crash Farm as a proof of concept was too ambitious. • iPerf helped characterize performance to reach the following conclusions.

• A non-embedded gateway adds too much latency to be considered.• An embedded gateway with a switch may be suitable for some applications of limited bandwidth.

• Next Steps• Retest Active Tap with memory bottleneck removed• Interested in finding more realistic use cases

Page 24: Crash Farming and Gang Programming over Ethernet: Old ... · Old Concepts Meet New Challenges Tools and Techniques in Managing Address Conflicts Associated with Parallel Testing and

24

Discover more at www.intrepidcs.com

Or contact us at [email protected]

John Simon,Product & Applications [email protected]

Thank You for Your Interest and Attention