
PISCES: Protocol-Independent Software Switch for Fast Forwarding
Explore how PISCES, a Programmable Protocol-Independent Software Switch utilizing P4 and OVS, enables fast packet forwarding. Learn about its significance in network features, customization options, and rapid development and deployment capabilities.
Download Presentation

Please find below an Image/Link to download the presentation.
The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.
You are allowed to download the files provided on this website for personal or commercial use, subject to the condition that they are used lawfully. All files are the property of their respective owners.
The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.
E N D
Presentation Transcript
PISCES: A Programmable, Protocol- Independent Software Switch P4 + OVS == Fast Forwarding! Muhammad Shahbaz, Sean Choi, Ben Pfaff, Changhoon Kim, Nick Feamster, Nick McKeown, and Jennifer Rexford
Also appears at SIGCOMM 2016! http://goo.gl/wmBmTu 2
Importance of Software Switches VM VM VM VM VM VM VM VM VM VM VM VM VM VM VM VM OVS OVS OVS OVS Hypervisor Hypervisor Hypervisor Hypervisor ToR ToR ToR ToR Core 3
Importance of Software Switches VM VM VM VM VM VM VM VM VM VM VM VM VM VM VM VM OVS OVS OVS OVS Hypervisor Hypervisor Hypervisor Hypervisor ToR ToR ToR ToR Core 4
Ease of Customization? VM VM VM VM OVS Enable Rapid Development and Deployment of Network Features! Hypervisor ToR Is it REALLY the case? Core 5
Ease of Customization? For example, OVS supports following tunneling protocols: VM VM VM VM VM VM VM VM - VXLAN: Virtual Extensible LAN OVS OVS Hypervisor Hypervisor - STT: Stateless Transport Tunneling - NVGRE: Network Virtualization Generic Routing ToR ToR Core 6
Rapid Development & Deployment? OVS Fast Packet IO (or Forwarding) Kernel DPDK 7
Rapid Development & Deployment? Requires domain expertize in: - Network protocol design OVS - Software development - - - large, complex codebases. Arcane APIs - Can take 3-6 months to get a new feature in. Develop Test Deploy Packet Processing Logic Parser Match-Action Pipeline Kernel DPDK - Maintaining changes across releases 8
Rapid Development & Deployment? OVS Parser Match-Action Pipeline Kernel DPDK 9
Rapid Development & Deployment? OVS Parser Match-Action Pipeline Kernel DPDK 10
Rapid Development & Deployment? P4 Parser Match-Action Pipeline 341 lines of code Compile Native OVS OVS Parser Match-Action Pipeline 14,535 lines of code Kernel DPDK 11
Rapid Development & Deployment? P4 Parser Match-Action Pipeline Performance overhead! Compile OVS Parser Match-Action Pipeline Kernel DPDK 12
Whats the cost of programmability on Performance? 13
PISCES: A Protocol-Independent Software Switch P4 PISCES vSwitch OVS 14
PISCES: A Protocol-Independent Software Switch P4 Runtime Flow Rules Compiler Flow Rule Checker parse action match OVS Executable 15
PISCES: A Protocol-Independent Software Switch - P4 and OVS packet forwarding models. - Performance overhead of a na ve mapping from P4 to OVS. - PISCES compiler optimizations to reduce the performance overhead.
P4 Forwarding Model (or Post-Pipeline Editing) Egress Ingress Packet Parser Packet Deparser Match-Action Tables Ingress Packet Egress Packet Header Fields 17
OVS Forwarding Model (or Inline Editing) Egress Ingress Packet Parser Match-Action Tables Ingress Packet Egress Packet 18
(Modified) OVS Forwarding Model Egress Ingress Packet Parser Packet Deparser* Match-Action Tables - Supports both editing modes: - Inline Editing - Post-pipeline Editing 19
Nave Mapping from P4 to OVS A na ve compilation of L2L3-ACL benchmark application PISCES (unoptimized) OVS 50 Throughput (Gbps) 40 Performance overhead of ~ 40% 30 20 10 0 64 128 Packet Size (Bytes) 192 256 20
Causes of Performance Degradation Egress Ingress Packet Parser Packet Deparser Match-Action Pipeline CPU Cycles per Packet 21
Causes of Performance Degradation - Factors affecting CPU cycles: - Extra copy of headers in the post-pipeline editing mode - Fully-specified checksum calculation - Redundant parsing of header fields and more 22
Causes of Performance Degradation Factor #1: Extra copy of headers Editing Mode Pros Cons Post-Pipeline Extra copy of headers Inline No extra copy of headers - Post-pipeline editing consumes 2x more cycles than inline editing when parsing VXLAN protocol.
Causes of Performance Degradation Factor #1: Extra copy of headers Editing Mode Pros Cons Post-Pipeline Packets are adjusted once Extra copy of headers Inline No extra copy of headers Multiple adjustments to packet Post-Pipeline Editing Inline Editing Post-pipeline editing 800 Cycles per Packet Inline editing 600 400 200 0 Deparse x1 x2 x4 x8 x16 Number of adjustments
Causes of Performance Degradation Factor #2: Fully-Specified Checksums Checksum ( version, ihl, diffserv, totalLen, identification, flags, fragOffset, ttl, protocol, hdrChecksum, srcAddr, dstAddr) Incremental-Checksum (ttl) Egress Ingress Packet Parser Packet Deparser decrement(ttl)
Causes of Performance Degradation Factor #3: Redundant parsing of headers L3 L2 L2 L4 Egress Ingress Packet Parser Packet Deparser Match-Action Pipeline
Optimizing for CPU Cycles Optimizations Inline vs. post-pipeline editing Incremental checksum Parser specialization Action specialization Action coalescing 27
Optimizing for CPU Cycles Optimizations Extra Copy of Headers Inline vs. post-pipeline editing Incremental checksum Fully-Specified Checksum Parser specialization Redundant Parsing Action specialization Action coalescing 28
Optimizing for CPU Cycles Optimizations Inline vs. post-pipeline editing Incremental checksum Parser specialization Action specialization Action coalescing 29
Optimized Mapping from P4 to OVS All optimizations together PISCES (unoptimized) PISCES (Optimized) OVS 50 Throughput (Gbps) 40 Performance overhead of < 2% 30 20 10 0 64 128 Packet Size (Bytes) 192 256 30
Another Cause for Performance Degradation Match-Action Tables Optimizations Cached field modifications Cache Misses Stage assignment Egress Ingress Packet Parser Match-Action Cache Packet Deparser* 31
Next Steps - Support for stateful memories and INT - Integration with the mainline OVS - Interning at VMware to make this happen! 32
Summary With appropriate compiler optimizations P4 + OVS == Fast Forwarding! 33
Questions? Learn more and try PISCES here: https://github.com/P4-vSwitch Muhammad Shahbaz mshahbaz@cs.princeton.edu 34