PISCES: A Programmable, Protocol-Independent Software Switch
Muhammad Shahbaz, Sean Choi, Ben Pfaff, Changhoon Kim, Nick Feamster, Nick McKeown, and Jennifer Rexford
PISCES: A Programmable, Protocol-Independent Software Switch - - PowerPoint PPT Presentation
PISCES: A Programmable, Protocol-Independent Software Switch Muhammad Shahbaz, Sean Choi , Ben Pfaff, Changhoon Kim, Nick Feamster, Nick McKeown, and Jennifer Rexford Fixed Set of Protocols Fixed-Function Switch Chip Ethernet TCP HTTP UDP
Muhammad Shahbaz, Sean Choi, Ben Pfaff, Changhoon Kim, Nick Feamster, Nick McKeown, and Jennifer Rexford
Fixed-Function Switch Chip Fixed Set of Protocols
2
3
CUSTOM_P
Programmable Switching Chip Custom Protocols
4
Software Switch
VM VM
Virtual Port Physical Port
5
20 40 60 2010 2011 2012 2013 2014 2015 Millions
Phyical Ports Virtual Ports
[1] Martin Casado, VMWorld 2013
6
7
Fast Packet Forwarding
Software Switch
Kernel DPDK
8
Packet Processing Logic
Software Switch
Kernel DPDK
Parser Match-Action Pipeline
Requires domain expertise in:
Slow to release changes
Specialized APIs
9
Software Switch
Kernel DPDK
Parser Match-Action Pipeline
To add TCP Flag in Open vSwitch… changed 20 files and 370 lines of code[1] Weeks of development and Test
[1] https://github.com/openvswitch/ovs/commit/dc235f7fbcff
10
header_type tcp_t { fields { srcPort : 16; dstPort : 16; seqNo : 32; ackNo : 32; dataOffset : 4; res : 4; tcp_flags : 12; window : 16; checksum : 16; urgentPtr : 16; } } parser tcp { extract(tcp); set_metadata(flow.tcp_flags, tcp.tcp_flags); return ingress; } header_type flow_t { fields { ... tcp_flags_pad : 4; tcp_flags : 12; ... } } 11
Kernel DPDK
Software Switch
Parser Match-Action Pipeline
12
Kernel DPDK
Software Switch
Domain-Specific Language (DSL) Parser Match-Action Pipeline
Compile
Parser Match-Action Pipeline
TCP Header
header_type tcp_t { fields { srcPort : 16; dstPort : 16; seqNo : 32; ackNo : 32; dataOffset : 4; res : 4; window : 16; checksum : 16; urgentPtr : 16; } } parser tcp { extract(tcp); return ingress; } ... 13
Kernel DPDK
Software Switch
Domain-Specific Language Parser Match-Action Pipeline
Compile
Parser Match-Action Pipeline Domain-Specific Language 2 Parser Match-Action Pipeline
Kernel DPDK
Switch 2
Parser Match-Action Pipeline
PISCES is a software switch that takes
and outputs a customized
14
Kernel DPDK
OVS Parser Match-Action Pipeline
Compile
Parser Match-Action Pipeline
[1] http://p4.org
P4 is an open-source language.[1] Easily defines
P4[1]
15
Kernel DPDK
P4 Parser Match-Action Pipeline
Compile
Parser Match-Action Pipeline
Native OVS Packet Processing Logic 341 lines of P4 code 14,535 lines of C code
OVS
16
parse match action
OVS Executable
header_type tcp_t { fields { srcPort : 16; dstPort : 16; seqNo : 32; ackNo : 32; dataOffset : 4; res : 4; window : 16; checksum : 16; urgentPtr : 16; } } parser tcp { extract(tcp); return ingress; } ... header_type tcpv2_t { fields { srcPort : 16; dstPort : 16; seqNo : 32; ackNo : 32; dataOffset : 4; res : 4; tcp_flags : 8; window : 16; checksum : 16; urgentPtr : 16; } } parser tcpv2 { extract(tcpv2); set_metadata(flow.tcp_flags, tcpv2.tcp_flags); return ingress; } ... 17
PISCES
Kernel DPDK
OVS P4 Parser Match-Action Pipeline Parser Match-Action Pipeline
Compile
18
8.29 13.62 19.00 25.71 13.43 23.35 33.17 43.00
5 10 15 20 25 30 35 40 45 50
64 128 192 256 Throughput (Gbps) Packet Size (Bytes) PISCES v0.1 OVS
Throughput on Eth + IPv4 + ACL benchmark application
19
Packet Parser Ingress Match-Action Tables Packet Deparser Egress Checksum Verify Checksum Update
CPU Cycles per Packet
20
21
Packet Parser Ingress Match-Action Pipeline Egress Checksum Verify Checksum Update
Checksum Verify ( version, ihl, diffserv, totalLen, identification, flags, fragOffset, ttl, protocol, hdrChecksum, srcAddr, dstAddr) Checksum Update ( version, ihl, diffserv, totalLen, identification, flags, fragOffset, ttl, protocol, hdrChecksum, srcAddr, dstAddr)
22
Packet Parser Ingress
Decrement(ttl)
Egress Checksum Verify Checksum Update
Checksum Verify ( version, ihl, diffserv, totalLen, identification, flags, fragOffset, ttl, protocol, hdrChecksum, srcAddr, dstAddr) Incremental Checksum Update (ttl)
23
Packet Parser Match-Action Tables Packet Deparser Ingress Egress Header Fields Ingress Packet Egress Packet Checksum Update Checksum Verify
24
Packet Parser Ingress Egress Packet Ingress Packet Egress Match-Action Tables
25
Editing Mode Advantage Disadvantage
Post-Pipeline Packet header size is adjusted only once Extra copy of headers Inline No extra copy of headers Packet header size is adjusted multiple times
26
Editing Mode Advantage Disadvantage
Post-Pipeline Extra copy of headers Inline No extra copy of headers
Packet Parser Ingress Match-Action Tables Packet Deparser Egress
Checksum Verify Checksum Update
27
7.59 12.28 12.56 13.32 13.43
2 4 6 8 10 12 14 16
64 Throughput (Gbps) Packet Size (Bytes)
PISCES v0.1 Incremental Checksum Editing Mode Selection PISCES v1.0 Native OVS
Throughput on Eth + IPv4 + ACL benchmark application
28
28 18 20 1 1 1
5 10 15 20 25 30 Connection Label Tunnel OAM Flag TCP Flag
Number of Files Changed
Native OVS PISCES
411 170 370 5 6 4
50 100 150 200 250 300 350 400 450 Connection Label Tunnel OAM Flag TCP Flag
Lines of Code Changed
Native OVS PISCES
29
30