SlideShare a Scribd company logo
1 of 45
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 Networksinside-BigData.com
 
Hpg2011 papers kazakov
Hpg2011 papers kazakovHpg2011 papers kazakov
Hpg2011 papers kazakovmistercteam
 
Morph : a novel accelerator
Morph : a novel acceleratorMorph : a novel accelerator
Morph : a novel acceleratorBaharJV
 
2016 NCTU P4 Workshop
2016 NCTU P4 Workshop2016 NCTU P4 Workshop
2016 NCTU P4 WorkshopYi 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
 
Maxwell siuc hpc_description_tutorial
Maxwell siuc hpc_description_tutorialMaxwell siuc hpc_description_tutorial
Maxwell siuc hpc_description_tutorialmadhuinturi
 
FIne Grain Multithreading
FIne Grain MultithreadingFIne Grain Multithreading
FIne Grain MultithreadingDharmesh Tank
 
Intel’S Larrabee
Intel’S LarrabeeIntel’S Larrabee
Intel’S Larrabeevipinpnair
 
Logic synthesis,flootplan&placement
Logic synthesis,flootplan&placementLogic synthesis,flootplan&placement
Logic synthesis,flootplan&placementshaik sharief
 
Microprocessor Miscellaneous datatrans+directives
Microprocessor Miscellaneous datatrans+directivesMicroprocessor Miscellaneous datatrans+directives
Microprocessor Miscellaneous datatrans+directiveswaqasahmad1995
 
A tour of Amazon Redshift
A tour of Amazon RedshiftA tour of Amazon Redshift
A tour of Amazon RedshiftKel 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
 
24-02-18 Rejender pratap.pdf
24-02-18 Rejender pratap.pdf24-02-18 Rejender pratap.pdf
24-02-18 Rejender pratap.pdfFrangoCamila
 
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 ApexApache 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 SystemsRuhaim Izmeth
 
Protected addressing mode and Paging
Protected addressing mode and PagingProtected addressing mode and Paging
Protected addressing mode and Pagingmarada0033
 

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
 
Protected addressing mode and Paging
Protected addressing mode and PagingProtected addressing mode and Paging
Protected addressing mode and Paging
 

Recently uploaded

Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...jaredbarbolino94
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTiammrhaywood
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Celine George
 
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfFraming an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfUjwalaBharambe
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 
Biting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdfBiting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdfadityarao40181
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatYousafMalik24
 
internship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerinternship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerunnathinaik
 
Hierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementHierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementmkooblal
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
Pharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfPharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfMahmoud M. Sallam
 

Recently uploaded (20)

Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
9953330565 Low Rate Call Girls In Rohini Delhi NCR
9953330565 Low Rate Call Girls In Rohini  Delhi NCR9953330565 Low Rate Call Girls In Rohini  Delhi NCR
9953330565 Low Rate Call Girls In Rohini Delhi NCR
 
Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
 
ESSENTIAL of (CS/IT/IS) class 06 (database)
ESSENTIAL of (CS/IT/IS) class 06 (database)ESSENTIAL of (CS/IT/IS) class 06 (database)
ESSENTIAL of (CS/IT/IS) class 06 (database)
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfFraming an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 
Biting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdfBiting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdf
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice great
 
internship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerinternship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developer
 
OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...
 
Hierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementHierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of management
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
Pharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfPharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.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