Case Study of P4 applying to CAN (Control Area Network) data pre-processing using FPGA + Netcope P4 compiler.
Presented at KSC / KREONET WORKSHOP 2019 | DAY 1 Session 1: SDN/NFV/P4
http://www.ksc2019.re.kr/
Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...
In Network Computing Prototype Using P4 at KSC/KREONET 2019
1. KREONET WORKSHOP 2019
In Network Computing
Prototype Using P4
Kentaro Ebisawa, Principal Researcher
Toyota Motor Corporation
InfoTech, Connected Advanced Development Div.
KREONET WORKSHOP 2019 | DAY 1 Session 1: SDN/NFV/P4
2. KREONET WORKSHOP 2019DAY 1 Session 1: SDN/NFV/P4 | In Network Computing Prototype using P4 (Toyota Motor Corporation)
https://www.linkedin.com/in/ebiken/
Future Network Technology
for Connected Cars Data Center
(Analytics Platform)
Mobile
Network
Fixed Line
Access
Edge
Computing
5G/4G WiFi
Future Mobile Protocol
In Network Computing
3. KREONET WORKSHOP 2019DAY 1 Session 1: SDN/NFV/P4 | In Network Computing Prototype using P4 (Toyota Motor Corporation)
Mobility Service Platform (MSPF)
https://global.toyota/en/detail/14097157 | Oct. 31, 2016
Toyota to Establish Car-Sharing and Other Mobility Services Platform
Announces Collaboration with U.S. Car-Sharing Company - Getaround
4. KREONET WORKSHOP 2019DAY 1 Session 1: SDN/NFV/P4 | In Network Computing Prototype using P4 (Toyota Motor Corporation)
Mobility Service Platform (MSPF)
https://global.toyota/en/detail/14097157 | Oct. 31, 2016
Toyota to Establish Car-Sharing and Other Mobility Services Platform
Announces Collaboration with U.S. Car-Sharing Company - Getaround(*) Y2016 : 100s K vehicles x 10s of MB per vehicle per month
Growing Data ... More than x1000 by 2025
x10 per vehicle, x100 of vehicles (*)
5. KREONET WORKSHOP 2019DAY 1 Session 1: SDN/NFV/P4 | In Network Computing Prototype using P4 (Toyota Motor Corporation)
CAN (Controller Area Network)
Data Center via DCM
Renesas Electronics: In-Vehicle Networking Solutions
https://www.renesas.com/jp/en/solutions/automotive/technology/networking-solutions.html
6. KREONET WORKSHOP 2019DAY 1 Session 1: SDN/NFV/P4 | In Network Computing Prototype using P4 (Toyota Motor Corporation)
CPU Evolution Trend
Karl Rupp “40 Years of Microprocessor Trend Data”
https://www.karlrupp.net/2015/06/40-years-of-microprocessor-trend-data/
7. KREONET WORKSHOP 2019DAY 1 Session 1: SDN/NFV/P4 | In Network Computing Prototype using P4 (Toyota Motor Corporation)
Necessity of Domain Specific Architecture
Hennessy and David Patterson Deliver Turing Lecture at ISCA 2018
https://www.acm.org/hennessy-patterson-turing-lecture
“A New Golden Age for Computer Architecture:
Domain-Specific Hardware/Software Co-Design,
Enhanced Security, Open Instruction Sets, and Agile Chip Development,”
8. KREONET WORKSHOP 2019DAY 1 Session 1: SDN/NFV/P4 | In Network Computing Prototype using P4 (Toyota Motor Corporation)
Domain Specific Processors (Examples)
Reference: https://www.barefootnetworks.com/technology/
9. KREONET WORKSHOP 2019
P4 Source Code
Dataplane
runtime
P4 Compiler
P4 Dataplane
Control-plane
(protocol agents)
Target
API definition
Ref:P4_16 v1.0.0 Figure 2. Programming a target with P4.
DAY 1 Session 1: SDN/NFV/P4 | In Network Computing Prototype using P4 (Toyota Motor Corporation)
P4 ... Programming Language focused in Packet Processing
P4 Source Code
Definition of packet processing pipeline
Header Parser, Match Action Table, etc.
P4 Compiler
Compile P4 program to executables running on the Target
Provided per Target
Target (P4 Dataplane)
Process packets based on P4 Dataplane runtime
Hardware: ASIC, NPU, FPGA | Software: CPU
“Programming Protocol-Independent Packet Processors”
https://p4.org/
ASIC, NPU, FPGA
10. KREONET WORKSHOP 2019
CAN data processing offload using
P4 Compiler + FPGA SmartNIC
In Network Computing using P4
DAY 1 Session 1: SDN/NFV/P4 | In Network Computing Prototype using P4 (Toyota Motor Corporation)
11. KREONET WORKSHOP 2019DAY 1 Session 1: SDN/NFV/P4 | In Network Computing Prototype using P4 (Toyota Motor Corporation)
CAN data decoder (prototype)
Programmable Switch
Match: Model + Field ID
Action: Translate Value
Match: Model + Field ID
Action: Translate Value
. . .
. . .
. . .
decoded DATA
(Byte Aligned)
Original DATA
from vehicle
Stream Processing (decoding) bit aligned to byte aligned data
a
b
c
d
e
f
g
Model
…. ….
c’f’ a’b’d’e’g’
Model
12. KREONET WORKSHOP 2019DAY 1 Session 1: SDN/NFV/P4 | In Network Computing Prototype using P4 (Toyota Motor Corporation)
Comparison of Platforms
Different Data format per Model, and
decoding logic per Model + Field ID
Problem : Difficulty to write high speed packet processing logic using HDL
ASIC NPU FPGA
Throughput ~6.4Tbps ~100Gbps ~200Gbps
Ease to add translation logic (#1) × 〇 ◎
Ease to expand Table size (#2) × △ 〇 (#1) P4 Extern
(#2) Memory & Lookup Logic
13. KREONET WORKSHOP 2019
Problem : Difficulty to write high speed packet processing logic using HDL
DAY 1 Session 1: SDN/NFV/P4 | In Network Computing Prototype using P4 (Toyota Motor Corporation)
RTL design
(Verilog/VHDL)
Verification
(simulation)
Synthesis
Place and Route
Timing Verification
Standard
FPGA
development
flow
14. KREONET WORKSHOP 2019DAY 1 Session 1: SDN/NFV/P4 | In Network Computing Prototype using P4 (Toyota Motor Corporation)
Solution : Programming Packet Processing Pipeline using P4
https://www.netcope.com/en/products/netcopep4
Netcope P4 ... An example of P4 compiler for FPGA Targets
15. KREONET WORKSHOP 2019DAY 1 Session 1: SDN/NFV/P4 | In Network Computing Prototype using P4 (Toyota Motor Corporation)
Comparison of development flow
P4 programming
P4 program verification
Synthesis
Place and Route
Timing Verification
Netcope
P4 Cloud
RTL design
(Verilog/VHDL)
Verification
(simulation)
Synthesis
Place and Route
Timing Verification
Standard
FPGA
development
flow
17. KREONET WORKSHOP 2019DAY 1 Session 1: SDN/NFV/P4 | In Network Computing Prototype using P4 (Toyota Motor Corporation)
P4 Program Example ... CAN Data Processing Logic (Pseudo code)
Define CAN format as
header fields
header_type can_metadata_t {
fields {
id_model : 32;
id_type : 32;
timestamp : 64;
}
}
header can_metadata_t can_metadata;
header_type can_base_t {
fields {
id : 12;
len : 4;
}
}
header can_base_t can_base;
...
Header definition
Define Parser for each
CAN field ID
parser parse_udp {
extract(udp);
return select(latest.dstPort) {
UDP_PORT_CAN : parse_can;
default: ingress;
}
}
parser parse_can {
extract(can_metadata);
return parse_can_data;
}
parser parse_can_data {
extract(can_base);
return select(can_base.id) {
0x003 : parse_can_data003;
0x005 : parse_can_data005;
0x007 : parse_can_data007;
...
}
}
Parser definition
Define Action to translate
data for each CAN field ID
action convert_dataXXX() {
// set fixed fields
modify_field(can_cdataXXX.id0, 3);
modify_field(can_cdataXXX.sid0, 0);
modify_field(can_cdataXXX.len0, 4);
// calculate remaining fields
modify_field(can_cdataXXX.val0, val0-4);
modify_field(can_cdataXXX.val1, val1*2);
....
}
....
Action / Table / Control
18. KREONET WORKSHOP 2019DAY 1 Session 1: SDN/NFV/P4 | In Network Computing Prototype using P4 (Toyota Motor Corporation)
Netcope P4 Cloud
Netcope P4 Cloud
P4 to FPGA Compiler
Web Service
Select Target Platform
19. KREONET WORKSHOP 2019DAY 1 Session 1: SDN/NFV/P4 | In Network Computing Prototype using P4 (Toyota Motor Corporation)
Netcope P4 Cloud
Check log files.
Download synthesized firmware.
20. KREONET WORKSHOP 2019DAY 1 Session 1: SDN/NFV/P4 | In Network Computing Prototype using P4 (Toyota Motor Corporation)
Netcope P4 Cloud
21. KREONET WORKSHOP 2019DAY 1 Session 1: SDN/NFV/P4 | In Network Computing Prototype using P4 (Toyota Motor Corporation)
Conclusion
CPU Evolution Trend (End of Moore’s Law)
Domain Specific Processor & Programming Language
P4 Lang specific to Packet Processing becoming more mature
Target specific Development Environment makes it possible
to select the most efficient platform for each use cases
22. KREONET WORKSHOP 2019
Appendix:
Research of In Network Computing
DAY 1 Session 1: SDN/NFV/P4 | In Network Computing Prototype using P4 (Toyota Motor Corporation)
23. KREONET WORKSHOP 2019DAY 1 Session 1: SDN/NFV/P4 | In Network Computing Prototype using P4 (Toyota Motor Corporation)
IRTF Computing in the Network (COIN)
Initial Meeting: IETF 103 Bangkok (2018/11/9)
Wiki: https://trac.ietf.org/trac/irtf/wiki/coin
Mailing List: https://www.irtf.org/mailman/listinfo/coin
https://trac.ietf.org/trac/irtf/attachment/wiki/coin/coin_ietf103_chair_slides%20-%20Finalv3.pptx
24. KREONET WORKSHOP 2019DAY 1 Session 1: SDN/NFV/P4 | In Network Computing Prototype using P4 (Toyota Motor Corporation)
https://dl.acm.org/citation.cfm?doid=3132747.3132764
25. KREONET WORKSHOP 2019
• In-Network Data-Center Computing
• draft-he-coin-datacenter-00
• machine learning, graph analysis, data analytics, map reduce
• In Network Computing Enablers for Extended Reality
• draft-montpetit-coin-xr-02
• Augmented Reality (AR), Virtual Reality (VR), Extended Reality (XR)
• Information Centric Networking (ICN) & NDN
• Network Coding, Smart contracts (block chain)
• Overview of Edge Data Discovery
• draft-mcbride-edge-data-discovery-overview
• Named Data Networking (NDN)
• Content-Centric Networking (CCN)
DAY 1 Session 1: SDN/NFV/P4 | In Network Computing Prototype using P4 (Toyota Motor Corporation)
IRTF Computing in the Network (COIN)