Share
Embed
Transcript
27 slides
-
ONOS Support for P4 Runtime Phil Huang 黃秉鈞 Edgecore Networks
Solution Engineer / [email protected] ONF CORD Ambassador / [email protected] Global Network Technology Conference 2017, Beijing, China, Nov. 28, 2017 -
2 黃秉鈞 Phil Huang • Member of ONF Ambassador Steering
Team • Edgecore Networks Solution Engineer • SDNDS-TW Co-Founder Ref: https://www.linkedin.com/in/phil-huang-09b09895/ ONF: Open Networking Foundation -
“Nearly 40% of all end-customers will have service provided by
… CORD by mid-2021” Roz Roseboro Heavy Reading ONF – A Track Record of Impact Leading Open Source SDN Controller for Operators * https://www.opennetworking.org/news-and-events/press-releases/open-networking-foundation-onf-completes-metamorphosis-focus-open-source-solutions/ Operator Led Consortium -
ONOS – SDN Controller Northbound API Distributed Core (state management,
notifications, high-availability & scale-out) Southbound Core API Protocols Providers Protocols Providers Protocols Providers Protocols Providers Apps Apps -
ONOS Core Subsystems - Overview Device Link Host Topology Flow
Rule Path Packet Statistics Intent Application Leadership Messaging Storage Region Mastership Driver Group Security Flow Objective Event OpenFlow P4 Runtime NETCONF Core Cluster . . . Proxy ARP Mobility L2 Forwarding Network Cfg. SDN IP / BGP Packet / Optical Tunnel . . . OSGi / Apache Karaf Network Virt. Device Cfg. Config UI Extension Graph Discovery Tenant . . . REST API gRPC CLI GUI . . . External Apps Ref: https://docs.google.com/presentation/d/11Fyx3cegTl8U_vEzk1tgmctKOdp_NxbmqB43zc1FMVw/edit#slide=id.p3 -
ONOS Core Subsystems – Focus on P4 Device Link Host
Topology Flow Rule Path Packet Statistics Intent Application Leadership Messaging Storage Region Mastership Driver Group Security Flow Objective Event OpenFlow P4 Runtime NETCONF Core Cluster . . . Proxy ARP Mobility L2 Forwarding Network Cfg. SDN IP / BGP myTunnel Tunnel . . . OSGi / Apache Karaf Network Virt. Device Cfg. Config UI Extension Graph Discovery Tenant . . . REST API gRPC CLI GUI . . . External Apps Ref: https://docs.google.com/presentation/d/11Fyx3cegTl8U_vEzk1tgmctKOdp_NxbmqB43zc1FMVw/edit#slide=id.p3 -
Programmable (or fixed) data plane pipeline Fixed-function data plane pipeline
JUST WHAT I NEED A COMPLEX PIPELINE THAT DOES EVERYTHING ...different vendors in their own way Application Application OpenFlow Table management Table { match actions } P4 program Packets P4 Runtime Table management Packets Variations in data plane pipelines are hard to abstract P4 enables custom pipelines to meet application needs P4 Runtime allows custom pipelines to be loaded and controlled P4 Runtime compile gRPC P4 Runtime –Why choose P4? -
Programmable data plane pipeline Fixed-function data plane pipeline P4 Runtime
–The values of programmable or non-programmable JUST WHAT I NEED A COMPLEX PIPELINE THAT DOES EVERYTHING ...different vendors in their own way Application Application OpenFlow Table Management Table { match actions } P4 program Packets P4 Runtime Table Management Packets Requires tweaks for variations in forwarding pipelines P4 Runtime is of value even if the data plane is not programmable P4 can be used to unambiguously describe any pipeline P4 Runtime Agent compile gRPC 2 1 -
Programmable Switch Architecture Programmer declares the headers that should be
recognized and their order in the packet Programmer defines the tables (match type, actions) and the processing algorithm Programmable ALUs with computational capabilities and stateful memories Ref: p4.org -
P4 Packet Processing Language • Domain-specific language to specify packet
forwarding behaviors • Open source consortium: P4.org • Hardware agnostic, can be compiled to programmable ASICs, FPGAs, NPUs, etc. • Value as a description language for fixed-function devices 11 header ethernet_t { bit<48> dst_addr; bit<48> src_addr; ... header ipv4_t { bit<4> version; bit<4> ihl; bit<8> diffserv; … parser parser_impl(packet_in pkt, out headers_t hdr) { /* Parser state machine */ } action set_next_hop(bit<48> dst_addr) { ethernet.dst_addr = dst_addr; ipv4.ttl = ipv4.ttl - 1; } ... table ip_table { key = { ipv4.dst_addr : LPM; } actions = { set_next_hop(); drop(); send_to_ctrl(); } size = 4096; } Example P4 code -
P4 Runtime Takeaways • Program-independent API § API doesn’t change
with the P4 program § No need to restart the control-plane with a different P4 program • Device does not need to be fully programmable § Can be used on fixed-function devices § Provided that their behavior can be expressed in P4 • Protobuf-based format § Well-supported serialization format in many languages § Supported by many RPC frameworks, e.g., gRPC 12 Control plane p4runtime.proto (API) Program-independent server (e.g. gRPC) Target driver P4 target Ref: https://github.com/p4lang/PI -
P4 Workflow 13 P4 Program P4 Compiler Configuration binary Control
Plane Data Plane Tables Extern objects Load P4-enabled switch Vendor supplied User supplied Add/remove table entries CPU port Packet-in/out Extern control P4 Runtime -
P4 support in ONOS 14 Default drivers Pipeline-agnostic applications Device
(Tofino, BMv2, etc.) PD APIs Flow Rule Flow Objectives Intents PI APIs Pipeline-specific entities PD-to-PI translation serv. (flow rule, groups, etc.) Driver Core Events (Packet, Topology, etc.) Protocol gRPC Tofino BMv2 P4Runtime gNMI Pipeline-aware application Future Work Other drivers Other protocols P4info, bin, JSON Pipeconf Store PI models (table, match, actions, groups, counters, etc.) PI Framework PD = protocol-dependent PI = protocol-independent Pipeconf (.oar) -
Use Case: P4-Based CORD Fabric ONF / Barefoor / Google
/ Edgecore at Layer 123, Holland 15 -
fabric.p4: P4-based CORD Fabric • Goal: bring more heterogeneity in
the CORD fabric with P4 silicon § e.g. Barefoot Tofino, or any other vendor that offers a P4 compiler • Short-term - P4-based underlay (Spring 2018) § Design a P4 pipeline (fabric.p4) that is equivalent to the OF-DPA one § Use fabric.p4 as a drop-in replacement for the current Trellis underlay • Do NOT change the ONOS application programming the pipeline • Long-term - offload x86 processing to fabric § P4-based overlay, i.e. move VXLAN handling from OVS to the ASIC § CORD VNFs offloading 16 -
fabric.p4: Where we are today • Prototype P4 code and
ONOS driver for fabric.p4 (pipeliner) 17 -
Demo at Layer 123 SDN NFV World Congress 2017 18
Ref: https://www.facebook.com/groups/sdnds.tw/permalink/1535253503207160/ The first open source version of Leaf-Spine fabric ECMP based on P4 Runtime -
Live Demo of P4 Runtime • Applications can bring their
own P4 pipelines • ONOS run P4 Runtime to § Manage Leaf-spine fabric § Support data plane pipeline configuration • Download P4 program via P4 runtime § Manipulate downloaded pipeline tables to manage traffic • Via P4 Runtime protobuf definitions carried over gRPC • Google’s ”tor.p4” used as P4 program § Pipeline definition • Demonstrated on 2 switch types § BMv2 software switch & Barefoot Tofino hardware switches 19 Protobuf: Protocol Buffers – Google’s data interchange format -
tor.p4 P4 Runtime h1 h2 Edgecore Wedge100BF-32X 20 P4 on
ONOS Demo Layer 123 SDN NFV World Congress 2017 Video! https://youtu.be/BE_y-Sz0WnQ Edgecore Wedge100BF-65X Edgecore Wedge100BF-65X Edgecore Wedge100BF-32X -
Looking Forward - Beyond the Demo • Next Steps: §
Switch configuration via OpenConfig over gNMI § Extend P4 Runtime support to other switch vendors/ASICs § Support for new/existing ONOS applications with any P4 program • Done via manual ONOS-to-P4 mapping • Longer-Term Scope: § Ability to understand P4 programs (automatic ONOS-to-P4 mapping) § Rethink Northbound API to enable the full potential of P4 § New Use Cases • In-band Network Telemetry (INT) • Leaf-Spine Fabric Optimization • VNF Offloading gNMI: gRPC Network Management Interface -
ONF Vision for leveraging a P4 Enabled Data Plane Virtualization
is more than a VNF Monolithic VNFs Ports of legacy systems to x86 Failed to deliver the hoped for economics -
ONF Vision for leveraging a P4 Enabled Data Plane Virtualization
is more than a VNF Monolithic VNFs Ports of legacy systems to x86 Micro-Services Functions disaggregated and cloud agility achieved Economic crossover starts to be achieved Failed to deliver the hoped for economics -
ONF Vision for leveraging a P4 Enabled Data Plane Virtualization
is more than a VNF Monolithic VNFs Ports of legacy systems to x86 Micro-Services Functions disaggregated and cloud agility achieved Micro-Services (x86) blended with P4 Enabled Flow-Services Portions of services are run in the data plane to achieve speed and scale 100x performance improvements possible pushing functionality into programmable data plane Economic crossover starts to be achieved Failed to deliver the hoped for economics -
Come Join the Community • P4 Brigade within ONOS Project
▪ Wiki - https://wiki.onosproject.org/display/ONOS/P4+brigade • P4.org ▪ P4 API Working Group: http://p4lang.github.io/p4-spec/docs/P4_API_WG_charter.html P4 Brigade Working Session, Sept 2017, Seoul, South Korea