Open-NFP Summer Webinar Series: Session 4: P4, EBPF And Linux TC Offload

Similar documents
Comparing Open vswitch (OpenFlow) and P4 Dataplanes for Agilio SmartNICs

SmartNIC Programming Models

SmartNIC Programming Models

Host Dataplane Acceleration: SmartNIC Deployment Models

SmartNIC Data Plane Acceleration & Reconfiguration. Nic Viljoen, Senior Software Engineer, Netronome

ebpf Offload to Hardware cls_bpf and XDP

The Challenges of XDP Hardware Offload

Virtual Switch Acceleration with OVS-TC

Comprehensive BPF offload

P4 Introduction. Jaco Joubert SIGCOMM NETRONOME SYSTEMS, INC.

Accelerating Load Balancing programs using HW- Based Hints in XDP

Netronome NFP: Theory of Operation

BPF Hardware Offload Deep Dive

Agilio CX 2x40GbE with OVS-TC

Programming Netronome Agilio SmartNICs

XDP Hardware Offload: Current Work, Debugging and Edge Cases

Netronome 25GbE SmartNICs with Open vswitch Hardware Offload Drive Unmatched Cloud and Data Center Infrastructure Performance

Agilio OVS Software Architecture

Bringing Software Innovation Velocity to Networking Hardware

XDP: The Future of Networks. David S. Miller, Red Hat Inc., Seoul 2017

Using SR-IOV offloads with Open-vSwitch and similar applications

Enabling Efficient and Scalable Zero-Trust Security

ebpf Tooling and Debugging Infrastructure

Programming NFP with P4 and C

P4-based VNF and Micro-VNF chaining for servers with SmartNICs

Bringing the Power of ebpf to Open vswitch. Linux Plumber 2018 William Tu, Joe Stringer, Yifeng Sun, Yi-Hung Wei VMware Inc. and Cilium.

#ebpf You Cannot Stop This

XDP now with REDIRECT

OpenContrail, Real Speed: Offloading vrouter

Accelerating VM networking through XDP. Jason Wang Red Hat

ONOS-based Data Plane Acceleration Support for 5G. Dec 4, SKTelecom

ENG. WORKSHOP: PRES. Linux Networking Greatness (part II). Roopa Prabhu/Director Engineering Linux Software/Cumulus Networks.

Accelerating Telco NFV Deployments with DPDK and SmartNICs

New Approach to OVS Datapath Performance. Founder of CloudNetEngine Jun Xiao

XDP For the Rest of Us

INSTALLATION RUNBOOK FOR Netronome Agilio OvS. MOS Version: 8.0 OpenStack Version:

Linux Network Programming with P4. Linux Plumbers 2018 Fabian Ruffy, William Tu, Mihai Budiu VMware Inc. and University of British Columbia

Fast packet processing in the cloud. Dániel Géhberger Ericsson Research

OpenStack Networking: Where to Next?

Accelerating Contrail vrouter

FastReact. In-Network Control and Caching for Industrial Control Networks using Programmable Data Planes

OVS Acceleration using Network Flow Processors

Using ebpf for network traffic analysis. Samuele Sabella Luca Deri

OpenADN: A Case for Open Application Delivery Networking

Seven Criteria for a Sound Investment in WAN Optimization

Accelerating vrouter Contrail

Accelerating 4G Network Performance

Programmable Dataplane

Dynamic Analytics Extended to all layers Utilizing P4

SDN Software Switch Lagopus enables SDN/NFV transformation

Fulvio Risso, Matteo Bertrone, Mauricio Vasquez Bernal

Open vswitch DPDK Acceleration Using HW Classification

ONOS OVERVIEW. Architecture, Abstractions & Application

Hardware offload BOF

A Brief Guide to Virtual Switching Franck Baudin (Red Hat) Billy O Mahony (Intel)

vnetwork Future Direction Howie Xu, VMware R&D November 4, 2008

Profiling and Debugging OpenCL Applications with ARM Development Tools. October 2014

MWC 2015 End to End NFV Architecture demo_

Thomas Lin, Naif Tarafdar, Byungchul Park, Paul Chow, and Alberto Leon-Garcia

UDP Encapsulation in Linux netdev0.1 Conference February 16, Tom Herbert

Bringing the Power of ebpf to Open vswitch

Networking in a Vertically Scaled World

Next Gen Virtual Switch. CloudNetEngine Founder & CTO Jun Xiao

End to End SLA for Enterprise Multi-Tenant Applications

A practical introduction to XDP

Toward an ebpf-based clone of iptables

Programmable Server Adapters: Key Ingredients for Success

Building a Platform Optimized for the Network Edge

An Intelligent NIC Design Xin Song

vswitch Acceleration with Hardware Offloading CHEN ZHIHUI JUNE 2018

ERSPAN in Linux. A short history and review. Presenters: William Tu and Greg Rose

The.pdf version of this slide deck will have missing info, due to use of animations. The original.pptx deck is available here:

Measuring a 25 Gb/s and 40 Gb/s data plane

DYNAMIC SERVICE CHAINING DYSCO WITH. forcing packets through middleboxes for security, optimizing performance, enhancing reachability, etc.

SDN SEMINAR 2017 ARCHITECTING A CONTROL PLANE

ProgrammableFlow: OpenFlow Network Fabric

Programmable NICs. Lecture 14, Computer Networks (198:552)

New trends in IT. Network Functions Virtualization (NFV) & Software Defined-WAN

Leveraging Stratum and Tofino Fast Refresh for Software Upgrades

ODL SFC with OVS-DPDK, HW accelerated dataplane and VPP

DPDK+eBPF KONSTANTIN ANANYEV INTEL

Super Fast Packet Filtering with ebpf and XDP Helen Tabunshchyk, Systems Engineer, Cloudflare

Introduction to a NIC Wire App in P4

Cisco Virtualized Infrastructure Manager

Internet Technology. 15. Things we didn t get to talk about. Paul Krzyzanowski. Rutgers University. Spring Paul Krzyzanowski

Enabling DPDK Accelerated OVS in ODL and Accelerating SFC

Demystifying Network Cards

OpenFlow Ronald van der Pol

Performance Considerations of Network Functions Virtualization using Containers

P4 support in ONOS. Carmelo Cascone ONF

Enterprise Network Compute System (ENCS)

INT G bit TCP Offload Engine SOC

Using SDN and NFV to Realize a Scalable and Resilient Omni-Present Firewall

Software Datapath Acceleration for Stateless Packet Processing

Network Virtualization in Multi-tenant Datacenters

Hardware Accelera+on in an SDN/NFV World: MRV POC with Charter Communica+ons

DPDK on Microsoft Azure

ebpf Debugging Infrastructure Current Techniques and Additional Proposals

Data Path acceleration techniques in a NFV world

ebpf Offload Getting Started Guide

Transcription:

Open-NFP Summer Webinar Series: Session 4: P4, EBPF And Linux TC Offload Dinan Gunawardena & Jakub Kicinski - Netronome August 24, 2016 1

Open-NFP www.open-nfp.org Support and grow reusable research in accelerating dataplane network functions processing Reduce/eliminate the cost and technology barriers to research in this space Technologies: P4, ebpf, SDN, OpenFlow, Open vswitch (OVS) offload Tools: Discounted hardware, development tools, software, cloud access Community: Website (www.open-nfp.org): learning & training materials, active Google group https://groups.google.com/d/forum/open-nfp, open project descriptions, code repository Learning/Education/Research support: Summer seminar series, P4DevCon conference, Tutorials (P4 Developer Day), research proposal support for proposals to the NSF, state agencies Summer seminar series to further progress to our objective. Present applied reusable research. 2

P4DevCon Attendees/Open-NFP Projects* Universities Companies *This does not imply that these organiza4ons endorse Open-NFP or Netronome 3

Session Agenda 1. Introduction Objectives 2. Overview: The high level model for offload - What we are offloading P4 / ebpf 4. Hardware Intro to NFP (Network Flow Processor) architecture SmartNICs-Multi Core, Many Core NUMA, Memory Hierarchy 5. Accelerating P4/eBPF in NFP : - Overall programmer model for transparent offload 3. Linux Kernel Infrastructure The Traffic Classifier (TC) express Data Path (XDP) Current ebpf translation on X86/ARM64/PPC64 Implementation Kernel core infrastructure Map handling in the kernel Translating instructions Basic Map Support Optimizations 6. & 7. Demo; Summary 4

Session Objectives 5

Introduction: Objectives Understanding how ebpf is relevant to P4 Understanding the support for offload and state of art in the Linux Kernel The Code Understand the structure of a ebpf program Gain an insight into how this is translated and executed in hardware Understanding how the NFP architecture on the Agilio CX enables high performing, fully programmable network offload The Many Core architecture and its advantages 6

Overview: High level model for offload What we are offloading P4 / ebpf Overall programmer model for transparent offload 7

P4 and ebpf What are P4 and ebpf? Domain specific languages for specifying forwarding behaviour of the data plane of network components P4 - Programming Protocol-Independent Packet Processors Header format description Parse Graphs (FSM) Tables (<keys,actions>) Actions manipulate packet header/metadata Control flow an imperative program, describing sequence of data dependent match/actions ebpf Extended Berkley Packet Filters Low level (machine code like) language Code executed by a VM (restricted memory, no sleeps/locks, limited API to kernel)in the Kernel (TC) Code injected into netfilter hook points in kernel data plane Maps (<key, value> stores) Chained filter functions Match/action Static verification of safety, guaranteed to terminate 8

Translating P4->eBPF John Fastabend P4 to ebpf compiler Why translate P4 to ebpf? Table and diagrams Mihai Budiu 9

Model for Transparent Offload Programmer / user is unaware that ebpf code is offloaded Requirements Partial pipeline offload Fallback to software for any ebpf code block Transparent user mode / kernel mode access to tables Packet In ebpf Program 1 (HW offload) ebpf Program 2 (HW offload) PCI-E crossing ebpf Program 3 10

Linux Kernel Infrastucture The Traffic Classifier (TC) express Data Path (XDP) 11

Linux Traffic Classifier (TC) Component Shaping Scheduling Classifying Policing Dropping Marking Linux Component The class offers shaping capabili4es A qdisc acts as a scheduler e.g. FIFO The filter performs classifica4on through a classifier object. A policer performs policing within a filter The drop ac4on occurs with a filter+policer The dsmark qdisc is used for marking ebpf program TC diagram and example program Jamal Hadi Salim 12

express Data Path (XDP) What High performance, programmable network data path Utility Useful for packet processing forwarding load balancing DOS mitigation firewalls, etc. XDP architecture diagram Tom Herbert 13

Hardware Intro to NFP (Network Flow Processor) architecture NUMA, Memory Hierarchy Current ebpf translation on X86/ARM64/ PPC64 14

NUMA, Memory Hierarchy Architecural Philosopies: Bring the data close to where it needs to be processed Facilitate highly concurrent access to memories Mitigate branch costs and hide I/O & memory access latencies 15

Current ebpf translation on X86/ARM64/PPC64 1) Write ebpf program as a simple C Program 2) Compiled to ebpf byte code 3) Loaded into the Linux TC 4) Run through verifier 5) Cross compiled to X86/ARM64/PPC64 TC Or now NFP Byte Code! NFP hardware offloaded ebpf 16

Dataflow User Space User TCP Stack Traffic Classifier (TC) Packet + Sk_Buf Kernel Driver (XDP) Firmware & Hardware Packet + Descriptor, Meta data PCI-E NFP Network 17

Supported Actions User Space Supported Ac2ons Drop Mark Redirect User TCP Stack Traffic Classifier (TC) Packet + Sk_Buf Kernel Mark Driver (XDP) Firmware & Hardware Packet + Descriptor, Meta data PCI-E NFP Drop Redirect Network 18

Accelerating P4/eBPF in NFP : Implementation Kernel core infrastructure Map handling in the kernel ebpf to NFP Map Support Optimizations 19

Kernel core infrastructure skip_sw skip_hw ebpf Program + Flags User Space User Offload obj TCP Stack Traffic Classifier (TC) Kernel NFP Offload Control Stats Driver (XDP) PCI-E Firmware & Hardware NFP Network 20

ebpf to NFP Non-linear mapping 32 bit translation 10 x ebpf Registers NFP ME Registers DRAM MAP 64bits Translate X X A 16 x 2 x X X B 32bits Communica4on Registers 21

Map Handling in Kernel & Map Write Reflection Write interception Control Applica4on User Space Ownership Associating with a device MAP Kernel Space Read-Only single-user maps Read-Only multi-user maps Write-Enabled single-user maps Write-Enabled multi-user maps Write Reflec4on MAP PCI-E NFP Network 22

Optimizations Dealing with different memory types Peephole Optimizer Dropping unnecessary jumps Optimizing instructions with immediates Fusing instructions Full A/B register allocations Liveness analysis with real state size tracking 23

Demo 24

Summary Learnt the relationship between P4 and ebpf Discovered the infrastructure in the Linux Kernel for ebpf offload Learnt about how the Netronome Smart NIC architecture is optimised for network flow processing Explored how we implemented the ebpf offload in hardware 25

QUESTIONS? Dinan Gunawardena dinan.gunawardena@netronome.com Jakub Kicinski Jakub.Kicinski@netronome.com 26

THANK YOU 27