Top Banner
PVPP: A Programmable Vector Packet Processor Sean Choi, Xiang Long, Muhammad Shahbaz, Skip Booth, Andy Keep, John Marshall, Changhoon Kim
42

PVPP: A Programmable Vector Packet Processoryo2seol/static/talks/pvpp-cisco.pdf · TCP IPv4 Ethernet UDP IPv6 BGP HTTP TLS Fixed Set of Protocols Fixed-Function Switch Chip. TCP IPv4

Mar 22, 2020

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: PVPP: A Programmable Vector Packet Processoryo2seol/static/talks/pvpp-cisco.pdf · TCP IPv4 Ethernet UDP IPv6 BGP HTTP TLS Fixed Set of Protocols Fixed-Function Switch Chip. TCP IPv4

PVPP:AProgrammableVectorPacketProcessor

SeanChoi,XiangLong,MuhammadShahbaz,

SkipBooth,AndyKeep,JohnMarshall,Changhoon Kim

Page 2: PVPP: A Programmable Vector Packet Processoryo2seol/static/talks/pvpp-cisco.pdf · TCP IPv4 Ethernet UDP IPv6 BGP HTTP TLS Fixed Set of Protocols Fixed-Function Switch Chip. TCP IPv4

TCP

IPv4

Ethernet

UDP

IPv6 BGP

HTTP

TLS

Fixed-FunctionSwitchChipFixedSetofProtocols

Page 3: PVPP: A Programmable Vector Packet Processoryo2seol/static/talks/pvpp-cisco.pdf · TCP IPv4 Ethernet UDP IPv6 BGP HTTP TLS Fixed Set of Protocols Fixed-Function Switch Chip. TCP IPv4

TCP

IPv4

Ethernet

CUSTOM_P

IPv6 BGP

HTTP

TLS

ProgrammableSwitchingChipCustomProtocols

Page 4: PVPP: A Programmable Vector Packet Processoryo2seol/static/talks/pvpp-cisco.pdf · TCP IPv4 Ethernet UDP IPv6 BGP HTTP TLS Fixed Set of Protocols Fixed-Function Switch Chip. TCP IPv4

SoftwareSwitch

VM VM

3VirtualPorts

1PhysicalPort

Page 5: PVPP: A Programmable Vector Packet Processoryo2seol/static/talks/pvpp-cisco.pdf · TCP IPv4 Ethernet UDP IPv6 BGP HTTP TLS Fixed Set of Protocols Fixed-Function Switch Chip. TCP IPv4

0

20

40

60

2010 2011 2012 2013 2014 2015

Approx.NumberofPhysicalPortsvs.VirtualPorts[1]

PhyicalPorts VirtualPorts

[1] Martin Casado, VMWorld 2013

Page 6: PVPP: A Programmable Vector Packet Processoryo2seol/static/talks/pvpp-cisco.pdf · TCP IPv4 Ethernet UDP IPv6 BGP HTTP TLS Fixed Set of Protocols Fixed-Function Switch Chip. TCP IPv4

TCP

IPv4

Ethernet

CUSTOM_P

IPv6 BGP

HTTP

SoftwareSwitchCustomProtocols

PISCES[1]

BMv2[2]

[2] https://github.com/p4lang/behavioral-model

[1] PISCES. ACM SIGCOMM 2016.

Page 7: PVPP: A Programmable Vector Packet Processoryo2seol/static/talks/pvpp-cisco.pdf · TCP IPv4 Ethernet UDP IPv6 BGP HTTP TLS Fixed Set of Protocols Fixed-Function Switch Chip. TCP IPv4

7.59

13.32 13.43

0246810121416

64

Throughp

ut(G

bps)

PacketSize(Bytes)

PISCESv0.1 PISCESv1.0 NativeOVS

Performanceoverheadof

<2%

ThroughputonEth+IPv4+ACLbenchmarkapplication[1]

[1] PISCES. ACM SIGCOMM 2016.

Page 8: PVPP: A Programmable Vector Packet Processoryo2seol/static/talks/pvpp-cisco.pdf · TCP IPv4 Ethernet UDP IPv6 BGP HTTP TLS Fixed Set of Protocols Fixed-Function Switch Chip. TCP IPv4

So… whyANOTHERP4softwareswitch?

Page 9: PVPP: A Programmable Vector Packet Processoryo2seol/static/talks/pvpp-cisco.pdf · TCP IPv4 Ethernet UDP IPv6 BGP HTTP TLS Fixed Set of Protocols Fixed-Function Switch Chip. TCP IPv4
Page 10: PVPP: A Programmable Vector Packet Processoryo2seol/static/talks/pvpp-cisco.pdf · TCP IPv4 Ethernet UDP IPv6 BGP HTTP TLS Fixed Set of Protocols Fixed-Function Switch Chip. TCP IPv4

Parser Match+Action Tables Queues/Scheduling

Initially, the switching chip is not programmed and does not know any protocols.

Packet Metadata

Page 11: PVPP: A Programmable Vector Packet Processoryo2seol/static/talks/pvpp-cisco.pdf · TCP IPv4 Ethernet UDP IPv6 BGP HTTP TLS Fixed Set of Protocols Fixed-Function Switch Chip. TCP IPv4

Protocol Authoring

L2_L3.p4

Compile

Configure

Parser Match+Action Tables Queues/Scheduling

Packet Metadata

TCP New

IPv4 IPv6

VLANEthRun-time API

Driver

Switch OS

Page 12: PVPP: A Programmable Vector Packet Processoryo2seol/static/talks/pvpp-cisco.pdf · TCP IPv4 Ethernet UDP IPv6 BGP HTTP TLS Fixed Set of Protocols Fixed-Function Switch Chip. TCP IPv4

Protocol Authoring

L2_L3.p4

Compile

Configure

Parser Match+Action Tables Queues/Scheduling

Packet Metadata

Run-time APIDriver

Switch OSOF1-3.p4

Page 13: PVPP: A Programmable Vector Packet Processoryo2seol/static/talks/pvpp-cisco.pdf · TCP IPv4 Ethernet UDP IPv6 BGP HTTP TLS Fixed Set of Protocols Fixed-Function Switch Chip. TCP IPv4

KernelDPDK

SoftwareSwitch

Parser Match-Action Pipeline

Page 14: PVPP: A Programmable Vector Packet Processoryo2seol/static/talks/pvpp-cisco.pdf · TCP IPv4 Ethernet UDP IPv6 BGP HTTP TLS Fixed Set of Protocols Fixed-Function Switch Chip. TCP IPv4

KernelDPDK

Software Switch

Domain-Specific Language (DSL)

Parser Match-Action Pipeline

Compile

Parser Match-Action Pipeline

Page 15: PVPP: A Programmable Vector Packet Processoryo2seol/static/talks/pvpp-cisco.pdf · TCP IPv4 Ethernet UDP IPv6 BGP HTTP TLS Fixed Set of Protocols Fixed-Function Switch Chip. TCP IPv4

KernelDPDK

SoftwareSwitch

DSL 1

Parser Match-Action Pipeline

Compile

Parser Match-Action Pipeline

DSL 2

Parser Match-Action Pipeline

KernelDPDK

SoftwareSwitch2

Parser Match-Action Pipeline

PISCES• P4toOvS

BMv2• P4toa

C++customswitch

Page 16: PVPP: A Programmable Vector Packet Processoryo2seol/static/talks/pvpp-cisco.pdf · TCP IPv4 Ethernet UDP IPv6 BGP HTTP TLS Fixed Set of Protocols Fixed-Function Switch Chip. TCP IPv4

What’swrongwiththisdesign?

Page 17: PVPP: A Programmable Vector Packet Processoryo2seol/static/talks/pvpp-cisco.pdf · TCP IPv4 Ethernet UDP IPv6 BGP HTTP TLS Fixed Set of Protocols Fixed-Function Switch Chip. TCP IPv4

• NotdesignedforCPUbasedarchitectures

• Limitedinexpressiveness

• LimitedAPIstoaccesslowlevelconstructs

=>Lotofroomforimprovements!

Page 18: PVPP: A Programmable Vector Packet Processoryo2seol/static/talks/pvpp-cisco.pdf · TCP IPv4 Ethernet UDP IPv6 BGP HTTP TLS Fixed Set of Protocols Fixed-Function Switch Chip. TCP IPv4

VectorPacketProcessing(VPP)Platform

• OpensourceversionofCisco’s

VectorPacketProcessingtechnology

• Modular packetprocessingnodegraphabstraction

• Eachnodeprocessesavectorofpacketstoreduce

CPUI-cachethrashing

• Extensibleanddynamicallyreconfigurableviaplugins

Page 19: PVPP: A Programmable Vector Packet Processoryo2seol/static/talks/pvpp-cisco.pdf · TCP IPv4 Ethernet UDP IPv6 BGP HTTP TLS Fixed Set of Protocols Fixed-Function Switch Chip. TCP IPv4

VectorPacketProcessing(VPP)Platform

• ProvenPerformance[1]

[1] https://wiki.fd.io/view/VPP/What_is_VPP%3F

• MultipleMPPSfromasinglex86_64core

• >100Gbpsfull-duplexonasinglephysicalhost

• OutperformsOpenvSwitch invariousscenarios

1core: 9MPPSipv4in+out forwarding2cores:13.4MPPSipv4in+out forwarding4cores:20.0MPPSipv4in+out forwarding

Page 20: PVPP: A Programmable Vector Packet Processoryo2seol/static/talks/pvpp-cisco.pdf · TCP IPv4 Ethernet UDP IPv6 BGP HTTP TLS Fixed Set of Protocols Fixed-Function Switch Chip. TCP IPv4

…Packet Vector dpdk-input

ip6-inputip4-input llc-input

ip6-lookup

ip6-rewrite-transmit

dpdk-output

Page 21: PVPP: A Programmable Vector Packet Processoryo2seol/static/talks/pvpp-cisco.pdf · TCP IPv4 Ethernet UDP IPv6 BGP HTTP TLS Fixed Set of Protocols Fixed-Function Switch Chip. TCP IPv4

…Packet Vector dpdk-input

ip6-inputip4-input llc-input

ip6-lookup

ip6-rewrite-transmit

dpdk-output

Vanilla VPP Nodes

Custom-input

Node 1 Node 2 Node i

Node j

Node k

Custom Plugin

Page 22: PVPP: A Programmable Vector Packet Processoryo2seol/static/talks/pvpp-cisco.pdf · TCP IPv4 Ethernet UDP IPv6 BGP HTTP TLS Fixed Set of Protocols Fixed-Function Switch Chip. TCP IPv4

…Packet Vector dpdk-input

ip6-inputip4-input llc-input

ip6-lookup

ip6-rewrite-transmit

dpdk-output

Vanilla VPP Nodes

Enabled via CLI

Custom-input

Node 1 Node 2 Node i

Node j

Node k

Custom Plugin

Page 23: PVPP: A Programmable Vector Packet Processoryo2seol/static/talks/pvpp-cisco.pdf · TCP IPv4 Ethernet UDP IPv6 BGP HTTP TLS Fixed Set of Protocols Fixed-Function Switch Chip. TCP IPv4

PVPPOverview

• Createsaplugin basedontheinputP4program

• NochangestoexistingVPPcodebase

• Compileseithersinglenodeormultiplenodeplugin

• Multiplenodesaresplitbynumberoftablesinthe

inputP4program

• P4programscanbeswappeddynamically

Page 24: PVPP: A Programmable Vector Packet Processoryo2seol/static/talks/pvpp-cisco.pdf · TCP IPv4 Ethernet UDP IPv6 BGP HTTP TLS Fixed Set of Protocols Fixed-Function Switch Chip. TCP IPv4

…Packet Vector dpdk-input

ip6-inputip4-input llc-input

ip6-lookup

ip6-rewrite-transmit

dpdk-output

Vanilla VPP Nodes

Enabled via CLI

pvpp-input

Table 1 Table 2 Table i

Table j

Table k

Multi-NodePVPP Plugin

Page 25: PVPP: A Programmable Vector Packet Processoryo2seol/static/talks/pvpp-cisco.pdf · TCP IPv4 Ethernet UDP IPv6 BGP HTTP TLS Fixed Set of Protocols Fixed-Function Switch Chip. TCP IPv4

Front-endCompiler

BMv2Mid-endCompiler

BMv2Back-endCompiler

JSON-VPPCompiler

VPPPlugin

Directory

P4Program

VPP PluginCog

Templates

P4 Compiler (P4C)

JSON

C Files

Page 26: PVPP: A Programmable Vector Packet Processoryo2seol/static/talks/pvpp-cisco.pdf · TCP IPv4 Ethernet UDP IPv6 BGP HTTP TLS Fixed Set of Protocols Fixed-Function Switch Chip. TCP IPv4

DetailsofPVPPPlugin• HeadersaredefinedasCstructs

header_type ethernet_t {fields {dstAddr: 48;srcAddr: 48;etherType: 16;

}}

typedef struct {u8 dstAddr[6];u8 srcAddr[6];u16 etherType;

} p4_type_Ethernet_h;

• Actioninterfacetakespointerstoallheader,metadata,

runtimedataandcompilerselectsthecorrectpointerandset

ofprimitivestoperformonthedata.

Page 27: PVPP: A Programmable Vector Packet Processoryo2seol/static/talks/pvpp-cisco.pdf · TCP IPv4 Ethernet UDP IPv6 BGP HTTP TLS Fixed Set of Protocols Fixed-Function Switch Chip. TCP IPv4

DetailsofPVPPPlugin• Atabledefinitioncontainstwoparts

1. Amatchdefinitionthatdefinesthetypeofmatch

(EXACT,LPM)andwhichfieldstomatchwith

2. Aactiondefinitionwhichcontainssetofactionpointers

correspondingtothematchresult

Page 28: PVPP: A Programmable Vector Packet Processoryo2seol/static/talks/pvpp-cisco.pdf · TCP IPv4 Ethernet UDP IPv6 BGP HTTP TLS Fixed Set of Protocols Fixed-Function Switch Chip. TCP IPv4

PVPPCLI• TwoCLIsarecurrentlysupported

1. Enable/DisablePVPPPipeline

$ pvpp [ingress interface name]

2. CLItoinstallmatchrulesforaparticulartable

$ pvpp insert-rule [table name]

[match value] [action name]

[runtime data]

Page 29: PVPP: A Programmable Vector Packet Processoryo2seol/static/talks/pvpp-cisco.pdf · TCP IPv4 Ethernet UDP IPv6 BGP HTTP TLS Fixed Set of Protocols Fixed-Function Switch Chip. TCP IPv4

PVPPDPDK

MoonGenSender/Receiver

MoonGenSender/Receiver

10Gx3 10Gx3

M1 M2 M3CPU:IntelXeonE5-2640v32.6GHzMemory:32GBRDIMM,2133MT/s,DualRankNICs:IntelX710DP/QPDASFP+CardsHDD:1TB7.2KRPMNLSAS6Gbps

Experimental Setup

Page 30: PVPP: A Programmable Vector Packet Processoryo2seol/static/talks/pvpp-cisco.pdf · TCP IPv4 Ethernet UDP IPv6 BGP HTTP TLS Fixed Set of Protocols Fixed-Function Switch Chip. TCP IPv4

BenchmarkApplication

IPv4_match

Match:ip.dstAddrAction:Set_nhop

drop

ParseEthernet/

IPv4

Match:ip.dstAddrAction:Set_dmac

drop

Destination MAC

Match:egress_portAction:Set_dmac

drop

Source MAC

Page 31: PVPP: A Programmable Vector Packet Processoryo2seol/static/talks/pvpp-cisco.pdf · TCP IPv4 Ethernet UDP IPv6 BGP HTTP TLS Fixed Set of Protocols Fixed-Function Switch Chip. TCP IPv4

BaselinePerformance

7.867.05

0

1

2

3

4

5

6

7

8

9

64

Throughp

ut(M

pps)

PacketSize(Bytes)

SingleNode MultipleNode

Page 32: PVPP: A Programmable Vector Packet Processoryo2seol/static/talks/pvpp-cisco.pdf · TCP IPv4 Ethernet UDP IPv6 BGP HTTP TLS Fixed Set of Protocols Fixed-Function Switch Chip. TCP IPv4

Compileroptimizations• Removeredundanttables

• Reducingmetadataaccess

• BypassingredundantVPPnodes

• Reducepointerdereference

• CachinglogicalHWinterfaces

• Unrollingloopsformultiplepacketprocessing

Page 33: PVPP: A Programmable Vector Packet Processoryo2seol/static/talks/pvpp-cisco.pdf · TCP IPv4 Ethernet UDP IPv6 BGP HTTP TLS Fixed Set of Protocols Fixed-Function Switch Chip. TCP IPv4

LoopUnrolling

Manuallyfetchestwopackets

Page 34: PVPP: A Programmable Vector Packet Processoryo2seol/static/talks/pvpp-cisco.pdf · TCP IPv4 Ethernet UDP IPv6 BGP HTTP TLS Fixed Set of Protocols Fixed-Function Switch Chip. TCP IPv4

OptimizedPerformance

7.86

9.25 9.51 9.51 9.58 10.01 10.21

7.05

8.38 8.50 8.80 8.89 9.02 9.20

0

2

4

6

8

10

12

Baseline RemovingRedundantTables

ReducingMetadataAccess

LoopUnrolling BypassingRedundantNodes

ReducingPointer

Dereferences

CachingLogicalHWInterface

Throughp

ut(M

pps)

SingleNode MultipleNode64bytepackets,single10Gport

Page 35: PVPP: A Programmable Vector Packet Processoryo2seol/static/talks/pvpp-cisco.pdf · TCP IPv4 Ethernet UDP IPv6 BGP HTTP TLS Fixed Set of Protocols Fixed-Function Switch Chip. TCP IPv4

OptimizedPerformance

10.21

8.07

5.634.38

9.208.07

5.65

4.38

0

2

4

6

8

10

12

64 128 192 256

Throughp

ut(M

pps)

PacketSize(Bytes)

SingleNode MultipleNode

Page 36: PVPP: A Programmable Vector Packet Processoryo2seol/static/talks/pvpp-cisco.pdf · TCP IPv4 Ethernet UDP IPv6 BGP HTTP TLS Fixed Set of Protocols Fixed-Function Switch Chip. TCP IPv4

OptimizedPerformance

010002000300040005000600070008000900010000

64 128 192 256

Throughp

ut(M

bps)

PacketSize(Bytes)

SingleNode MultipleNode

Page 37: PVPP: A Programmable Vector Packet Processoryo2seol/static/talks/pvpp-cisco.pdf · TCP IPv4 Ethernet UDP IPv6 BGP HTTP TLS Fixed Set of Protocols Fixed-Function Switch Chip. TCP IPv4

OptimizedPerformance

133.00149.00

171.00194.00

159.00172.30

222.30

255.20

0

50

100

150

200

250

300

64 128 192 256

AverageCP

UCyclesp

erPacket

PacketSize(Bytes)

SingleNode MultipleNode

Page 38: PVPP: A Programmable Vector Packet Processoryo2seol/static/talks/pvpp-cisco.pdf · TCP IPv4 Ethernet UDP IPv6 BGP HTTP TLS Fixed Set of Protocols Fixed-Function Switch Chip. TCP IPv4

Scalability

8.52

17.03

26.40

35.83

44.23

53.11

8.14

16.57

24.14

33.41

40.69

49.34

0

10

20

30

40

50

60

1 2 3 4 5 6

Throughp

ut(M

pps)

NumberofCPUs

SingleNode MultipleNode

64bytepacketsacross3x10Gports

Page 39: PVPP: A Programmable Vector Packet Processoryo2seol/static/talks/pvpp-cisco.pdf · TCP IPv4 Ethernet UDP IPv6 BGP HTTP TLS Fixed Set of Protocols Fixed-Function Switch Chip. TCP IPv4

PerformanceComparison

59.53

49.31

34.71

26.78

63.49

47.23

34.72

26.7830.22 30.22 30.20

26.78

0

10

20

30

40

50

60

70

64 128 192 256

Throughp

ut(M

pps)

PacketSize(Bytes)

PVPP PISCES(withMicroflow) PISCES(withoutMicroflow)

Page 40: PVPP: A Programmable Vector Packet Processoryo2seol/static/talks/pvpp-cisco.pdf · TCP IPv4 Ethernet UDP IPv6 BGP HTTP TLS Fixed Set of Protocols Fixed-Function Switch Chip. TCP IPv4

FutureWork

• Automatednodesplitsbasedontheinputprogram

• Morecompilerannotationsforlowlevelconstructs

• ExtendingP4supportsuchasdataplanestates

• VPPspecificP4_16backendcompiler

• ExtendingPVPPCLIfeatures

Page 41: PVPP: A Programmable Vector Packet Processoryo2seol/static/talks/pvpp-cisco.pdf · TCP IPv4 Ethernet UDP IPv6 BGP HTTP TLS Fixed Set of Protocols Fixed-Function Switch Chip. TCP IPv4

Summary

PVPP

VPP

P4- Aperformantanddynamically

reconfigurableP4switchbasedonadifferentpacketprocessingabstraction

- Moreimprovementsplannedoverthesummerpriortopublicrelease

Page 42: PVPP: A Programmable Vector Packet Processoryo2seol/static/talks/pvpp-cisco.pdf · TCP IPv4 Ethernet UDP IPv6 BGP HTTP TLS Fixed Set of Protocols Fixed-Function Switch Chip. TCP IPv4

Questions?