Ben Pfaff Open vSwitch Commiter

Slides:



Advertisements
Similar presentations
OpenFlow and Software Defined Networks. Outline o The history of OpenFlow o What is OpenFlow? o Slicing OpenFlow networks o Software Defined Networks.
Advertisements

OS Components and Structure
Programming Protocol-Independent Packet Processors
Open vSwitch Guido Appenzeller, VMware 1. “Software is eating the World.” Marc Andreessen 2.
1 Features of IPv6 Larger Address Extended Address Hierarchy Flexible Header Format Improved Options Provision For Protocol Extension Support for Auto-configuration.
Netprog: IPv61 IPv6 Refs: Chapter 10, Appendix A.
Managing Open vSwitch Across a Large Heterogeneous Fleet
OpenFlow overview Joint Techs Baton Rouge. Classic Ethernet Originally a true broadcast medium Each end-system network interface card (NIC) received every.
Overview Motivations Basic static and dynamic optimization methods ADAPT Dynamo.
Open vSwitch. What is Open vSwitch ?  Open vSwitch is an open source OpenFlow capable virtual switch that is typically used with hypervisor to interconnect.
An Overview of Software-Defined Network Presenter: Xitao Wen.
Keith Wiles DPACC vNF Overview and Proposed methods Keith Wiles – v0.5.
Introducing Longhorn. What is it? Longhorn is Microsoft’s “most important software release since Windows 95” – due for release 2006 What this talk covers.
Exokernel: An Operating System Architecture for Application-Level Resource Management Dawson R. Engler, M. Frans Kaashoek, and James O’Toole Jr. M.I.T.
An Overview of Software-Defined Network
1 IPv6 Refs: Chapter 10, Appendix A. 2 IPv6 availability Generally not part of O.S. Available in beta for many operating systems. 6-Bone is experimental.
An Overview of Software-Defined Network Presenter: Xitao Wen.
An Introduction to Device Drivers Sarah Diesburg COP 5641 / CIS 4930.
CVSQL 2 The Design. System Overview System Components CVSQL Server –Three network interfaces –Modular data source provider framework –Decoupled SQL parsing.
Stack Management Each process/thread has two stacks  Kernel stack  User stack Stack pointer changes when exiting/entering the kernel Q: Why is this necessary?
Section 6.1 Explain the development of operating systems Differentiate between operating systems Section 6.2 Demonstrate knowledge of basic GUI components.
CSC 310 – Imperative Programming Languages, Spring, 2009 Virtual Machines and Threaded Intermediate Code (instead of PR Chapter 5 on Target Machine Architecture)
RELATIONAL FAULT TOLERANT INTERFACE TO HETEROGENEOUS DISTRIBUTED DATABASES Prof. Osama Abulnaja Afraa Khalifah
ECE 526 – Network Processing Systems Design Networking: protocols and packet format Chapter 3: D. E. Comer Fall 2008.
Arbitrary Packet Matching in Openflow
Customizing OVS using P4 Muhammad Shahbaz with Sean Choi, Ben Pfaff, Chaitanya Kodeboyina, Changhoon Kim, Nick McKeown, Nick Feamster, and Jen Rexford.
Full and Para Virtualization
CPUMEMHDNIC Bare Metal OS: windows, Linux, … App: Typically 1 server External Switch Resources to support Applications Bare Metal OS: VMkernel/Hypervisor.
Introduction to Mininet, Open vSwitch, and POX
Predrag Buncic (CERN/PH-SFT) Software Packaging: Can Virtualization help?
Intro To Virtualization Mohammed Morsi
Building programs LinuxChix-KE. What happens in your CPU? ● It executes a small set of instructions called "machine code" ● Each instruction is just a.
Network Virtualization Ben Pfaff Nicira Networks, Inc.
Virtualization for Cloud Computing
Introduction to Virtualization
BESS: A Virtual Switch Tailored for NFV
Kernel Design & Implementation
The architecture of the P416 compiler
P4 (Programming Protocol-independent Packet Processors)
Heitor Moraes, Marcos Vieira, Italo Cunha, Dorgival Guedes
VDP extension for SR-IOV
April 28, 2017 SUMIT MAHESHWARI INES UGALDE
PISCES: A Programmable, Protocol-Independent Software Switch
BIND 10 Packaging & Distribution
Virtualization overview
CernVM Status Report Predrag Buncic (CERN/PH-SFT).
Introduction to the Kernel and Device Drivers
Chapter 3: Windows7 Part 1.
Converging Approaches in Software Switches
An Introduction to Device Drivers
Indigo Doyoung Lee Dept. of CSE, POSTECH
Network Virtualization
Open vSwitch HW offload over DPDK
Implementing an OpenFlow Switch on the NetFPGA platform
Encrypting OVN tunnels with IPsec
Reprogrammable packet processing pipeline
Flow Monitoring in OVS Ashish Varma VMware.
All or Nothing The Challenge of Hardware Offload
Empowering OVS with eBPF
The Design & Implementation of Hyperupcalls
All assignments and information is posted on web site
Linux Network Programming with P4
Discussing an OVS/OVN Split
Bringing the Power of eBPF to Open vSwitch
CS-3013 Operating Systems Hugh C. Lauer
OS Components and Structure
Refs: Chapter 10, Appendix A
Outline Operating System Organization Operating System Examples
P4C-XDP: Programming the Linux Kernel Forwarding Plane using P4
Flow Processing for Fast Path & Inline Acceleration
Presentation transcript:

Ben Pfaff blp@nicira.com Open vSwitch Commiter P4 and Open vSwitch Ben Pfaff blp@nicira.com Open vSwitch Commiter

Open vSwitch Architecture VM 1 VM 2 VM n ... VMs Hypervisor ovsdb-server ovs-vswitchd kernel module OVSDB NICs Controller kernel user OpenFlow

Where is Open vSwitch Used? Broad support: Linux, FreeBSD, NetBSD, Windows, ESX KVM, Xen, Docker, VirtualBox, Hyper-V, … OpenStack, CloudStack, OpenNebula, (OVN!), … Widely used: Most popular OpenStack networking backend Default network stack in XenServer 1,440 hits in Google Scholar Thousands of subscribers to OVS mailing lists

The Big Picture Most releases of OVS add support for new fields or protocols. Every new field or protocol requires changes throughout OVS. Every change to OVS requires building, distributing, and installing a new version of OVS. Every field needs coordination with controller authors (+ONF). (Sometimes reasonable people disagree about a field, too!) It would be great to avoid all of this! Priorities: Flexibility Virtualization Performance

The Big Vision Requirements Reconfigure protocols and fields without recompiling Maintain or boost performance Maintain OVS backward compatibility Maintain (and extend) OpenFlow compatibility Nice-to-Have Minimize dependencies. Support both OVS software datapaths (kernel and user/DPDK). Avoid making OVS modal. Define “legacy” features in terms of new interface Avoid fragmenting P4 spec.

The Easy Part Define OVS fields and protocols with P4 header_type, header, parsers (~300 lines of P4 for everything in OVS). Map these fields and protocols to OpenFlow “OXM” matches by naming (e.g. name your eth_dst field OXM_8000_03) with an external mapping table with special comments in the P4 source code by defining OXM matches as metadata and storing into them

The Harder Part: OVS Linux datapath How do we make openvswitch.ko extensible? Probably not acceptable to support P4 directly in kernel. Kernel already has an extensibility mechanism, eBPF: 64-bit hardware-like virtual machine. Extended form of BPF (used e.g. for tcpdump). Safe for untrusted user code via verifier. JIT for high performance on popular archs (e.g. x86, ARM). eBPF is a suitable compiler target for P4! (Size could be an issue: 1415/4096.) (User/DPDK datapath can use any approach we like.)

Unsolved Conceptual Issues in P4-OVS Binding Weird fields Transforming P4 to OpenFlow is not too hard Transforming back from OpenFlow to P4 might need help e.g. OVS treats CFI bit in VLANs as “present” bit Inserting and removing fields VLAN and other encapsulation push/pop MPLS requires reparse after pop

The Prototype P4 syntax lexer (complete language) P4 syntax parser (header_type, header, parser) ovs.p4: P4 for OVS supported protocols and fields (minus IPv6) Compiler that accepts P4 and emits eBPF (just what ovs.p4 needs) eBPF interpreter for OVS userspace (would be replaced by JIT for production use) Replacement flow parsing routine that invokes eBPF Total: 5,500 new lines of code written over about 1 week

The Worst Part of the Prototype: Mapping P4 to OpenFlow via metadata OVS flow definition struct flow { ... … uint8_t eth_src[6]; uint8_t eth_dst[6]; ovs_be16 eth_type; P4 metadata definition header_type flow_t { fields { … eth_src : 48; eth_dst : 48; eth_type : 16; P4 parser mapping header_type flow_t flow; parser eth { extract(l2_eth); set_metadata(flow.eth_src, l2_eth.eth_src); set_metadata(flow.eth_dst, l2_eth.eth_dst); ...

Future Work Most important: solve unresolved questions in P4-OVS and P4- OpenFlow bindings P4 to eBPF compiler refinement (needs optimizer; use LLVM?) Lots of code to crank out.

Questions? Source code: https://github.com/blp/ovs-reviews/releases/tag/p4-workshop

P4-to-eBPF Example P4 BPF header_type l2_eth_t { fields { eth_dst : 48; eth_src : 48; } header l2_eth_t l2_eth; parser l2_eth { extract(l2_eth); set_metadata(flow.dl_dst, latest.eth_dst); set_metadata(flow.dl_src, latest.eth_src); return select(current(0, 16)) { 0x8100: l2_vlan; default: l2_ethertype; BPF # set_metadata(flow. dl_dst) # r5 = l2_eth.eth_dst 1: ld #0, r5 3: ldd [r5], r5 4: rshd #0x10, r5 5: lshd #0x10, r5 6: ld #0x10068, r6 8: ldd [r6], r7 9: ld #0xffff, r8 11: andd r7, r8 12: ord r5, r7 13: std r7, [r6] ... # r5 = current(0,16) 27: ld #0, r5 29: ldh 0xc[r5], r5 30: if (r5 != #0x8100) jmp 32 31: jmp 33 32: jmp 744