SlideShare a Scribd company logo
SDN Forwarding Abstractions
• Programmable data plane
• “Forwarding Metamorphosis: Fast Programmable Match-Action Processing in
Hardware for SDN”, SIGCOMM’2013.
• “P4: Programming Protocol-Independent Packet Processors”, SIGCOMM
Computer Communications Review, July 2014.
Forwarding Metamorphosis
 The problem addressed in this paper: The current hardware switches
are rigid, what is the cost to make them flexible to support OpenFlow
forwarding abstraction.
Conventional switch chips are inflexible
SDN demands flexibility…sounds expensive…
How do we do it: The Reconfigurable Match Table (RMT) switch model
Flexibility costs less than 15%
Flexible match-action
 Single Match table
 All header in one table
 To support flexibility, the table needs to store all combination in the header.
 Wasteful
 Multiple Match Tables
 Smaller tables with a subset of headers in a pipeline of stages
 Stage j can be made depend on stage i, i<j.
 Existing switches has a small (4-8) number of tables whose widths, depths,
and execution order are fixed.
A fixed function switch
Deparser
In
Queues
Data
Out
ACL
Stage
L3
Stage
L2
Stage
Action:
set
L2D
Stage 1
L2
Table
L2: 128k x 48
Exact match
Action:
set
L2D,
dec
TTL
Stage 2
L3
Table
L3: 16k x 32
Longest prefix
match
Action:
permit/deny
Stage 3
ACL
Table
ACL: 4k
Ternary match
?????????
Parser
X X X X X
What flexibility does OpenFlow need?
o Multiple stages of match-action
 Flexible resource allocation
 Flexible header fields
 Flexible actions
Other alternatives for SDN to get the
flexibility?
• Software? 100x slower
• NPUs? 10x slower, expensive
• FPGAs? 10x slower, expensive
• Need to keep up with 1Tb/s speed!!
What is in this paper?
 How to design a flexible switch chip?
 What does the flexibility cost?
Reconfigurable Match Tables (RMT)
 Ideal RMT should allow a set of pipeline stages each with a match
table of arbitrary depth and width.
 RMT goes beyond fixed function MMT in four ways
 field definitions can be changed and new fields can be added.
 The number, topology, widths and depths of match tables can be specified,
subject only to the overall resource limit on the number of matched bits.
 New actions can be defined.
 Arbitrarily modified packets can be placed in specified queue(s).
 The configuration should be done by an SDN controller.
RMT model, and header field flexibility
• The parser specifies the header fields of interests, and generates a
4kb header vector (put the fields in a specific location in the vector).
 change header field, add new header
The RMT model: flexibility in the number,
topology, widths and depths of match tables
• More physical stages than
logical stages. A logical
stages can be mapped to
the physical stage.
• Logical stage specified by
table graph.
The RMT model: flexibility in the number,
topology, widths and depths of match tables
• Restrictions for realizability
• Physical pipeline stage
• Match restriction: a fixed number
stages (32)
• Packet header limits: the packet
header vector has a fixed size (4kb)
• Memory restriction: identical
number of entries for all
• Action restrictions: number of
complexity of instructions
• Not generic inst., just modify
headers.
The RMT model: flexible actions and header
update
RMT abstract model
• Controlling the configuration
 Parse graph
Table Flow Graph
L2/L3 switch
RCP and ACL support
Chip design
Configurable Parser
• Input: packet data, parser
graph stored in TCAM
• Output 4kb header vector
RMT Switch Design
• 64 x 10Gb ports
• 960M packets/second
• 1GHz pipeline
• Programmable parser
• 32 Match/action stages
• Huge TCAM: 10x current chips
• 64K TCAM words x 640b
• SRAM hash tables for exact matches
• 128K words x 640b
• 224 action processors per stage
• All OpenFlow statistics counters
Cost of Configurability:
Comparison with Conventional Switch
• Many functions identical: I/O, data buffer, queueing…
• Make extra functions optional: statistics
• Memory dominates area
• Compare memory area/bit and bit count
• RMT must use memory bits efficiently to compete on cost
• Techniques for flexibility
• Match stage unit RAM configurability
• Ingress/egress resource sharing
• Table predication allows multiple tables per stage
• Match memory overhead reduction
• Match memory multi-word packing
Chip Comparison with Fixed Function Switches
Section Area % of chip Extra Cost
IO, buffer, queue, CPU, etc 37% 0.0%
Match memory & logic 54.3% 8.0%
VLIW action engine 7.4% 5.5%
Parser + deparser 1.3% 0.7%
Total extra area cost 14.2%
Section Power % of chip Extra Cost
I/O 26.0% 0.0%
Memory leakage 43.7% 4.0%
Logic leakage 7.3% 2.5%
RAM active 2.7% 0.4%
TCAM active 3.5% 0.0%
Logic active 16.8% 5.5%
Total extra power cost 12.4%
Area
Power
10/20/14 Software Defined Networking (COMS 6998-10)
Conclusion
• How do we design a flexible chip?
• The RMT switch model
• Bring processing close to the memories:
• pipeline of many stages
• Bring the processing to the wires:
• 224 action CPUs per stage
• How much does it cost?
• 15%
• Lots of the details how this is designed in 28nm CMOS are in the
paper
10/20/14 Software Defined Networking (COMS 6998-10) Source: P. Bosshart, TI
SDN Forwarding Abstractions
• Programmable data plane
• “Forwarding Metamorphosis: Fast Programmable Match-Action Processing in
Hardware for SDN”, SIGCOMM’2013.
• “P4: Programming Protocol-Independent Packet Processors”, SIGCOMM
Computer Communications Review, July 2014.
In the Beginning…
• OpenFlow was simple
• A single rule table
• Priority, pattern, actions, counters, timeouts
• Matching on any of 12 fields, e.g.,
• MAC addresses
• IP addresses
• Transport protocol
• Transport port numbers
Over the Past Five Years…
24
Version Date # Headers
OF 1.0 Dec 2009 12
OF 1.1 Feb 2011 15
OF 1.2 Dec 2011 36
OF 1.3 Jun 2012 40
OF 1.4 Oct 2013 41
Proliferation of header fields
Multiple stages of heterogeneous tables
Still not enough (e.g., VXLAN, NVGRE, STT, …)
Future SDN Switches
• Configurable packet parser
• Not tied to a specific header format
• Flexible match+action tables
• Multiple tables (in series and/or parallel)
• Able to match on all defined fields
• General packet-processing primitives
• Copy, add, remove, and modify
• For both header fields and meta-data
25
We Can Do This!
• New generation of switch ASICs
• Intel FlexPipe: programmable parser,
• RMT [SIGCOMM’13]
• Cisco Doppler
• But, programming these chips is hard
• Custom, vendor-specific interfaces
• Low-level, akin to microcode programming
We need a higher-level interface
To tell the programmable switch how we want it to behave
Three Goals for the language
• Protocol independence
• Configure a packet parser
• Define a set of typed match+action tables
• Target independence
• Program without knowledge of switch details
• Rely on compiler to configure the target switch
• Reconfigurability
• Change parsing and processing in the field
“Classic” OpenFlow (1.x)
29
Target Switch
SDN Control Plane
Installing and
querying rules
“OpenFlow 2.0”
30
Target Switch
SDN Control Plane
Populating:
Installing and querying
rules
Compiler
Configuring:
Parser, tables, and
control flow
Parser & Table
Configuration
Rule
Translator
P4 Language
Programming Protocol-Independent Packet Processing
Telling programmable switches what to do
31
Abstract forwarding model (target
abstraction)
P4 Concepts
• A P4 program contains definitions of the following
 Headers: describes the sequence and structure of a series of fields (fields
width and constraints on field values)
 Parsers: A parser definition specifies how to identify headers and valid
header sequence within packets
 Tables: Match+action tables are the mechanism for performing packet
processing. P4 program defines the fields on which a table may match and the
actions it may execute.
 Actions: P4 supports construction of complex actions from simpler protocol-
independent primitives. Actions are available within match-action tables.
 Control programs: the control program determines the order of match-
action tables that are applied to a packet, describing the flow of control
between match+action tables.
P4 language by example
• Data-center routing
• Top-of-rack switches
• Two tiers of core switches
• Source routing by ToR
• Hierarchical tag (mTag)
• Pushed by the ToR
• Four one-byte fields
• Two hops up, two down
34
up1
up2 down1
down2
ToR ToR
Header Formats
• Header
• Ordered list of fields
• A field has a name and width
header ethernet {
fields {
dst_addr : 48;
src_addr : 48;
ethertype : 16;
}
}
header mTag {
fields {
up1 : 8;
up2 : 8;
down1 : 8;
down2 : 8;
ethertype : 16;
}
}
header vlan {
fields {
pcp : 3;
cfi : 1;
vid : 12;
ethertype : 16;
}
}
Parser
• State machine traversing the packet
• Extracting field values as it goes
36
parser start { parser vlan {
ethernet; switch(ethertype) {
} case 0xaaaa : mTag;
case 0x800 : ipv4;
parser ethernet { . . .
switch(ethertype) { }
case 0x8100 : vlan;
case 0x9100 : vlan; parser mTag {
case 0x800 : ipv4; switch(ethertype) {
. . . case 0x800 : ipv4;
} . . .
} }
}
Match-action Tables
• Describe each packet-processing stage
• What fields are matched, and in what way
• What action functions are performed
• (Optionally) a hint about max number of rules
37
table mTag_table {
reads {
ethernet.dst_addr : exact;
vlan.vid : exact;
}
actions {
add_mTag;
}
max_size : 20000;
}
table local_switching {
// read destination and checks if local
// if miss occurs, goto mtag table
}
table local_switching {
//verify egress is resolved
// do not retag packets received with tag
// read egress and whether packet was mtagged
}
Action Functions
• Custom actions built from primitives
• Add, remove, copy, set, increment, checksum
38
action add_mTag(up1, up2, down1, down2, outport) {
add_header(mTag);
copy_field(mTag.ethertype, vlan.ethertype);
set_field(vlan.ethertype, 0xaaaa);
set_field(mTag.up1, up1);
set_field(mTag.up2, up2);
set_field(mTag.down1, down1);
set_field(mTag.down2, down2);
set_field(metadata.outport, outport);
}
Control Flow
• Flow of control from one table to the next
• Collection of functions, conditionals, and tables
• For a ToR switch:
39
ToR
From core
(with mTag)
From local hosts
(with no mTag)
Source
Check
Table
Local
Switching
Table
Egress
Check
mTag
Table
Miss: Not Local
Control Flow
• Flow of control from one table to the next
• Collection of functions, conditionals, and tables
• Simple imperative representation
40
control main() {
table(source_check);
if (!defined(metadata.ingress_error)) {
table(local_switching);
if (!defined(metadata.outport)) {
table(mTag_table);
}
table(egress_check);
}
}
P4 Compilation
41
P4 Compiler
• Parser
• Programmable parser: translate to state machine
• Fixed parser: verify the description is consistent
• Control program
• Target-independent: table graph of dependencies
• Target-dependent: mapping to switch resources
• Rule translation
• Verify that rules agree with the (logical) table types
• Translate the rules to the physical tables
42
Compiling packet parser
• Compile into a state machine
Compiling control programs
• And then to a target specific back-end
control main() {
table(source_check);
if (!defined(metadata.ingress_error)) {
table(local_switching);
if (!defined(metadata.outport)) {
table(mTag_table);
}
table(egress_check);
}
}
Conclusion
• OpenFlow 1.x
• Vendor-agnostic API
• But, only for fixed-function switches
• An alternate future
• Protocol independence
• Target independence
• Reconfigurability in the field
• P4 language: a straw-man proposal
• To trigger discussion and debate
• Much, much more work to do!
45

More Related Content

Similar to lect13_programmable_dp.pptx

A Dataflow Processing Chip for Training Deep Neural Networks
A Dataflow Processing Chip for Training Deep Neural NetworksA Dataflow Processing Chip for Training Deep Neural Networks
A Dataflow Processing Chip for Training Deep Neural Networks
inside-BigData.com
 
Hpc 4 5
Hpc 4 5Hpc 4 5
Hpc 4 5
Yasir Khan
 
Hpg2011 papers kazakov
Hpg2011 papers kazakovHpg2011 papers kazakov
Hpg2011 papers kazakov
mistercteam
 
Morph : a novel accelerator
Morph : a novel acceleratorMorph : a novel accelerator
Morph : a novel accelerator
BaharJV
 
2016 NCTU P4 Workshop
2016 NCTU P4 Workshop2016 NCTU P4 Workshop
2016 NCTU P4 Workshop
Yi Tseng
 
PEARC17: Interactive Code Adaptation Tool for Modernizing Applications for In...
PEARC17: Interactive Code Adaptation Tool for Modernizing Applications for In...PEARC17: Interactive Code Adaptation Tool for Modernizing Applications for In...
PEARC17: Interactive Code Adaptation Tool for Modernizing Applications for In...
Ritu Arora
 
13 risc
13 risc13 risc
Maxwell siuc hpc_description_tutorial
Maxwell siuc hpc_description_tutorialMaxwell siuc hpc_description_tutorial
Maxwell siuc hpc_description_tutorial
madhuinturi
 
FIne Grain Multithreading
FIne Grain MultithreadingFIne Grain Multithreading
FIne Grain Multithreading
Dharmesh Tank
 
PD_Tcl_Examples
PD_Tcl_ExamplesPD_Tcl_Examples
PD_Tcl_Examples
Lee Johnson
 
Intel’S Larrabee
Intel’S LarrabeeIntel’S Larrabee
Intel’S Larrabee
vipinpnair
 
Logic synthesis,flootplan&placement
Logic synthesis,flootplan&placementLogic synthesis,flootplan&placement
Logic synthesis,flootplan&placement
shaik sharief
 
Microprocessor Miscellaneous datatrans+directives
Microprocessor Miscellaneous datatrans+directivesMicroprocessor Miscellaneous datatrans+directives
Microprocessor Miscellaneous datatrans+directives
waqasahmad1995
 
A tour of Amazon Redshift
A tour of Amazon RedshiftA tour of Amazon Redshift
A tour of Amazon Redshift
Kel Graham
 
Lecture summary: architectures for baseband signal processing of wireless com...
Lecture summary: architectures for baseband signal processing of wireless com...Lecture summary: architectures for baseband signal processing of wireless com...
Lecture summary: architectures for baseband signal processing of wireless com...
Frank Kienle
 
Software defined network
Software defined network Software defined network
Software defined network
Sindhu Bharadwaj
 
24-02-18 Rejender pratap.pdf
24-02-18 Rejender pratap.pdf24-02-18 Rejender pratap.pdf
24-02-18 Rejender pratap.pdf
FrangoCamila
 
Apache Big Data 2016: Next Gen Big Data Analytics with Apache Apex
Apache Big Data 2016: Next Gen Big Data Analytics with Apache ApexApache Big Data 2016: Next Gen Big Data Analytics with Apache Apex
Apache Big Data 2016: Next Gen Big Data Analytics with Apache Apex
Apache Apex
 
Fast switching of threads between cores - Advanced Operating Systems
Fast switching of threads between cores - Advanced Operating SystemsFast switching of threads between cores - Advanced Operating Systems
Fast switching of threads between cores - Advanced Operating Systems
Ruhaim Izmeth
 
8086 Microprocessor Architecture: 16-bit microprocessor
8086 Microprocessor Architecture: 16-bit microprocessor8086 Microprocessor Architecture: 16-bit microprocessor
8086 Microprocessor Architecture: 16-bit microprocessor
AshwiniTodkar4
 

Similar to lect13_programmable_dp.pptx (20)

A Dataflow Processing Chip for Training Deep Neural Networks
A Dataflow Processing Chip for Training Deep Neural NetworksA Dataflow Processing Chip for Training Deep Neural Networks
A Dataflow Processing Chip for Training Deep Neural Networks
 
Hpc 4 5
Hpc 4 5Hpc 4 5
Hpc 4 5
 
Hpg2011 papers kazakov
Hpg2011 papers kazakovHpg2011 papers kazakov
Hpg2011 papers kazakov
 
Morph : a novel accelerator
Morph : a novel acceleratorMorph : a novel accelerator
Morph : a novel accelerator
 
2016 NCTU P4 Workshop
2016 NCTU P4 Workshop2016 NCTU P4 Workshop
2016 NCTU P4 Workshop
 
PEARC17: Interactive Code Adaptation Tool for Modernizing Applications for In...
PEARC17: Interactive Code Adaptation Tool for Modernizing Applications for In...PEARC17: Interactive Code Adaptation Tool for Modernizing Applications for In...
PEARC17: Interactive Code Adaptation Tool for Modernizing Applications for In...
 
13 risc
13 risc13 risc
13 risc
 
Maxwell siuc hpc_description_tutorial
Maxwell siuc hpc_description_tutorialMaxwell siuc hpc_description_tutorial
Maxwell siuc hpc_description_tutorial
 
FIne Grain Multithreading
FIne Grain MultithreadingFIne Grain Multithreading
FIne Grain Multithreading
 
PD_Tcl_Examples
PD_Tcl_ExamplesPD_Tcl_Examples
PD_Tcl_Examples
 
Intel’S Larrabee
Intel’S LarrabeeIntel’S Larrabee
Intel’S Larrabee
 
Logic synthesis,flootplan&placement
Logic synthesis,flootplan&placementLogic synthesis,flootplan&placement
Logic synthesis,flootplan&placement
 
Microprocessor Miscellaneous datatrans+directives
Microprocessor Miscellaneous datatrans+directivesMicroprocessor Miscellaneous datatrans+directives
Microprocessor Miscellaneous datatrans+directives
 
A tour of Amazon Redshift
A tour of Amazon RedshiftA tour of Amazon Redshift
A tour of Amazon Redshift
 
Lecture summary: architectures for baseband signal processing of wireless com...
Lecture summary: architectures for baseband signal processing of wireless com...Lecture summary: architectures for baseband signal processing of wireless com...
Lecture summary: architectures for baseband signal processing of wireless com...
 
Software defined network
Software defined network Software defined network
Software defined network
 
24-02-18 Rejender pratap.pdf
24-02-18 Rejender pratap.pdf24-02-18 Rejender pratap.pdf
24-02-18 Rejender pratap.pdf
 
Apache Big Data 2016: Next Gen Big Data Analytics with Apache Apex
Apache Big Data 2016: Next Gen Big Data Analytics with Apache ApexApache Big Data 2016: Next Gen Big Data Analytics with Apache Apex
Apache Big Data 2016: Next Gen Big Data Analytics with Apache Apex
 
Fast switching of threads between cores - Advanced Operating Systems
Fast switching of threads between cores - Advanced Operating SystemsFast switching of threads between cores - Advanced Operating Systems
Fast switching of threads between cores - Advanced Operating Systems
 
8086 Microprocessor Architecture: 16-bit microprocessor
8086 Microprocessor Architecture: 16-bit microprocessor8086 Microprocessor Architecture: 16-bit microprocessor
8086 Microprocessor Architecture: 16-bit microprocessor
 

Recently uploaded

Top five deadliest dog breeds in America
Top five deadliest dog breeds in AmericaTop five deadliest dog breeds in America
Top five deadliest dog breeds in America
Bisnar Chase Personal Injury Attorneys
 
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective UpskillingYour Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Excellence Foundation for South Sudan
 
DRUGS AND ITS classification slide share
DRUGS AND ITS classification slide shareDRUGS AND ITS classification slide share
DRUGS AND ITS classification slide share
taiba qazi
 
The History of Stoke Newington Street Names
The History of Stoke Newington Street NamesThe History of Stoke Newington Street Names
The History of Stoke Newington Street Names
History of Stoke Newington
 
World environment day ppt For 5 June 2024
World environment day ppt For 5 June 2024World environment day ppt For 5 June 2024
World environment day ppt For 5 June 2024
ak6969907
 
Advantages and Disadvantages of CMS from an SEO Perspective
Advantages and Disadvantages of CMS from an SEO PerspectiveAdvantages and Disadvantages of CMS from an SEO Perspective
Advantages and Disadvantages of CMS from an SEO Perspective
Krisztián Száraz
 
Film vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movieFilm vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movie
Nicholas Montgomery
 
Advanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docxAdvanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docx
adhitya5119
 
South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)
Academy of Science of South Africa
 
How to Fix the Import Error in the Odoo 17
How to Fix the Import Error in the Odoo 17How to Fix the Import Error in the Odoo 17
How to Fix the Import Error in the Odoo 17
Celine George
 
Group Presentation 2 Economics.Ariana Buscigliopptx
Group Presentation 2 Economics.Ariana BuscigliopptxGroup Presentation 2 Economics.Ariana Buscigliopptx
Group Presentation 2 Economics.Ariana Buscigliopptx
ArianaBusciglio
 
clinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdfclinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdf
Priyankaranawat4
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
Levi Shapiro
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
camakaiclarkmusic
 
PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.
Dr. Shivangi Singh Parihar
 
Assignment_4_ArianaBusciglio Marvel(1).docx
Assignment_4_ArianaBusciglio Marvel(1).docxAssignment_4_ArianaBusciglio Marvel(1).docx
Assignment_4_ArianaBusciglio Marvel(1).docx
ArianaBusciglio
 
Azure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHatAzure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHat
Scholarhat
 
writing about opinions about Australia the movie
writing about opinions about Australia the moviewriting about opinions about Australia the movie
writing about opinions about Australia the movie
Nicholas Montgomery
 
The basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptxThe basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptx
heathfieldcps1
 
A Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdfA Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdf
Jean Carlos Nunes Paixão
 

Recently uploaded (20)

Top five deadliest dog breeds in America
Top five deadliest dog breeds in AmericaTop five deadliest dog breeds in America
Top five deadliest dog breeds in America
 
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective UpskillingYour Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective Upskilling
 
DRUGS AND ITS classification slide share
DRUGS AND ITS classification slide shareDRUGS AND ITS classification slide share
DRUGS AND ITS classification slide share
 
The History of Stoke Newington Street Names
The History of Stoke Newington Street NamesThe History of Stoke Newington Street Names
The History of Stoke Newington Street Names
 
World environment day ppt For 5 June 2024
World environment day ppt For 5 June 2024World environment day ppt For 5 June 2024
World environment day ppt For 5 June 2024
 
Advantages and Disadvantages of CMS from an SEO Perspective
Advantages and Disadvantages of CMS from an SEO PerspectiveAdvantages and Disadvantages of CMS from an SEO Perspective
Advantages and Disadvantages of CMS from an SEO Perspective
 
Film vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movieFilm vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movie
 
Advanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docxAdvanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docx
 
South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)
 
How to Fix the Import Error in the Odoo 17
How to Fix the Import Error in the Odoo 17How to Fix the Import Error in the Odoo 17
How to Fix the Import Error in the Odoo 17
 
Group Presentation 2 Economics.Ariana Buscigliopptx
Group Presentation 2 Economics.Ariana BuscigliopptxGroup Presentation 2 Economics.Ariana Buscigliopptx
Group Presentation 2 Economics.Ariana Buscigliopptx
 
clinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdfclinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdf
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
 
PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.
 
Assignment_4_ArianaBusciglio Marvel(1).docx
Assignment_4_ArianaBusciglio Marvel(1).docxAssignment_4_ArianaBusciglio Marvel(1).docx
Assignment_4_ArianaBusciglio Marvel(1).docx
 
Azure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHatAzure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHat
 
writing about opinions about Australia the movie
writing about opinions about Australia the moviewriting about opinions about Australia the movie
writing about opinions about Australia the movie
 
The basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptxThe basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptx
 
A Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdfA Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdf
 

lect13_programmable_dp.pptx

  • 1. SDN Forwarding Abstractions • Programmable data plane • “Forwarding Metamorphosis: Fast Programmable Match-Action Processing in Hardware for SDN”, SIGCOMM’2013. • “P4: Programming Protocol-Independent Packet Processors”, SIGCOMM Computer Communications Review, July 2014.
  • 2. Forwarding Metamorphosis  The problem addressed in this paper: The current hardware switches are rigid, what is the cost to make them flexible to support OpenFlow forwarding abstraction. Conventional switch chips are inflexible SDN demands flexibility…sounds expensive… How do we do it: The Reconfigurable Match Table (RMT) switch model Flexibility costs less than 15%
  • 3. Flexible match-action  Single Match table  All header in one table  To support flexibility, the table needs to store all combination in the header.  Wasteful  Multiple Match Tables  Smaller tables with a subset of headers in a pipeline of stages  Stage j can be made depend on stage i, i<j.  Existing switches has a small (4-8) number of tables whose widths, depths, and execution order are fixed.
  • 4. A fixed function switch Deparser In Queues Data Out ACL Stage L3 Stage L2 Stage Action: set L2D Stage 1 L2 Table L2: 128k x 48 Exact match Action: set L2D, dec TTL Stage 2 L3 Table L3: 16k x 32 Longest prefix match Action: permit/deny Stage 3 ACL Table ACL: 4k Ternary match ????????? Parser X X X X X
  • 5. What flexibility does OpenFlow need? o Multiple stages of match-action  Flexible resource allocation  Flexible header fields  Flexible actions
  • 6. Other alternatives for SDN to get the flexibility? • Software? 100x slower • NPUs? 10x slower, expensive • FPGAs? 10x slower, expensive • Need to keep up with 1Tb/s speed!!
  • 7. What is in this paper?  How to design a flexible switch chip?  What does the flexibility cost?
  • 8. Reconfigurable Match Tables (RMT)  Ideal RMT should allow a set of pipeline stages each with a match table of arbitrary depth and width.  RMT goes beyond fixed function MMT in four ways  field definitions can be changed and new fields can be added.  The number, topology, widths and depths of match tables can be specified, subject only to the overall resource limit on the number of matched bits.  New actions can be defined.  Arbitrarily modified packets can be placed in specified queue(s).  The configuration should be done by an SDN controller.
  • 9. RMT model, and header field flexibility • The parser specifies the header fields of interests, and generates a 4kb header vector (put the fields in a specific location in the vector).  change header field, add new header
  • 10. The RMT model: flexibility in the number, topology, widths and depths of match tables • More physical stages than logical stages. A logical stages can be mapped to the physical stage. • Logical stage specified by table graph.
  • 11. The RMT model: flexibility in the number, topology, widths and depths of match tables • Restrictions for realizability • Physical pipeline stage • Match restriction: a fixed number stages (32) • Packet header limits: the packet header vector has a fixed size (4kb) • Memory restriction: identical number of entries for all • Action restrictions: number of complexity of instructions • Not generic inst., just modify headers.
  • 12. The RMT model: flexible actions and header update
  • 13. RMT abstract model • Controlling the configuration  Parse graph Table Flow Graph
  • 15. RCP and ACL support
  • 17. Configurable Parser • Input: packet data, parser graph stored in TCAM • Output 4kb header vector
  • 18. RMT Switch Design • 64 x 10Gb ports • 960M packets/second • 1GHz pipeline • Programmable parser • 32 Match/action stages • Huge TCAM: 10x current chips • 64K TCAM words x 640b • SRAM hash tables for exact matches • 128K words x 640b • 224 action processors per stage • All OpenFlow statistics counters
  • 19. Cost of Configurability: Comparison with Conventional Switch • Many functions identical: I/O, data buffer, queueing… • Make extra functions optional: statistics • Memory dominates area • Compare memory area/bit and bit count • RMT must use memory bits efficiently to compete on cost • Techniques for flexibility • Match stage unit RAM configurability • Ingress/egress resource sharing • Table predication allows multiple tables per stage • Match memory overhead reduction • Match memory multi-word packing
  • 20. Chip Comparison with Fixed Function Switches Section Area % of chip Extra Cost IO, buffer, queue, CPU, etc 37% 0.0% Match memory & logic 54.3% 8.0% VLIW action engine 7.4% 5.5% Parser + deparser 1.3% 0.7% Total extra area cost 14.2% Section Power % of chip Extra Cost I/O 26.0% 0.0% Memory leakage 43.7% 4.0% Logic leakage 7.3% 2.5% RAM active 2.7% 0.4% TCAM active 3.5% 0.0% Logic active 16.8% 5.5% Total extra power cost 12.4% Area Power 10/20/14 Software Defined Networking (COMS 6998-10)
  • 21. Conclusion • How do we design a flexible chip? • The RMT switch model • Bring processing close to the memories: • pipeline of many stages • Bring the processing to the wires: • 224 action CPUs per stage • How much does it cost? • 15% • Lots of the details how this is designed in 28nm CMOS are in the paper 10/20/14 Software Defined Networking (COMS 6998-10) Source: P. Bosshart, TI
  • 22. SDN Forwarding Abstractions • Programmable data plane • “Forwarding Metamorphosis: Fast Programmable Match-Action Processing in Hardware for SDN”, SIGCOMM’2013. • “P4: Programming Protocol-Independent Packet Processors”, SIGCOMM Computer Communications Review, July 2014.
  • 23. In the Beginning… • OpenFlow was simple • A single rule table • Priority, pattern, actions, counters, timeouts • Matching on any of 12 fields, e.g., • MAC addresses • IP addresses • Transport protocol • Transport port numbers
  • 24. Over the Past Five Years… 24 Version Date # Headers OF 1.0 Dec 2009 12 OF 1.1 Feb 2011 15 OF 1.2 Dec 2011 36 OF 1.3 Jun 2012 40 OF 1.4 Oct 2013 41 Proliferation of header fields Multiple stages of heterogeneous tables Still not enough (e.g., VXLAN, NVGRE, STT, …)
  • 25. Future SDN Switches • Configurable packet parser • Not tied to a specific header format • Flexible match+action tables • Multiple tables (in series and/or parallel) • Able to match on all defined fields • General packet-processing primitives • Copy, add, remove, and modify • For both header fields and meta-data 25
  • 26. We Can Do This! • New generation of switch ASICs • Intel FlexPipe: programmable parser, • RMT [SIGCOMM’13] • Cisco Doppler • But, programming these chips is hard • Custom, vendor-specific interfaces • Low-level, akin to microcode programming
  • 27. We need a higher-level interface To tell the programmable switch how we want it to behave
  • 28. Three Goals for the language • Protocol independence • Configure a packet parser • Define a set of typed match+action tables • Target independence • Program without knowledge of switch details • Rely on compiler to configure the target switch • Reconfigurability • Change parsing and processing in the field
  • 29. “Classic” OpenFlow (1.x) 29 Target Switch SDN Control Plane Installing and querying rules
  • 30. “OpenFlow 2.0” 30 Target Switch SDN Control Plane Populating: Installing and querying rules Compiler Configuring: Parser, tables, and control flow Parser & Table Configuration Rule Translator
  • 31. P4 Language Programming Protocol-Independent Packet Processing Telling programmable switches what to do 31
  • 32. Abstract forwarding model (target abstraction)
  • 33. P4 Concepts • A P4 program contains definitions of the following  Headers: describes the sequence and structure of a series of fields (fields width and constraints on field values)  Parsers: A parser definition specifies how to identify headers and valid header sequence within packets  Tables: Match+action tables are the mechanism for performing packet processing. P4 program defines the fields on which a table may match and the actions it may execute.  Actions: P4 supports construction of complex actions from simpler protocol- independent primitives. Actions are available within match-action tables.  Control programs: the control program determines the order of match- action tables that are applied to a packet, describing the flow of control between match+action tables.
  • 34. P4 language by example • Data-center routing • Top-of-rack switches • Two tiers of core switches • Source routing by ToR • Hierarchical tag (mTag) • Pushed by the ToR • Four one-byte fields • Two hops up, two down 34 up1 up2 down1 down2 ToR ToR
  • 35. Header Formats • Header • Ordered list of fields • A field has a name and width header ethernet { fields { dst_addr : 48; src_addr : 48; ethertype : 16; } } header mTag { fields { up1 : 8; up2 : 8; down1 : 8; down2 : 8; ethertype : 16; } } header vlan { fields { pcp : 3; cfi : 1; vid : 12; ethertype : 16; } }
  • 36. Parser • State machine traversing the packet • Extracting field values as it goes 36 parser start { parser vlan { ethernet; switch(ethertype) { } case 0xaaaa : mTag; case 0x800 : ipv4; parser ethernet { . . . switch(ethertype) { } case 0x8100 : vlan; case 0x9100 : vlan; parser mTag { case 0x800 : ipv4; switch(ethertype) { . . . case 0x800 : ipv4; } . . . } } }
  • 37. Match-action Tables • Describe each packet-processing stage • What fields are matched, and in what way • What action functions are performed • (Optionally) a hint about max number of rules 37 table mTag_table { reads { ethernet.dst_addr : exact; vlan.vid : exact; } actions { add_mTag; } max_size : 20000; } table local_switching { // read destination and checks if local // if miss occurs, goto mtag table } table local_switching { //verify egress is resolved // do not retag packets received with tag // read egress and whether packet was mtagged }
  • 38. Action Functions • Custom actions built from primitives • Add, remove, copy, set, increment, checksum 38 action add_mTag(up1, up2, down1, down2, outport) { add_header(mTag); copy_field(mTag.ethertype, vlan.ethertype); set_field(vlan.ethertype, 0xaaaa); set_field(mTag.up1, up1); set_field(mTag.up2, up2); set_field(mTag.down1, down1); set_field(mTag.down2, down2); set_field(metadata.outport, outport); }
  • 39. Control Flow • Flow of control from one table to the next • Collection of functions, conditionals, and tables • For a ToR switch: 39 ToR From core (with mTag) From local hosts (with no mTag) Source Check Table Local Switching Table Egress Check mTag Table Miss: Not Local
  • 40. Control Flow • Flow of control from one table to the next • Collection of functions, conditionals, and tables • Simple imperative representation 40 control main() { table(source_check); if (!defined(metadata.ingress_error)) { table(local_switching); if (!defined(metadata.outport)) { table(mTag_table); } table(egress_check); } }
  • 42. P4 Compiler • Parser • Programmable parser: translate to state machine • Fixed parser: verify the description is consistent • Control program • Target-independent: table graph of dependencies • Target-dependent: mapping to switch resources • Rule translation • Verify that rules agree with the (logical) table types • Translate the rules to the physical tables 42
  • 43. Compiling packet parser • Compile into a state machine
  • 44. Compiling control programs • And then to a target specific back-end control main() { table(source_check); if (!defined(metadata.ingress_error)) { table(local_switching); if (!defined(metadata.outport)) { table(mTag_table); } table(egress_check); } }
  • 45. Conclusion • OpenFlow 1.x • Vendor-agnostic API • But, only for fixed-function switches • An alternate future • Protocol independence • Target independence • Reconfigurability in the field • P4 language: a straw-man proposal • To trigger discussion and debate • Much, much more work to do! 45

Editor's Notes

  1. OF 1.4 did stop for lack of wanting more, but just to put on the breaks. This is natural and a sign of success of OpenFlow: enable a wider range of controller apps expose more of the capabilities of the switch E.g., adding support for MPLS, inter-table meta-data, ARP/ICMP, IPv6, etc. New encap formats arising much faster than vendors spin new hardware
  2. This may sound like a pipe dream, and certainty this won’t happen overnight. But, there are promising signs of progress in this direction…
  3. Offering this kind of functionality at reasonable cost…
  4. Two modes: (i) configuration and (ii) populating Compiler configures the parser, lays out the tables (cognizant of switch resources and capabilities), and translates the rules to map to the hardware tables The compiler could run directly on the switch (or at least some backend portion of the compiler would do so)
  5. Compiler uses this to - determine what kind of memory (width, height), and what kind (TCAM, SRAM) - reject rules that violate the type The “add_mTag” is an “action function”. In other kinds of tables, multiple different action functions may be allowed.
  6. Push mTag on the packet Copy the ethertype of the VLAN header to correctly identify the next level of header Make the VLAN header point to the mTag Set the four fields of the mTag Ensure the packet goes to the right egess port
  7. Source check (one rule per port): verify mTag only on ports to the core (actions: fault, strip and record metadata, pass) Local switching: checks if destination is local, and otherwise goes to mTag table mTag table: add mTag Egress check: has someone set the outport
  8. Source check (one rule per port): verify mTag only on ports to the core (actions: fault, strip and record metadata, pass) Local switching: checks if destination is local, and otherwise goes to mTag table mTag table: add mTag Egress check: verify egress is resolved, do not retag packets received with tag, reads egress, etc.
  9. This is a rich area, and so far we have only touched the surface…
  10. Parser: Programmable parser: translate parser description into a state machine Fixed parser: verify that the parser description is consistent with the target processor Control program Table graph: dependencies on processing order, opportunities for parallelism Mapping to switch resources: physical tables, types of memory, sizes, combining tables Rule translation Verify rules agree with the types Translate rules into the physical tables