experiences with programmable dataplanes · p4 language • p4: programming protocol-independent...
TRANSCRIPT
ExperienceswithProgrammableDataplanes
RonaldvanderPolSURFnet
TNC2016,12-16June,Prague(CZ)
Overview
• MoLvaLonforProgrammableDataplanes• OpenFlowandPipelines• VariousNetworkSilicon• TableTypePaQterns(TTPs)andP4• Summary
TNC2016,12-16June,Prague(CZ)
Vertically integrated Closed, proprietary
Slow innovation Small industry
Specialized Operating System
Specialized Hardware
AppAppAppAppAppAppAppAppAppAppApp
Specialized Applications
Horizontal Open interfaces Rapid innovation
Huge industry
Microprocessor
Open Interface
Linux MacOS
Windows(OS) or or
Open Interface
(slidebyNick
(slidebyNickMcKeown,StanfordUniversity)
Vertically integrated Closed, proprietary
Slow innovation
AppAppAppAppAppAppAppAppAppAppApp
Horizontal Open interfaces Rapid innovation
ControlPlane
ControlPlane
ControlPlane or or
Open Interface
Specialized Control Plane
Specialized Hardware
Specialized Features
Merchant Switching Chips
Open Interface
(slidebyNickMcKeown,StanfordUniversity)
NetworkDisaggregaLon
• BestofbreedinhardwareandsoXware• OpenAPIs• OpenHardware• User/operatorincontrol
– Not(orless)dependentofvendorroadmaps– Implementandexperimentwithnewprotocols
NetworkDisaggregaLonEcosystem
TNC2016,12-16June,Prague(CZ)
OpenFlow
• OpenFlowgivesuser/operatordirectaccesstoflowforwardingtables
• OpenFlowprovidesMatch/AcLonsemanLcs• Supportedonmanyhardwareswitches
– PureOpenFlowswitches– Hybridswitches(convenLonalswitchadd-on)
• Many(opensource)controllerpla]orms• OpenFlowstartedthenetworkdisaggregaLonefforts
TNC2016,12-16June,Prague(CZ)
SoCASICbasedOpenFlowSwitches
• ManybasedonBroadcomASICs(e.g.Trident)• Onlyasmallfixedamountoflookuptables
– TCAM(wildcardentries,ACLs)– MACForwardingDatabase– L3longestprefixmatchtable– L3hostroutes
TNC2016,12-16June,Prague(CZ)
OpenFlow1.3MulLpleTables
• Preventflowentryexplosion• MulL-tablepipeline
table0
table1
tablen
ExecuteAction
Set
packet in packet outIngressPort
ActionSet = {}
ActionSet
Packet +IngressPort +
metadata Packet
ActionSet
TNC2016,12-16June,Prague(CZ)
MappingofFlowTables
ExecuteAction
Set
packet in packet outIngress
Port
ActionSet = {}
ActionSet
Packet +IngressPort +
metadata Packet
ActionSet
ingressport
packet in IPtable
MACtable
ExecuteAction
Set
egressport
packet out
OpenFlow 1.3 Pipeline
Broadcom Pipeline (simplified)
table0
ingressTCAM
based on Pica8 documentation
table1
tablen
TNC2016,12-16June,Prague(CZ)
BroadcomTridentII
• ThereisveryliQlepublictechnicalinformaLonbecauseofBroadcom’sNDA
• SeveralTCAMs,L2,L3,LPMtables• UnifiedForwardingTable(UFT)memorybankscanbeallocatedto:– L2entries– ARPentries– L3LPMentries– ExactmatchACLentries
TNC2016,12-16June,Prague(CZ)
BroadcomTridentIIUFTBANK SIZE
0 4Kx420bits
1 4Kx420bits
2 16Kx420bits
3 16Kx420bits
4 16Kx420bits
5 16Kx420bits
6 1Kx420bits
7 1Kx420bits
8 1Kx420bits
9 1Kx420bits
TNC2016,12-16June,Prague(CZ)
}DedicatedL2MAC(32Kx105bits)
}
SharedEntries(256Kx105bits)
}
DedicatedL3hostentries(16Kx105bits)
TridentIIUFTCombinaLonsMode L2 L3hosts LPM
0 288K 16K 0
1 224K 56K 0
2 160K 88K 0
3 96K 120K 0
4 32K 16K 128K(77K–IPv6)
TNC2016,12-16June,Prague(CZ)
LimitaLonsofSoCASICs
• FixedsemanLcstables(L2,L3,LPM,TCAM)• Fixedsizetables(orlimitedresizing)• NorecirculaLonofpackets(onepassthroughpipeline)
TNC2016,12-16June,Prague(CZ)
ASIC/OpenFlowLimitaLonExamples
• LimitaLonofSoCASICs– OpenDaylightServiceFuncLonChaining(SFC)projectconfiguresmulLpletables
– Theseendupin1TCAManddoesnotwork– Result:genericapplicaLonslikeODLSFCcannotbeused;applicaLonneedstobeadaptedtoASIC
• LimitaLonofOpenFlow– SLlldependenceonSDOsandvendorsfornewencapsulaLons/protocols
– WewanttoexperimentwithNetworkServicesHeader(NSH),butnosupportinOpenFlow
TNC2016,12-16June,Prague(CZ)
ProgrammableNetworkSilicon• FPGAs(FieldProgrammableGateArrays)+TCAM+DDR
– CorsaDP6410*)• NetworkProcessors(NPUs)+TCAM+DDR
– NoviFlowNS2128*)• FlowProcessor
– NetronomeNFP-4000**)• ProgrammableSwitchSilicon
– CaviumXpliant**)*)presentinSURFnettestbed**)sooninSURFnettestbed
TNC2016,12-16June,Prague(CZ)
Corsa(FPGA/TCAM/DDR3)
TNC2016,12-16June,Prague(CZ)
CONFIDENTIAL 10
Network Hardware Virtualization
Multiple SDN applications controlling Virtual Switches
Overlay
Hardware Resource Pool
Single piece of hardware
OpenFlow SDN App L3 Routing App
OpenFlow Switch
Any OpenFlow match ANY RateANY PortAny Protocol
L3 Routes + ACLsANY RateANY PortAny Protocol
Underlay
Optimized L3 Router
NoviFlowNS2128
SerD
es
MAC
s
TOPPacket Processors &
Search EnginesTraffic
Manager
OAM
Internal Memory
Classification &Queuing
Internal TCAM
SDRAM DDR3 Controllers
TNC2016,12-16June,Prague(CZ)
MellanoxEZchipNP-5
NoviFlowPipelineConfiguraLon
• Setconfigpipeline<id><size><width><type>– <type>isexact(DDR)orwildcard(TCAM)– Default
• 28wildcard+28exacttables• 4096rows• 40bytewide
TNC2016,12-16June,Prague(CZ)
PipelineAbstracLons
• FlexibleprogrammablepipelinesneedanabstracLontodescribethem
• Twopopularapproaches:– TableTypePaQerns(TTP)–OpenFlowpipelines– P4(ProgrammingProtocol-IndependentPacketProcessors)
• Bothcanbeusedto– LettheswitchadverLseitssupportedpipeline(s)– Telltheswitchwhatpipelinetoconstruct
TNC2016,12-16June,Prague(CZ)
TableTypePaQerns(TTPs)
• ATTPisanabstractmodelthatdescribes(inJSONsyntax)theforwardingbehaviour– DescripLonofflowtables– DescripLonofvalidflow_mods,group_modsandmeter_mods
• SwitchandcontrollermaysupportmulLpleTTPs
• AtstartupthereisanegoLaLonbetweenswitchandcontrolleraboutwhichTTPtouse
TNC2016,12-16June,Prague(CZ)
P4Language• P4:ProgrammingProtocol-IndependentPacketProcessors
• DomainSpecificLanguageforprogrammabledataplanes
• P4programàP4compileràtargetcode
• TargetcodeisloadedonP4switch• Consistsofpacketparserandlookuptables
TNC2016,12-16June,Prague(CZ)
P4Switch
INPUT
MatchAction
MatchAction
OUTPUT
ParseGraph
ControlProgram
Match+ActionTable Config
Ingress Egress
Switch Configuration
P4 Switch
PARSER
Queuesand/orBuffers
Source: The P4 Language SpecificationVersion 1.0.2
TNC2016,12-16June,Prague(CZ)
ExampleP4HeaderDefiniLons
header_typeethernet_t{fields{dstAddr:48;srcAddr:48;etherType:16;}}
header_typeipv4_t{fields{version:4;ihl:4;diffserv:8;totalLen:16;idenLficaLon:16;flags:3;fragOffset:13;Ql:8;protocol:8;hdrChecksum:16;srcAddr:32;dstAddr:32;}}
TNC2016,12-16June,Prague(CZ)
ExampleP4Parserparserstart{returnparse_ethernet;}parserparse_ethernet{extract(ethernet);returnselect(latest.etherType){ETHERTYPE_IPV4:parse_ipv4;default:ingress;}}parserparse_ipv4{extract(ipv4);returningress;}
TNC2016,12-16June,Prague(CZ)
P4SupportedTableTypes• Exact:value==tableentry
– E.g.IPv4hostroute• Ternary:valueANDmask==tableentry
– Wildcard• LPM:LongestPrefixMatch
– Specialcaseofternary(1111….11110000.....0000)• Range:lowentry<=value<=highentry• Valid:tableentry={true,false}
– True:headerfieldisvalid– False:headerfieldisnotvalid
TNC2016,12-16June,Prague(CZ)
P4SupportedChecksumAlgorithms
• XOR16
• CSUM16
• CRC16
• CRC32
• Programmable_CRC– ArbitraryCRCpolynomial
TNC2016,12-16June,Prague(CZ)
AddiLonalP4Features• Counters
– Type:bytesorpackets– Min-width– SaturaLng:stopcounLng;defaultiswrap
• Meters
• Registers
• Resubmit(originalpacket+metadata)
• Recirculate(packetaXeregressmodificaLons)
TNC2016,12-16June,Prague(CZ)
P4ControlFlow• If/else
• +,*,-,<<,>>,&,|,^
• ~,-
• OR,AND
• >,>=,==,<=,<,!=
TNC2016,12-16June,Prague(CZ)
WorkFlow
• WriteP4program,typicallythesesourcefiles:– foo.p4– headers.p4– parser.p4
• ConvertP4programtoJSONconfiguraLon
• LoadJSONconfiguraLononP4switch
TNC2016,12-16June,Prague(CZ)
NetworkAbstracLonLayers
TNC2016,12-16June,Prague(CZ)
Open Switch/Open Network Linux
Broadcom Trident II
OpenNSL
SONiC
White Label Switch
SAI
ProgrammableData Planes
TBD
FBOSSQuagga
Extensions
P4
abstractionlayers
Summary• OpenFlowstartedthenetworkingdisaggregaLon• ManycompanieshavejoinedthenetworkingdisaggregaLonefforts
• Manyopenhardwarevendors• SeveralopensourcenetworkoperaLngsystemsandrelatedecosystems
• Variousnewprogrammablenetworksiliconisemerging,TODO:– fitthissiliconintheopenNOSecosystems– workondesignofopenAPIsandnetworkabstracFons
TNC2016,12-16June,Prague(CZ)