SlideShare une entreprise Scribd logo
1  sur  33
P4 support in ONOS
ONOS/CORD: Trellis and P4
Yi Tseng
2017/09/25
Agenda
!Introduction to P4 and P4Runtime
!P4 support in ONOS
○ Architecture
○ PI Framework
○ Workflow
!Demo!
!P4 Brigade & Fabric.p4
P4, P4Runtime, P4Info
Concepts and workflow
P4
! Open-source domain-specific language (DSL) for programmable data
planes
○ Protocol independent
○ Support many targets: ASICs, FPGAs, NPUs, software switches
○ Field reconfigurable: add/remove capabilities after switches are deployed
! Based on the well known match+action forwarding model
! Many benefits
○ Add new protocols, remove unused ones
○ Telemetry
○ More advanced capabilities (stateful processing, VNF offloading, etc.)
Why?
Old work flow
Hard to code, debug, manage and vendor lock-in!
Read pipeline spec
Develop app
New chip/spec
Discuss with vendor
Need new feature
Something wrong
New work flow
Easy to code, debug, manage!
Develop app
Develop pipeline
New protocol support
New pipeline feature
New control logic
BLACK BOX
WHITE BOX
GRAY BOX
WHITE BOX
Programmable switch architecture
Programmer declares the
headers that should be
recognized and their
order in the packet
Slide courtesy: Vladimir Gurevich, P4_16 Tutorial. P4 Workshop 2017
Programmer defines
the tables (match type,
actions) and the
processing algorithm
Programmer declares
how the output packet
will look on the wire
P416 Portable Switch Architecture (PSA)
https://github.com/p4lang/p4-spec/
target dependent functional blocks
programmable P4 blocks
P4 workflow
Data plane
my_program.p4
arch.p4
P4 Compiler
Target-specific
configuration/binary
Tables Extern
objects
Control plane
LOAD
Manufacturer
supplied
p4c
P4Runtime
BMv2
P4Runtime
! Framework for runtime control of P4 devices
○ Open-source: https://github.com/p4lang/PI
! Developed by the P4 API WG
! Targeted for remote controllers
○ Protobuf + gRPC implementation
! P4 program-independent
○ API doesn’t change with the P4 program
! Enables field-reconfigurability
○ Ability to push new P4 program to the device
Program-independent

control server (gRPC)
HW/SW target

(e.g. BMv2 simple_switch, tofino
chip, etc.)
Remote controller

(e.g. ONOS)
p4runtime.proto
(interface)
Switch
! Defines interaction with entities defined in a P4 program
○ Tables, counters, meters, externs, etc.
! Bidirectional stream channel
○ For packet-ins/outs, mastership updates, etc.
p4runtime.proto
Refers to P4
entities by integer
IDs.
How to get such
IDs?
p4c workflow
!P4Info
○ Captures target-independent P4 program attributes
○ Defines integer IDs for P4 entities, etc.
!Target config
○ P4Info + device-specific configuration

(e.g. BMv2’s JSON, Tofino binary, etc.)
Slide courtesy: S. Abdi, W. Mohsin, Y. Yetim, A. Ghaffarkhah.
P4 Program-Dependent Controller Interface for SDN Applications. P4 Workshop 2017
P4Info example
Slide courtesy: S. Abdi, W. Mohsin, Y. Yetim, A. Ghaffarkhah.
P4 Program-Dependent Controller Interface for SDN Applications. P4 Workshop 2017
P4Runtime example
Slide courtesy: S. Abdi, W. Mohsin, Y. Yetim, A. Ghaffarkhah.
P4 Program-Dependent Controller Interface for SDN Applications. P4 Workshop 2017
P4 support in ONOS
Challenge
! How can we control and configure P4-enabled devices?
! ONOS initially designed around OpenFlow fixed-function dataplane
○ NB abstractions morphed around OpenFlow (e.g. same match/actions)
○ Immutable pipeline
! With P4…
○ Generalized forwarding abstraction (e.g. arbitrary match/actions)
○ Mutable pipeline (devices can support different pipelines in time)
PI Framework
Default
Architecture overview
Pipeline-agnostic

applications
Device (BMv2, Tofino, Smart NICs, NetFPGA etc.)
FlowObjectives
Intents
FlowRules
2 modes of operations:
● Standard match, actions

(i.e. OpenFlow ones)
● Pipeline-specific ones
Flow Rule
Translation Serv.
Pipeconf Serv.
Driver
Core
Events

(packet, topology, etc.)
new
Protocol gRPC Controller
Tofino BMv2
P4Runtime
Pipeconf
(.oar)
Pack together everything needed to:
● Understand a P4 program/pipeline
● Control that pipeline (driver)
● Deploy P4 program to device
Pipeline-aware

application
Future Work
Other devices
P4Runtime
Controller/Client
gNMI
PI model/runtime classes
ONOS PI Framework
!PI = protocol/program/pipeline independent
!Classes(Models), Services, and driver behaviours to
model and control programmable data planes
○ Classes starting with Pi*, e.g. PiPipeconf, PiTableEntry, etc.
!Model-ed around P4 and PSA
○ Define table entries, counters, etc.
!@beta: expect changes
PI Pipeconf
! Pack together data and code necessary to let ONOS:
○ Understand, control, and deploy an arbitrary pipeline
! Provided to ONOS as an application (.oar)
pipeconf.oar
1. Pipeline model
○ Pipeline entities description (i.e. parsed P4 program)
2. Driver behaviors (pipeline-specific)
○ E.g. FlowObjective’s Pipeliner
3. Target-specific extensions
○ E.g. BMv2 JSON, Tofino binary
○ P4Info, needed for P4Runtime’s integer ID-name mapping
Pipeconf registered via PipeconfService → available to all ONOS components
BMv2 Device
Handshaker
Connect device
Open TCP socket to gRPC server
Device discovery
General Device Provider
PI Pipeconf Service
Get pipeconf
Bind pipeconf+device driver
ONOS Core
Device Driver
Pipeconf
Set pipeline config

(BMv2 JSON + P4Info)
BMv2 PI Pipeline
Programmable
Deploy pipeconf
my-pipeconf.oar
Extensions:
BMV2_JSON
P4INFO
REGISTER
DeviceID: bmv2:1
P4Runtime
- Server addr: 192.168.56.1
- Port: 5001
Pipeconf ID: my-pipeconf
Driver: bmv2PUSH
netcfg.json
Flow operations
PI Flow Rule
Translation Serv.
P4Runtime Client
Pipeliner
Pipeline-agnostic

Application
Flow Objective
Serv.
Flow Rule Progr.
Pipeconf-based 3 phase translation:
! Flow Objective → Flow Rule
○ Via Pipeliner
! Flow Rule → PI Table Entry
○ Via PI Pipeline Interpreter
! PI Table Entry to P4Runtime msg
○ Via P4Info
Flow Rules
PI Table Entry
PI Pipeline
Interpreter
ONOS Core
Device Driver
Pipeconf
Pipeline-aware
application
Flow Rule
Serv.
Flow Objectives
P4Runtime proto
messages
P4Info
PI Pipeline Interpreter
! Expose methods to let ONOS “understand” a given P4 program
○ Maps protocol-dependent ONOS constructs to PI entities
! Pipeline-specific driver behavior (included in the pipeconf)
○ P4 program developer need to provide implementation
! Example: flow rule translation
○ Match
■ 1:1 mapping between ONOS criteria and P4 header names
○ Action
■ Problem: P4 allows only one action per table entry, ONOS many
■ E.g. header rewrite + output: 1 action with 2 parameters in P4, 2 actions in ONOS
■ How to map many actions to one? Need interpretation logic (i.e. Java code)!
! Used also for other purposes
○ Map ONOS table integer IDs to names, packet I/O operations, table counters, etc.
Pipeline-aware flow rules
! Match
○ ONOS standard criteria → provided mapping via interpreter
○ PI Criterion → collection of field matches, each one using:
■ P4 header field name (e.g. my_tunnel_header.tunnel_id)
■ Match type (e.g. exact, ternary, LPM)
■ Value/mask (bytes)
! Action
○ ONOS standard instructions → provided mapping via interpreter
○ PI Instruction → specify action using
■ P4 action name (e.g. set_agress_port)
■ Collection of action parameters
● Parameter name (e.g. port_id)
● Parameter value (bytes)
Standard/PI criteria/instructions can be combined together
Packet I/O operations
! Packet-in: packet received at a switch port
encapsulated and sent to the controller
! Packet-out: packet generated at the
controller sent through a switch port
! With P4, encapsulation format defined
by developer → Need interpreter!
P4RuntimeClient
P4Runtime Packet
Provider
BMv2
PacketProgrammable
Inbound Packet
Outbound Packet
PI Packet Operation
PI Pipeline
Interpreter
ONOS Core
Device Driver
Pipeconf
App
Packet Request/Manager Serv.
Example:
@controller_header("packet_in")
header packet_in_header_t {
bit<9> ingress_port;
}
@controller_header("packet_out")
header packet_out_header_t {
bit<9> egress_port;
}
P4Runtime

protobuf msg
P4Info
Packet-in event
Packet-out
Demo!
P4 defined pipeline + ONOS applications
Takeaway
Today ONOS offers capabilities to:
! Store and deploy P4-defined pipelines (PI Pipeconf Service)
! Control pipeline entities (standard ONOS NB APIs)
○ Table entries, counters, packets I/O, etc.
! Support for pipeline-agnostic applications
○ Provided mapping via Interpreter and Pipeliner
! Support pipeline-aware applications (PI Framework)
! Integrate P4 devices into heterogenous networks
○ Control P4, OpenFlow, or Netconf devices through the same high-level APIs
While maintaining high availability, scalability and performance key
characteristics to the ONOS platform
P4 Brigade
Leader:
Carmelo Cascone / ONF
Members:
Andrea Campanella / ONF
Uyen Chau / ONF
Brian O'Connor / ONF
Yi Tseng / ONF, NCTU
Jonghwan Hyun / ONF, POSTEC
Wu Shaoyong / ZTE
Jian Tian / ZTE
Ke Zhiyong / ZTE
Frank Wang / Inspur
Minh Pham / UTS
Tom Tofigh / AT&T
https://wiki.onosproject.org/display/ONOS/P4+brigade
Fabric.p4
Talk: 矽⾕谷開源組織實習經驗談
URL: https://goo.gl/ChJjwf
Thanks!

Contenu connexe

Tendances

Bit Indexed Explicit Replication (BIER)
Bit Indexed Explicit Replication (BIER)Bit Indexed Explicit Replication (BIER)
Bit Indexed Explicit Replication (BIER)APNIC
 
BIRD Routing Daemon
BIRD Routing DaemonBIRD Routing Daemon
BIRD Routing DaemonAPNIC
 
NETCONF Call Home
NETCONF Call Home NETCONF Call Home
NETCONF Call Home ADVA
 
MPLS WC 2014 Segment Routing TI-LFA Fast ReRoute
MPLS WC 2014  Segment Routing TI-LFA Fast ReRouteMPLS WC 2014  Segment Routing TI-LFA Fast ReRoute
MPLS WC 2014 Segment Routing TI-LFA Fast ReRouteBruno Decraene
 
Building DataCenter networks with VXLAN BGP-EVPN
Building DataCenter networks with VXLAN BGP-EVPNBuilding DataCenter networks with VXLAN BGP-EVPN
Building DataCenter networks with VXLAN BGP-EVPNCisco Canada
 
Cilium - BPF & XDP for containers
 Cilium - BPF & XDP for containers Cilium - BPF & XDP for containers
Cilium - BPF & XDP for containersDocker, Inc.
 
Module 4: NETCONF Tutorial
Module 4: NETCONF Tutorial Module 4: NETCONF Tutorial
Module 4: NETCONF Tutorial Tail-f Systems
 
Troubleshooting BGP Juniper Examples
Troubleshooting BGP Juniper ExamplesTroubleshooting BGP Juniper Examples
Troubleshooting BGP Juniper ExamplesSalachudin Emir
 
Access Network Evolution
Access Network Evolution Access Network Evolution
Access Network Evolution Cisco Canada
 
MP BGP-EVPN 실전기술-1편(개념잡기)
MP BGP-EVPN 실전기술-1편(개념잡기)MP BGP-EVPN 실전기술-1편(개념잡기)
MP BGP-EVPN 실전기술-1편(개념잡기)JuHwan Lee
 
802.11r Explained.
802.11r Explained. 802.11r Explained.
802.11r Explained. Ajay Gupta
 
BGP (border gateway routing protocol)
BGP (border gateway routing protocol)BGP (border gateway routing protocol)
BGP (border gateway routing protocol)Netwax Lab
 
Juniper Srx quickstart-12.1r3
Juniper Srx quickstart-12.1r3Juniper Srx quickstart-12.1r3
Juniper Srx quickstart-12.1r3Mohamed Al-Natour
 
netfilter and iptables
netfilter and iptablesnetfilter and iptables
netfilter and iptablesKernel TLV
 
ipv6 mpls by Patrick Grossetete
ipv6 mpls by Patrick Grosseteteipv6 mpls by Patrick Grossetete
ipv6 mpls by Patrick GrosseteteFebrian ‎
 
I pv6 addressing-rg-animated
I pv6 addressing-rg-animatedI pv6 addressing-rg-animated
I pv6 addressing-rg-animatedmasbangkit
 
BGP Flowspec (RFC5575) Case study and Discussion
BGP Flowspec (RFC5575) Case study and DiscussionBGP Flowspec (RFC5575) Case study and Discussion
BGP Flowspec (RFC5575) Case study and DiscussionAPNIC
 
Ccna Commands In 10 Minutes
Ccna Commands In 10 MinutesCcna Commands In 10 Minutes
Ccna Commands In 10 MinutesCCNAResources
 

Tendances (20)

Bit Indexed Explicit Replication (BIER)
Bit Indexed Explicit Replication (BIER)Bit Indexed Explicit Replication (BIER)
Bit Indexed Explicit Replication (BIER)
 
BIRD Routing Daemon
BIRD Routing DaemonBIRD Routing Daemon
BIRD Routing Daemon
 
CCNP ROUTE V7 CH1
CCNP ROUTE V7 CH1CCNP ROUTE V7 CH1
CCNP ROUTE V7 CH1
 
NETCONF Call Home
NETCONF Call Home NETCONF Call Home
NETCONF Call Home
 
MPLS WC 2014 Segment Routing TI-LFA Fast ReRoute
MPLS WC 2014  Segment Routing TI-LFA Fast ReRouteMPLS WC 2014  Segment Routing TI-LFA Fast ReRoute
MPLS WC 2014 Segment Routing TI-LFA Fast ReRoute
 
Building DataCenter networks with VXLAN BGP-EVPN
Building DataCenter networks with VXLAN BGP-EVPNBuilding DataCenter networks with VXLAN BGP-EVPN
Building DataCenter networks with VXLAN BGP-EVPN
 
Cilium - BPF & XDP for containers
 Cilium - BPF & XDP for containers Cilium - BPF & XDP for containers
Cilium - BPF & XDP for containers
 
Module 4: NETCONF Tutorial
Module 4: NETCONF Tutorial Module 4: NETCONF Tutorial
Module 4: NETCONF Tutorial
 
Troubleshooting BGP Juniper Examples
Troubleshooting BGP Juniper ExamplesTroubleshooting BGP Juniper Examples
Troubleshooting BGP Juniper Examples
 
Access Network Evolution
Access Network Evolution Access Network Evolution
Access Network Evolution
 
MP BGP-EVPN 실전기술-1편(개념잡기)
MP BGP-EVPN 실전기술-1편(개념잡기)MP BGP-EVPN 실전기술-1편(개념잡기)
MP BGP-EVPN 실전기술-1편(개념잡기)
 
802.11r Explained.
802.11r Explained. 802.11r Explained.
802.11r Explained.
 
Using Netconf/Yang with OpenDalight
Using Netconf/Yang with OpenDalightUsing Netconf/Yang with OpenDalight
Using Netconf/Yang with OpenDalight
 
BGP (border gateway routing protocol)
BGP (border gateway routing protocol)BGP (border gateway routing protocol)
BGP (border gateway routing protocol)
 
Juniper Srx quickstart-12.1r3
Juniper Srx quickstart-12.1r3Juniper Srx quickstart-12.1r3
Juniper Srx quickstart-12.1r3
 
netfilter and iptables
netfilter and iptablesnetfilter and iptables
netfilter and iptables
 
ipv6 mpls by Patrick Grossetete
ipv6 mpls by Patrick Grosseteteipv6 mpls by Patrick Grossetete
ipv6 mpls by Patrick Grossetete
 
I pv6 addressing-rg-animated
I pv6 addressing-rg-animatedI pv6 addressing-rg-animated
I pv6 addressing-rg-animated
 
BGP Flowspec (RFC5575) Case study and Discussion
BGP Flowspec (RFC5575) Case study and DiscussionBGP Flowspec (RFC5575) Case study and Discussion
BGP Flowspec (RFC5575) Case study and Discussion
 
Ccna Commands In 10 Minutes
Ccna Commands In 10 MinutesCcna Commands In 10 Minutes
Ccna Commands In 10 Minutes
 

Similaire à P4 support in ONOS: How the leading SDN controller enables programmable data planes

P4+ONOS SRv6 tutorial.pptx
P4+ONOS SRv6 tutorial.pptxP4+ONOS SRv6 tutorial.pptx
P4+ONOS SRv6 tutorial.pptxtampham61268
 
OSN days 2019 - Open Networking and Programmable Switch
OSN days 2019 - Open Networking and Programmable SwitchOSN days 2019 - Open Networking and Programmable Switch
OSN days 2019 - Open Networking and Programmable SwitchChun Ming Ou
 
P4_tutorial.pdf
P4_tutorial.pdfP4_tutorial.pdf
P4_tutorial.pdfPramodhN3
 
Banog meetup August 30th, network device property as code
Banog meetup August 30th, network device property as codeBanog meetup August 30th, network device property as code
Banog meetup August 30th, network device property as codeDamien Garros
 
FIWARE Tech Summit - Stream Processing with Kurento Media Server
FIWARE Tech Summit - Stream Processing with Kurento Media ServerFIWARE Tech Summit - Stream Processing with Kurento Media Server
FIWARE Tech Summit - Stream Processing with Kurento Media ServerFIWARE
 
Compiling P4 to XDP, IOVISOR Summit 2017
Compiling P4 to XDP, IOVISOR Summit 2017Compiling P4 to XDP, IOVISOR Summit 2017
Compiling P4 to XDP, IOVISOR Summit 2017Cheng-Chun William Tu
 
P4, EPBF, and Linux TC Offload
P4, EPBF, and Linux TC OffloadP4, EPBF, and Linux TC Offload
P4, EPBF, and Linux TC OffloadOpen-NFP
 
Rina p4 rina workshop
Rina p4   rina workshopRina p4   rina workshop
Rina p4 rina workshopEduard Grasa
 
Programming the Network Data Plane
Programming the Network Data PlaneProgramming the Network Data Plane
Programming the Network Data PlaneC4Media
 
Apache Pulsar Development 101 with Python
Apache Pulsar Development 101 with PythonApache Pulsar Development 101 with Python
Apache Pulsar Development 101 with PythonTimothy Spann
 
ebpf and IO Visor: The What, how, and what next!
ebpf and IO Visor: The What, how, and what next!ebpf and IO Visor: The What, how, and what next!
ebpf and IO Visor: The What, how, and what next!Affan Syed
 
Host Data Plane Acceleration: SmartNIC Deployment Models
Host Data Plane Acceleration: SmartNIC Deployment ModelsHost Data Plane Acceleration: SmartNIC Deployment Models
Host Data Plane Acceleration: SmartNIC Deployment ModelsNetronome
 
Talk Python To Me: Stream Processing in your favourite Language with Beam on ...
Talk Python To Me: Stream Processing in your favourite Language with Beam on ...Talk Python To Me: Stream Processing in your favourite Language with Beam on ...
Talk Python To Me: Stream Processing in your favourite Language with Beam on ...Aljoscha Krettek
 
SFO15-102:ODP Project Update
SFO15-102:ODP Project UpdateSFO15-102:ODP Project Update
SFO15-102:ODP Project UpdateLinaro
 
Application Visibility and Experience through Flexible Netflow
Application Visibility and Experience through Flexible NetflowApplication Visibility and Experience through Flexible Netflow
Application Visibility and Experience through Flexible NetflowCisco DevNet
 
Tech Talk - Konrad Gawda : P4 programming language
Tech Talk - Konrad Gawda : P4 programming languageTech Talk - Konrad Gawda : P4 programming language
Tech Talk - Konrad Gawda : P4 programming languageCodiLime
 
Flink Forward Berlin 2017: Aljoscha Krettek - Talk Python to me: Stream Proce...
Flink Forward Berlin 2017: Aljoscha Krettek - Talk Python to me: Stream Proce...Flink Forward Berlin 2017: Aljoscha Krettek - Talk Python to me: Stream Proce...
Flink Forward Berlin 2017: Aljoscha Krettek - Talk Python to me: Stream Proce...Flink Forward
 
In Network Computing Prototype Using P4 at KSC/KREONET 2019
In Network Computing Prototype Using P4 at KSC/KREONET 2019In Network Computing Prototype Using P4 at KSC/KREONET 2019
In Network Computing Prototype Using P4 at KSC/KREONET 2019Kentaro Ebisawa
 
OpenShift Origin Community Day (Boston) Extending OpenShift Origin: Build You...
OpenShift Origin Community Day (Boston) Extending OpenShift Origin: Build You...OpenShift Origin Community Day (Boston) Extending OpenShift Origin: Build You...
OpenShift Origin Community Day (Boston) Extending OpenShift Origin: Build You...OpenShift Origin
 
OpenShift Origin Community Day (Boston) Writing Cartridges V2 by Jhon Honce
OpenShift Origin Community Day (Boston) Writing Cartridges V2 by Jhon Honce OpenShift Origin Community Day (Boston) Writing Cartridges V2 by Jhon Honce
OpenShift Origin Community Day (Boston) Writing Cartridges V2 by Jhon Honce Diane Mueller
 

Similaire à P4 support in ONOS: How the leading SDN controller enables programmable data planes (20)

P4+ONOS SRv6 tutorial.pptx
P4+ONOS SRv6 tutorial.pptxP4+ONOS SRv6 tutorial.pptx
P4+ONOS SRv6 tutorial.pptx
 
OSN days 2019 - Open Networking and Programmable Switch
OSN days 2019 - Open Networking and Programmable SwitchOSN days 2019 - Open Networking and Programmable Switch
OSN days 2019 - Open Networking and Programmable Switch
 
P4_tutorial.pdf
P4_tutorial.pdfP4_tutorial.pdf
P4_tutorial.pdf
 
Banog meetup August 30th, network device property as code
Banog meetup August 30th, network device property as codeBanog meetup August 30th, network device property as code
Banog meetup August 30th, network device property as code
 
FIWARE Tech Summit - Stream Processing with Kurento Media Server
FIWARE Tech Summit - Stream Processing with Kurento Media ServerFIWARE Tech Summit - Stream Processing with Kurento Media Server
FIWARE Tech Summit - Stream Processing with Kurento Media Server
 
Compiling P4 to XDP, IOVISOR Summit 2017
Compiling P4 to XDP, IOVISOR Summit 2017Compiling P4 to XDP, IOVISOR Summit 2017
Compiling P4 to XDP, IOVISOR Summit 2017
 
P4, EPBF, and Linux TC Offload
P4, EPBF, and Linux TC OffloadP4, EPBF, and Linux TC Offload
P4, EPBF, and Linux TC Offload
 
Rina p4 rina workshop
Rina p4   rina workshopRina p4   rina workshop
Rina p4 rina workshop
 
Programming the Network Data Plane
Programming the Network Data PlaneProgramming the Network Data Plane
Programming the Network Data Plane
 
Apache Pulsar Development 101 with Python
Apache Pulsar Development 101 with PythonApache Pulsar Development 101 with Python
Apache Pulsar Development 101 with Python
 
ebpf and IO Visor: The What, how, and what next!
ebpf and IO Visor: The What, how, and what next!ebpf and IO Visor: The What, how, and what next!
ebpf and IO Visor: The What, how, and what next!
 
Host Data Plane Acceleration: SmartNIC Deployment Models
Host Data Plane Acceleration: SmartNIC Deployment ModelsHost Data Plane Acceleration: SmartNIC Deployment Models
Host Data Plane Acceleration: SmartNIC Deployment Models
 
Talk Python To Me: Stream Processing in your favourite Language with Beam on ...
Talk Python To Me: Stream Processing in your favourite Language with Beam on ...Talk Python To Me: Stream Processing in your favourite Language with Beam on ...
Talk Python To Me: Stream Processing in your favourite Language with Beam on ...
 
SFO15-102:ODP Project Update
SFO15-102:ODP Project UpdateSFO15-102:ODP Project Update
SFO15-102:ODP Project Update
 
Application Visibility and Experience through Flexible Netflow
Application Visibility and Experience through Flexible NetflowApplication Visibility and Experience through Flexible Netflow
Application Visibility and Experience through Flexible Netflow
 
Tech Talk - Konrad Gawda : P4 programming language
Tech Talk - Konrad Gawda : P4 programming languageTech Talk - Konrad Gawda : P4 programming language
Tech Talk - Konrad Gawda : P4 programming language
 
Flink Forward Berlin 2017: Aljoscha Krettek - Talk Python to me: Stream Proce...
Flink Forward Berlin 2017: Aljoscha Krettek - Talk Python to me: Stream Proce...Flink Forward Berlin 2017: Aljoscha Krettek - Talk Python to me: Stream Proce...
Flink Forward Berlin 2017: Aljoscha Krettek - Talk Python to me: Stream Proce...
 
In Network Computing Prototype Using P4 at KSC/KREONET 2019
In Network Computing Prototype Using P4 at KSC/KREONET 2019In Network Computing Prototype Using P4 at KSC/KREONET 2019
In Network Computing Prototype Using P4 at KSC/KREONET 2019
 
OpenShift Origin Community Day (Boston) Extending OpenShift Origin: Build You...
OpenShift Origin Community Day (Boston) Extending OpenShift Origin: Build You...OpenShift Origin Community Day (Boston) Extending OpenShift Origin: Build You...
OpenShift Origin Community Day (Boston) Extending OpenShift Origin: Build You...
 
OpenShift Origin Community Day (Boston) Writing Cartridges V2 by Jhon Honce
OpenShift Origin Community Day (Boston) Writing Cartridges V2 by Jhon Honce OpenShift Origin Community Day (Boston) Writing Cartridges V2 by Jhon Honce
OpenShift Origin Community Day (Boston) Writing Cartridges V2 by Jhon Honce
 

Plus de Yi Tseng

Coscup 2018
Coscup 2018Coscup 2018
Coscup 2018Yi Tseng
 
ONOS intent introduction
ONOS intent introductionONOS intent introduction
ONOS intent introductionYi Tseng
 
JS introduction
JS introductionJS introduction
JS introductionYi Tseng
 
20161119 SDNDS-TW Meetup
20161119 SDNDS-TW Meetup20161119 SDNDS-TW Meetup
20161119 SDNDS-TW MeetupYi Tseng
 
2016 COSCUP ONOS
2016 COSCUP ONOS2016 COSCUP ONOS
2016 COSCUP ONOSYi Tseng
 
2016 COSCUP SDN Introduction
2016 COSCUP SDN Introduction2016 COSCUP SDN Introduction
2016 COSCUP SDN IntroductionYi Tseng
 
Ryu SDN-IP
Ryu SDN-IPRyu SDN-IP
Ryu SDN-IPYi Tseng
 
2016 NCTU P4 Workshop
2016 NCTU P4 Workshop2016 NCTU P4 Workshop
2016 NCTU P4 WorkshopYi Tseng
 
Ryu dynamic loader
Ryu dynamic loaderRyu dynamic loader
Ryu dynamic loaderYi Tseng
 
2015 COSCUP SDN Workshop -- SDN Quick Start
2015 COSCUP SDN Workshop -- SDN Quick Start2015 COSCUP SDN Workshop -- SDN Quick Start
2015 COSCUP SDN Workshop -- SDN Quick StartYi Tseng
 

Plus de Yi Tseng (11)

Coscup 2018
Coscup 2018Coscup 2018
Coscup 2018
 
ONOS intent introduction
ONOS intent introductionONOS intent introduction
ONOS intent introduction
 
JS introduction
JS introductionJS introduction
JS introduction
 
20161119 SDNDS-TW Meetup
20161119 SDNDS-TW Meetup20161119 SDNDS-TW Meetup
20161119 SDNDS-TW Meetup
 
2016 COSCUP ONOS
2016 COSCUP ONOS2016 COSCUP ONOS
2016 COSCUP ONOS
 
2016 COSCUP SDN Introduction
2016 COSCUP SDN Introduction2016 COSCUP SDN Introduction
2016 COSCUP SDN Introduction
 
Ryu SDN-IP
Ryu SDN-IPRyu SDN-IP
Ryu SDN-IP
 
2016 NCTU P4 Workshop
2016 NCTU P4 Workshop2016 NCTU P4 Workshop
2016 NCTU P4 Workshop
 
Ryu dynamic loader
Ryu dynamic loaderRyu dynamic loader
Ryu dynamic loader
 
2015 COSCUP SDN Workshop -- SDN Quick Start
2015 COSCUP SDN Workshop -- SDN Quick Start2015 COSCUP SDN Workshop -- SDN Quick Start
2015 COSCUP SDN Workshop -- SDN Quick Start
 
NSCTF
NSCTFNSCTF
NSCTF
 

Dernier

Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 

Dernier (20)

Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 

P4 support in ONOS: How the leading SDN controller enables programmable data planes

  • 1. P4 support in ONOS ONOS/CORD: Trellis and P4 Yi Tseng 2017/09/25
  • 2. Agenda !Introduction to P4 and P4Runtime !P4 support in ONOS ○ Architecture ○ PI Framework ○ Workflow !Demo! !P4 Brigade & Fabric.p4
  • 4. P4 ! Open-source domain-specific language (DSL) for programmable data planes ○ Protocol independent ○ Support many targets: ASICs, FPGAs, NPUs, software switches ○ Field reconfigurable: add/remove capabilities after switches are deployed ! Based on the well known match+action forwarding model ! Many benefits ○ Add new protocols, remove unused ones ○ Telemetry ○ More advanced capabilities (stateful processing, VNF offloading, etc.)
  • 6. Old work flow Hard to code, debug, manage and vendor lock-in! Read pipeline spec Develop app New chip/spec Discuss with vendor Need new feature Something wrong
  • 7. New work flow Easy to code, debug, manage! Develop app Develop pipeline New protocol support New pipeline feature New control logic
  • 8. BLACK BOX WHITE BOX GRAY BOX WHITE BOX
  • 9. Programmable switch architecture Programmer declares the headers that should be recognized and their order in the packet Slide courtesy: Vladimir Gurevich, P4_16 Tutorial. P4 Workshop 2017 Programmer defines the tables (match type, actions) and the processing algorithm Programmer declares how the output packet will look on the wire
  • 10. P416 Portable Switch Architecture (PSA) https://github.com/p4lang/p4-spec/ target dependent functional blocks programmable P4 blocks
  • 11. P4 workflow Data plane my_program.p4 arch.p4 P4 Compiler Target-specific configuration/binary Tables Extern objects Control plane LOAD Manufacturer supplied p4c P4Runtime BMv2
  • 12. P4Runtime ! Framework for runtime control of P4 devices ○ Open-source: https://github.com/p4lang/PI ! Developed by the P4 API WG ! Targeted for remote controllers ○ Protobuf + gRPC implementation ! P4 program-independent ○ API doesn’t change with the P4 program ! Enables field-reconfigurability ○ Ability to push new P4 program to the device Program-independent
 control server (gRPC) HW/SW target
 (e.g. BMv2 simple_switch, tofino chip, etc.) Remote controller
 (e.g. ONOS) p4runtime.proto (interface) Switch
  • 13. ! Defines interaction with entities defined in a P4 program ○ Tables, counters, meters, externs, etc. ! Bidirectional stream channel ○ For packet-ins/outs, mastership updates, etc. p4runtime.proto Refers to P4 entities by integer IDs. How to get such IDs?
  • 14. p4c workflow !P4Info ○ Captures target-independent P4 program attributes ○ Defines integer IDs for P4 entities, etc. !Target config ○ P4Info + device-specific configuration
 (e.g. BMv2’s JSON, Tofino binary, etc.) Slide courtesy: S. Abdi, W. Mohsin, Y. Yetim, A. Ghaffarkhah. P4 Program-Dependent Controller Interface for SDN Applications. P4 Workshop 2017
  • 15. P4Info example Slide courtesy: S. Abdi, W. Mohsin, Y. Yetim, A. Ghaffarkhah. P4 Program-Dependent Controller Interface for SDN Applications. P4 Workshop 2017
  • 16. P4Runtime example Slide courtesy: S. Abdi, W. Mohsin, Y. Yetim, A. Ghaffarkhah. P4 Program-Dependent Controller Interface for SDN Applications. P4 Workshop 2017
  • 18. Challenge ! How can we control and configure P4-enabled devices? ! ONOS initially designed around OpenFlow fixed-function dataplane ○ NB abstractions morphed around OpenFlow (e.g. same match/actions) ○ Immutable pipeline ! With P4… ○ Generalized forwarding abstraction (e.g. arbitrary match/actions) ○ Mutable pipeline (devices can support different pipelines in time)
  • 19. PI Framework Default Architecture overview Pipeline-agnostic
 applications Device (BMv2, Tofino, Smart NICs, NetFPGA etc.) FlowObjectives Intents FlowRules 2 modes of operations: ● Standard match, actions
 (i.e. OpenFlow ones) ● Pipeline-specific ones Flow Rule Translation Serv. Pipeconf Serv. Driver Core Events
 (packet, topology, etc.) new Protocol gRPC Controller Tofino BMv2 P4Runtime Pipeconf (.oar) Pack together everything needed to: ● Understand a P4 program/pipeline ● Control that pipeline (driver) ● Deploy P4 program to device Pipeline-aware
 application Future Work Other devices P4Runtime Controller/Client gNMI PI model/runtime classes
  • 20. ONOS PI Framework !PI = protocol/program/pipeline independent !Classes(Models), Services, and driver behaviours to model and control programmable data planes ○ Classes starting with Pi*, e.g. PiPipeconf, PiTableEntry, etc. !Model-ed around P4 and PSA ○ Define table entries, counters, etc. !@beta: expect changes
  • 21. PI Pipeconf ! Pack together data and code necessary to let ONOS: ○ Understand, control, and deploy an arbitrary pipeline ! Provided to ONOS as an application (.oar) pipeconf.oar 1. Pipeline model ○ Pipeline entities description (i.e. parsed P4 program) 2. Driver behaviors (pipeline-specific) ○ E.g. FlowObjective’s Pipeliner 3. Target-specific extensions ○ E.g. BMv2 JSON, Tofino binary ○ P4Info, needed for P4Runtime’s integer ID-name mapping Pipeconf registered via PipeconfService → available to all ONOS components
  • 22. BMv2 Device Handshaker Connect device Open TCP socket to gRPC server Device discovery General Device Provider PI Pipeconf Service Get pipeconf Bind pipeconf+device driver ONOS Core Device Driver Pipeconf Set pipeline config
 (BMv2 JSON + P4Info) BMv2 PI Pipeline Programmable Deploy pipeconf my-pipeconf.oar Extensions: BMV2_JSON P4INFO REGISTER DeviceID: bmv2:1 P4Runtime - Server addr: 192.168.56.1 - Port: 5001 Pipeconf ID: my-pipeconf Driver: bmv2PUSH netcfg.json
  • 23. Flow operations PI Flow Rule Translation Serv. P4Runtime Client Pipeliner Pipeline-agnostic
 Application Flow Objective Serv. Flow Rule Progr. Pipeconf-based 3 phase translation: ! Flow Objective → Flow Rule ○ Via Pipeliner ! Flow Rule → PI Table Entry ○ Via PI Pipeline Interpreter ! PI Table Entry to P4Runtime msg ○ Via P4Info Flow Rules PI Table Entry PI Pipeline Interpreter ONOS Core Device Driver Pipeconf Pipeline-aware application Flow Rule Serv. Flow Objectives P4Runtime proto messages P4Info
  • 24. PI Pipeline Interpreter ! Expose methods to let ONOS “understand” a given P4 program ○ Maps protocol-dependent ONOS constructs to PI entities ! Pipeline-specific driver behavior (included in the pipeconf) ○ P4 program developer need to provide implementation ! Example: flow rule translation ○ Match ■ 1:1 mapping between ONOS criteria and P4 header names ○ Action ■ Problem: P4 allows only one action per table entry, ONOS many ■ E.g. header rewrite + output: 1 action with 2 parameters in P4, 2 actions in ONOS ■ How to map many actions to one? Need interpretation logic (i.e. Java code)! ! Used also for other purposes ○ Map ONOS table integer IDs to names, packet I/O operations, table counters, etc.
  • 25. Pipeline-aware flow rules ! Match ○ ONOS standard criteria → provided mapping via interpreter ○ PI Criterion → collection of field matches, each one using: ■ P4 header field name (e.g. my_tunnel_header.tunnel_id) ■ Match type (e.g. exact, ternary, LPM) ■ Value/mask (bytes) ! Action ○ ONOS standard instructions → provided mapping via interpreter ○ PI Instruction → specify action using ■ P4 action name (e.g. set_agress_port) ■ Collection of action parameters ● Parameter name (e.g. port_id) ● Parameter value (bytes) Standard/PI criteria/instructions can be combined together
  • 26. Packet I/O operations ! Packet-in: packet received at a switch port encapsulated and sent to the controller ! Packet-out: packet generated at the controller sent through a switch port ! With P4, encapsulation format defined by developer → Need interpreter! P4RuntimeClient P4Runtime Packet Provider BMv2 PacketProgrammable Inbound Packet Outbound Packet PI Packet Operation PI Pipeline Interpreter ONOS Core Device Driver Pipeconf App Packet Request/Manager Serv. Example: @controller_header("packet_in") header packet_in_header_t { bit<9> ingress_port; } @controller_header("packet_out") header packet_out_header_t { bit<9> egress_port; } P4Runtime
 protobuf msg P4Info Packet-in event Packet-out
  • 27. Demo! P4 defined pipeline + ONOS applications
  • 28. Takeaway Today ONOS offers capabilities to: ! Store and deploy P4-defined pipelines (PI Pipeconf Service) ! Control pipeline entities (standard ONOS NB APIs) ○ Table entries, counters, packets I/O, etc. ! Support for pipeline-agnostic applications ○ Provided mapping via Interpreter and Pipeliner ! Support pipeline-aware applications (PI Framework) ! Integrate P4 devices into heterogenous networks ○ Control P4, OpenFlow, or Netconf devices through the same high-level APIs While maintaining high availability, scalability and performance key characteristics to the ONOS platform
  • 29. P4 Brigade Leader: Carmelo Cascone / ONF Members: Andrea Campanella / ONF Uyen Chau / ONF Brian O'Connor / ONF Yi Tseng / ONF, NCTU Jonghwan Hyun / ONF, POSTEC Wu Shaoyong / ZTE Jian Tian / ZTE Ke Zhiyong / ZTE Frank Wang / Inspur Minh Pham / UTS Tom Tofigh / AT&T https://wiki.onosproject.org/display/ONOS/P4+brigade
  • 32.