CompSci514/ECE558: Computer Networks
Lecture 17: Programmable Switches Xiaowei Yang xwy@cs.duke.edu http://www.cs.duke.edu/~xwy Some slides are adapted from Prof Nick McKeown’s lecture slides
CompSci514/ECE558: Computer Networks Lecture 17: Programmable - - PowerPoint PPT Presentation
CompSci514/ECE558: Computer Networks Lecture 17: Programmable Switches Xiaowei Yang xwy@cs.duke.edu http://www.cs.duke.edu/~xwy Some slides are adapted from Prof Nick McKeowns lecture slides Overview The Trio of modern networking
Lecture 17: Programmable Switches Xiaowei Yang xwy@cs.duke.edu http://www.cs.duke.edu/~xwy Some slides are adapted from Prof Nick McKeown’s lecture slides
3
Packet Forwarding Packet Forwarding Packet Forwarding Packet Forwarding Packet Forwarding Control Control Control Control Control
Global Network Map Control Plane Control Program Control Program Control Program
7
Switch chip! State of the art about 3.2Tb/s (32x100GE)
Feature Code
Feature Code Feature Code
and firewalls.
Feature Code
Control Plane
Driver
Feature Code Feature Code New Feature Code
0.1 1 10 100 1000 10000 100000 1990 1995 2000 2005 2010 2015 2020 Switch Chip
13
Gb/s
(per chip)
0.1 1 10 100 1000 10000 100000 1990 1995 2000 2005 2010 2015 2020 Switch Chip CPU
14
Gb/s
(per chip)
16
Whitebox CPU
Blackbox switch
Queues
Parser
L3 L2 Packet Packet
18
GPU
Graphics
Compiler
Applications
DSP
Signal Processing
Compiler
Applications
My codec My renderer
Queues
Parser
L2 Table IPv4 Table IPv6 Table ACL Table L2 v4 v6 ACL Control Flow Graph Switch Pipeline Fixed Action Fixed Action Action Fixed Action
21
22
Queues
Parser
L2 Table IPv4 Table IPv6 Table ACL Table Fixed Action Fixed Action Action Fixed Action L2 v4 v6 ACL Control Flow Graph Switch Pipeline MyEnca p MyEncap
23
24
Queues
Parser
Fixed Action Fixed Action Action L2 Table Fixed Action IPv4 Table IPv6 Table ACL Table
Control Flow Graph Switch Pipeline
Queues
Parser Fixed Action Fixed Action Fixed Action L2 Table Fixed Action IPv4 Table IPv6 Table ACL Table Match Table Match Table Match Table Match Table L2 v4 v6 ACL Action Macro Action Macro Action Macro Action Macro
25
Match Table Action Macro
Queues
Parser Match Table Match Table Match Table L2 Table IPv4 Table IPv6 Table ACL Table Action Macro Action Macro Action Macro L2 v4 v6 ACL Control Flow Graph Switch Pipeline L2 v6 ACL v4 L2 Action Macro v4 Action Macro v6 Action ACL Action Macro
26
27
28
Programmable Parser
Memory
Match+Action
ALU
Programmable Parser
Match+Action
Programmable Parser
Memory
Match+Action
ALU
Queues
Parser Fixed Action Fixed Action Fixed Action L2 Table Fixed Action IPv4 Table IPv6 Table ACL Table Match Table Match Table Match Table Match Table
parser parse_ethernet { extract(ethernet); select(latest.etherType) { 0x800 : parse_ipv4; 0x86DD : parse_ipv6; } } table ipv4_lpm { reads { ipv4.dstAddr : lpm; } actions { set_next_hop; drop; } } control ingress { apply(l2_table); if (valid(ipv4)) { apply(ipv4_table); } if (valid(ipv6)) { apply(ipv6_table); } apply (acl); }
L 2 v4 v6
AC L
Action Macro Action Macro Action Macro Action Macro
31
32
Parser Match Table Match Table Match Table Match Table Action Macro Action Macro Action Macro Action Macro L2 v4 v6 ACL Control Flow Switch Pipeline
Queues
L2 Table IPv4 Table IPv6 Table ACL Table L2 v6 ACL v4 Action v4 Action Macro v6 Action Macro Action
33
Control Flow Graph L2
v4 v6 ACL L2 v4 v6 ACL Table Dependency Graph
34
Switch Pipeline
Queues
Parser L2 Table IPv4 Table IPv6 Table Table Dependency Graph Control Flow Graph L2 v4 v6 ACL L2 v4 v6 ACL Action v4 Action Macro v6 Action Macro
35
ACL Table Action
L2 Control Flow Graph Switch Pipeline
v4 v6 ACL
Queues
Parser L2 Table IPv6 IPv4
L3 L2
v6 v4 L2 Action Macro v4 Action Macro v6 Action Macro Action ACL Table
36
Step 1: P4 Program Step 2: Control Flow Graph
L2 v4 v6 ACL 37
Step 3: Table Dependency Graph L2 v4 v6 ACL Step 4: Table Configuration
1 2 3 4 32 …
39
IPv6- Mcast EG- ACL1 EG- Phy- Meta IG-Agg- Intf IG- Dmac IPv4- Mcast IPv4- Nextho p IPv6- Nextho p IG- Props IG- Router- Mac Ipv4- Ecmp IG- Smac Ipv4- Ucast- LPM Ipv4- Ucast- Host Ipv6- Ucast- Host Ipv6- Ucast- LPM Ipv6- Ecmp IG_ACL 2 IG_Bca st_Stor m Ipv4_Ur pf Ipv6_Ur pf IG_ACL 1 EG_Pro ps IG_Phy _Meta
Section Area % of chip Extra Cost I/O, 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%