Networks need to incorporate innovative and high-performance packet processing entities to meet the demands of meteoric rise in data coupled with advances in compute capacity and innovative apps. A fully programmable forwarding plane enables network owners to build the network they want and evolve it as the needs change. P4 is a domain specific language for networking and it empowers network builders to craft the functionality they need in a high-level programming language and execute it at line-rate on a variety of devices including the Barefoot Tofino series of Ethernet switches. This talk will give an overview of P4 and go over a couple of use-cases.
3. Putting the Network Owners in the Driving Seat
“This is how I
process packets …”
“This is how you must
process packets”
Constrained
Network Operating
& Switch OS
Fixed-function switch
Driver
Scalable
Network Operating
& Switch OS
Programmable Switch
Driver
Headers and Metadata
Parser
Tables and Controls
3
4. Fixed vs. Programmable packet processing
Buffer
FixedParser
IPv4
Address
Table
IPv4
Logic
ACL
Logic
ACL
TCAM
MPLS
Tag
Table
MPLS
Logic
Ethernet
MAC
Address
Table
Ethernet
Logic
Fixed Pipeline: features and table-sizes are baked in at design time
Buffer
Programmable
Parser
M A
M
M
M
M
M
A
A
A
A
A
M A
M
M
M
M
M
A
A
A
A
A
M A
M
M
M
M
M
A
A
A
A
A
…
M A
M
M
M
M
M
A
A
A
A
A
Programmable Pipeline: all stages identical, customer-defined match-action logic
You declare which
headers are recognized
You declare what tables are needed and how packets are processed
4
6. 6
Tofino™ & Tofino™ 2 Ethernet switch ASIC Family
Series 12.8 Tbps 8.0 Tbps 6.4 Tbps 3.2 Tbps 2.0 Tbps Markets
U-series ü ü ü
Ultra – Large Capacity & Highest Features
§ Service Provider
§ 5G Core, Edge Compute, …
§ Hyperscale
§ ML/DL Fabrics, Load Balancers, Firewalls, …
§ Storage – Next Generation Interconnect
M-series ü ü
Mainstream – High Bandwidth & Feature Rich
§ Enterprise
§ Data Center Leaf and Spine
H-series ü
Hyperscale – Optimized for Power & Efficiency
§ Efficient Interconnect for Compute
§ Reduced Complexity & Low Latency
9. Barefoot P4 Studio Architecture
Switch P4*
Application
Tofino™ Native
Architecture
Control Plane (Local/Remote)
Barefoot Runtime Interface
Barefoot Model-driven Abstraction Interface
Switch Application APIs
SAI
PacketTestFramework
Unified ASIC Driver
ASIC ASIC Model
+
P4 Insight
Barefoot
P4 Compiler
9
10. Segment Routing v6 - Mobile User Plane
Data Network
gNB SRGW UPF1 UPF2
SA : 8000::1
DA : 2000::1
NH : IPV6
UDP
DP :0x0868
GTPU
TEID : 0x1234
SA : 1000::1
DA : 3000::1
NH : UDP
SA : 9000::1
DA : 7000::1
NH : SRH
Type : 4(SRH)
NH : IPv6
Segment List:
[0] 5000::1
[1] 6000::1
SA : 1000::1
DA : 3000::1
NH : UDP
SA : 9000::1
DA :
NH : IPV6
SA : 1000::1
DA : 3000::1
NH : UDP
SA : 1000::1
DA : 3000::1
NH : UDP
User
Equipment
SRv6 Core
Network
End.M.GTP6.D End (PSP) End.DT6
Data Network
gNB UPF1 UPF2
SA : 1000::1
DA : 2000::1
NH : IPV6
SA : 5000::1
DA : 3000::1
NH : IPV6
SA : 1000::1
DA : 2000::1
NH : UDP
SA : 5000::1
DA : 4000::1
NH : IPV6
SA : 1000::1
DA : 2000::1
NH : UDP
SA : 1000::1
DA : 2000::1
NH : IPV6
User
Equipment
SRv6 Core
Network
T.Encaps.Red End.MAP End.DT6
SRv6TrafficFlow−
TraditionalMode
SRv6TrafficFlow−
Enhancedwith
unchangedgNodeB
https://tools.ietf.org/html/draft-ietf-dmm-srv6-mobile-uplane-02#page-11
10
11. 11
In-network ML acceleration
by Microsoft, KAUST, UofW, Barefoot
• In-network aggregation of model updates
• Switch role
• Integer vector addition
• Counting and comparison
• Integration
• TensorFlow using Horovod
• PyTorch/Caffe2 using Gloo
Up to 3x training speeduppaper: https://arxiv.org/abs/1903.06701
Other names and brands may be claimed as the property of others.
12. 12
Cache-coherent Interconnect
• OmniXtend™ A new open approach to
providing cache coherent memory over
an Ethernet fabric.
• Implemented using P4 Programmable
Tofino Ethernet Switch ASIC.
https://blog.westerndigital.com/omnixtend-fabric-innovation-with-risc-v/
https://github.com/westerndigitalcorporation/omnixtend
Other names and brands may be claimed as the property of others.
13. Reduced
Complexity
Speed&
AgilityScale
Future
Proof
Data-Plane
Telemetry
Benefits of P4* Programmable Switches
Instrument the Data Plane with
Barefoot SPRINT™ Smart,
Programmable, Real-time, In-
band Network Telemetry (INT)
Scale data-plane resources to
match the needs of Hyper Scale
and Service Infrastructure
Adapt and innovate at
speed of Software
Continuously deliver and evolve
features on the same Hardware
Strip out complexity
that isn’t needed by the
User, Application and Operator
13