P4: Programming Protocol-Independent Packet Processors

Slides:



Advertisements
Similar presentations
Programming Protocol-Independent Packet Processors
Advertisements

P4: specifying data planes
ENGINEERING WORKSHOP Compute Engineering Workshop P4: specifying data planes Mihai Budiu San Jose, March 11, 2015.
OpenFlow overview Joint Techs Baton Rouge. Classic Ethernet Originally a true broadcast medium Each end-system network interface card (NIC) received every.
Oct 12, 2004CS573: Network Protocols and Standards1 Virtual LANs Network Protocols and Standards Autumn
400 Gb/s Programmable Packet Parsing on a Single FPGA Authors : Michael Attig 、 Gordon Brebner Publisher: 2011 Seventh ACM/IEEE Symposium on Architectures.
Traffic Management - OpenFlow Switch on the NetFPGA platform Chun-Jen Chung( ) SriramGopinath( )
Chapter 9 Classification And Forwarding. Outline.
Jan 10, 2008CS573: Network Protocols and Standards1 Virtual LANs Network Protocols and Standards Winter
Jennifer Rexford Princeton University MW 11:00am-12:20pm Programmable Data Planes COS 597E: Software Defined Networking.
Paper Review Building a Robust Software-based Router Using Network Processors.
What is a Protocol A set of definitions and rules defining the method by which data is transferred between two or more entities or systems. The key elements.
Protocols and the TCP/IP Suite
Traffic Management - OpenFlow Switch on the NetFPGA platform Chun-Jen Chung( ) Sriram Gopinath( )
1 The Internet and Networked Multimedia. 2 Layering  Internet protocols are designed to work in layers, with each layer building on the facilities provided.
ECE 526 – Network Processing Systems Design Networking: protocols and packet format Chapter 3: D. E. Comer Fall 2008.
(Business) Process Centric Exchanges
Chapter 7 Backbone Network. Announcements and Outline Announcements Outline Backbone Network Components  Switches, Routers, Gateways Backbone Network.
Chapter 9 Hardware Addressing and Frame Type Identification 1.Delivering and sending packets 2.Hardware addressing: specifying a destination 3. Broadcasting.
P. Bosshart, D. Daly, G. Gibb, M. Izzard, N. McKeown, J. Rexford, C. Schlesinger, D. Talayco, A. Vahdat, G. Varghese, D. Walker SIGCOMM CCR, 2014 Presented.
Protocol Layering Chapter 11.
OpenFlow MPLS and the Open Source Label Switched Router Department of Computer Science and Information Engineering, National Cheng Kung University, Tainan,
Chapter 7 OSI Data Link Layer.
Computer Communication and Networking Lecture # 4 by Zainab Malik 1.
+ Lecture#2: Ethernet Asma ALOsaimi. + Objectives In this chapter, you will learn to: Describe the operation of the Ethernet sublayers. Identify the major.
Multi-protocol Label Switching
Fabric: A Retrospective on Evolving SDN Presented by: Tarek Elgamal.
VIRTUAL NETWORK PIPELINE PROCESSOR Design and Implementation Department of Communication System Engineering Presented by: Mark Yufit Rami Siadous.
400 Gb/s Programmable Packet Parsing on a Single FPGA Author: Michael Attig 、 Gordon Brebner Publisher: ANCS 2011 Presenter: Chun-Sheng Hsueh Date: 2013/03/27.
COS 561: Advanced Computer Networks
What is a Protocol A set of definitions and rules defining the method by which data is transferred between two or more entities or systems. The key elements.
Introduction to Networks v6.0
Computer Organization and Architecture + Networks
P4 (Programming Protocol-independent Packet Processors)
Instructor Materials Chapter 5: Ethernet
Networking Devices.
Scaling the Network: The Internet Protocol
NOX: Towards an Operating System for Networks
OSI Protocol Stack Given the post man exemple.
NETWORK TOPOLOGIES There are three basic configurations used to connect computers they are the Bus Ring Star.
Layered Architectures
Chapter 4 Data Link Layer Switching
April 28, 2017 SUMIT MAHESHWARI INES UGALDE
VLANs: Virtual Local Area Networks
Chapter 6: Network Layer
Network Administration CNET-443
Switched Multi-megabit Data Service (SMDS)
SDN Overview for UCAR IT meeting 19-March-2014
Protocols and Layering
Chapter 7 Backbone Network
Protocols and the TCP/IP Suite
Software Defined Networking (SDN)
P4-to-VHDL: Automatic Generation of 100 Gbps Packet Parsers
Dynamic Packet-filtering in High-speed Networks Using NetFPGAs
Layered Protocol Wrappers Design and Interface review
Implementing an OpenFlow Switch on the NetFPGA platform
P4FPGA : A Rapid Prototyping Framework for P4
Programmable Networks
Chapter 4 Network Layer Computer Networking: A Top Down Approach 5th edition. Jim Kurose, Keith Ross Addison-Wesley, April Network Layer.
1 Multi-Protocol Label Switching (MPLS). 2 MPLS Overview A forwarding scheme designed to speed up IP packet forwarding (RFC 3031) Idea: use a fixed length.
Network Layer: Control/data plane, addressing, routers
Scaling the Network: The Internet Protocol
Programmable Switches
Project proposal: Questions to answer
Protocols and the TCP/IP Suite
Ch 17 - Binding Protocol Addresses
Design principles for packet parsers
Toward Self-Driving Networks
Toward Self-Driving Networks
Chapter 4: outline 4.1 Overview of Network layer data plane
Presentation transcript:

P4: Programming Protocol-Independent Packet Processors Pat Bosshart, et al. ACM SIGCOMM Computer Communication Review, July 2014

Introduction SDN gives operators programmatic control over networks Common, open, vendor-agnostic interface (e.g., OpenFlow) enables control plane to control forwarding devices from different hardware and software vendors OpenFlow started simple (1.0), with abstraction of single table of rules that could match packets on a dozen header fields → more header fields and multiple stages of rule tables (1.4) DCN deploys software switches to extend with new functionality with new forms of packet encapsulation (new packet format/header fields)

Motivations Need flexible mechanisms for parsing packets and matching header fields → allowing controller applications to leverage these capabilities through a common, open interface Recent chip designs demonstrate that such flexibility can be achieved in custom ASICs at terabit speeds But programming such chips is not easy because each chip has its own microcode programming ➡ Higher-level language for Programming Protocol- independent Packet Processors (P4) [or to configure switches]

P4 vs. OpenFlow raises level of abstraction for programming networks allow controller to tell switches how to operate, rather than be constrained by a fixed switch design P4 configures switch - telling it how packets are to be processed OpenFlow populates forwarding tables in fixed function switches

Challenge Balance expressiveness with ease of implementation across a wide range of hardware and software switches

Design Goals Reconfigurability: be able to redefine the packet parsing and processing in the field (e.g., FPGA) Protocol independence: switch should not be tied to specific packet formats; controller be able to specify a packet parser for extracting header fields with particular names and types a collection of “typed” match+action tables that process these headers Target independence: Controller programmer does not need to know details of underlying switch, similar to writing C code for any processor a compiler should take switch’s capabilities into account when turning a target-independent description (written in P4) into a target-dependent program (used to configure switch)

How? How do you design a programming language? What does a switch do? abstract model of processor (or computation) language syntax and semantics What does a switch do? introduce an abstract switch forwarding model Design new language to describe protocol-independent packet processing match and action (forward) Motivating example: support new packet-header field and process packets in multiple stages how P4 program specifies headers, packet parser, multiple match+action tables, and control flow through these tables how a compiler can map P4 programs to target switches

Abstract Forwarding Model in P4 Three extension from OF OF assumes fixed parser, whereas P4 model supports programmable parser to allow new headers to be defined OF assumes match+action stages are in series, whereas in P4 they can be in parallel or in series In P4, actions are composed from protocol-independent primitives supported by switch switches forward packets via a programmable parser followed by multiple stages of match+action, arranged in series, parallel, or a combination of both

Abstract Model and Hardware Abstract model generalizes how packets are processed in different forwarding devices (e.g., Ethernet switches, load-balancers, routers) and by different technologies (e.g., fixed-function switch ASICs, NPUs, reconfigurable switches, software switches, FPGAs) This allows to devise a common language (P4) to represent how packets are processed in terms of common abstract model Programmers can create target-independent programs that compiler can map to a variety of different forwarding devices, ranging from slow software switches to fastest ASIC-based switches

Abstract Forwarding Model Controlled by two types of operations configure: program parser, set order of match+action stages, and specify header fields processed by each stage; determines which protocols are supported and how the switch may process packets populate: add (and remove) entries to match+action tables that were specified during configuration; determines policy applied to packets at any given time Goals: Implementations allows packet processing during partial or full reconfiguration enabling upgrades with no downtime Model deliberately allows for, and encourages, reconfiguration that does not interrupt forwarding

Forwarding Model Configuration phase has little meaning in fixed- function ASIC switches for this type of switch, compiler’s job is to simply check if chip can support P4 program To capture general trend towards fast reconfigurable packet-processing pipelines from Intel and other vendors

Operations Arriving packets are first handled by parser Packet body is buffered separately, and unavailable for matching Parser recognizes and extracts fields from header, and thus defines protocols supported by switch Model makes no assumptions about meaning of protocol headers, only that parsed representation defines a collection of fields on which matching and actions operate

Operations Extracted header fields (values) are then passed to the match+ action tables Match+action tables are divided between ingress and egress; both may modify packet header ingress match+action determines egress port(s) and determines queue into which packet is placed; based on ingress processing, packet may be forwarded, replicated (for multicast, span, or to control plane), dropped, or trigger flow control egress match+action performs per-instance modifications to packet header, e.g., for multicast copies Action tables (counters, policers, etc.) can be associated with a flow to track frame-to-frame state

Operations Packets can carry additional information (termed metadata) between stages, which is treated identically to packet header fields examples of metadata: ingress port, transmit destination and queue, timestamp that can be used for packet scheduling, and data passed from table-to-table that does not involve changing parsed representation of packet such as a virtual network identifier Queueing disciplines are handled in same way as OpenFlow: an action maps a packet to a queue, which is configured to receive a particular service discipline service discipline (e.g., minimum rate, DRR [Deficit Round Robin scheduler]) is chosen as part of switch configuration

P4 Example - mTag L2 network with top-of-rack (ToR) switches at edge connected by two-tier core Routes through core are encoded by 32-bit tag composed of four single-byte fields as source route Each core switch need only examine one byte of tag and switch on that information

P4 Concepts P4 program contains definitions of following components Header: define sequence and structure of a series of fields, including specification of field widths and constraints on field values Parser: specify how to identify headers and valid header sequences within packets Tables: match+action tables are mechanism for performing packet processing; P4 program defines fields on which a table may match and actions it may execute Actions: P4 supports construction of complex actions from simpler protocol-independent primitives; these complex actions are available within match+action tables Control Programs: determines order of match+action tables that are applied to a packet; imperative program describes flow of control between match+action tables

Header Format - Ethernet dest. address source data (payload) CRC preamble Type (of payload) Each header is specified by declaring an ordered list of field names together with their widths Optional field annotations allow constraints on value ranges or maximum lengths for variable-sized fields

Header Format - VLAN 802.1 frame 802.1Q frame type source address 802.1 frame preamble dest. address data (payload) CRC type dest. address source preamble 802.1Q frame data (payload) CRC 2-byte Tag Protocol Identifier (value: x8100) Tag Control Information (3-bit Priority Code Point field, 1-bit Canonical Format Indicator, and 12-bit VLAN ID field)

Header Format - mTag Field names indicate that core has two layers of aggregation Each core switch is programmed with rules to examine one of these bytes determined by its location in the hierarchy and direction of travel (up or down)

Packet Parser P4 assumes underlying switch can implement a state machine that traverses packet headers from start to finish, extracting field values as it goes The extracted field values are sent to the match+action tables for processing P4 describes this state machine directly as set of transitions from one header to the next Each transition may be triggered by values in current header

Packet Parser - Example Parsing starts in start state and proceeds until an explicit stop state is reached or an unhandled case is encountered (marked as an error) Upon reaching a state for a new header, state machine extracts header using its specification and proceeds to identify its next transition Extracted headers are forwarded to match+action processing in back-half of switch pipeline

Table Table describes how defined header fields are to be matched in match+action stages (e.g., exact matches, ranges, or wildcards) and what actions should be performed when a match occurs For mTag, edge switch matches on L2 destination and VLAN ID, and adds an mTag to header Programmer defines a table to match on these fields and apply an action to add mTag header // declare which fields to match // qualified by match type // list actions // how many entries table supports

Action P4 defines a collection of primitive actions from which more complicated actions are built Each P4 program declares a set of action functions that are composed of action primitives; these action functions simplify table specification and population P4 assumes parallel execution of primitives within an action function