SlideShare ist ein Scribd-Unternehmen logo
1 von 27
Downloaden Sie, um offline zu lesen
1©2016 Open-NFP
Open-NFP Summer Webinar Series:
Session 4: P4, EBPF And Linux TC Offload
Dinan Gunawardena & Jakub Kicinski -
Netronome
August 24, 2016
2©2016 Open-NFP
Open-NFP www.open-nfp.org
Support and grow reusable research in accelerating dataplane network functions processing
Reduce/eliminate the cost and technology barriers to research in this space
•  Technologies:
–  P4, eBPF, SDN, OpenFlow, Open vSwitch (OVS) offload
•  Tools:
–  Discounted hardware, development tools, software, cloud access
•  Community:
–  Website (www.open-nfp.org): learning & training materials, active Google group
https://groups.google.com/d/forum/open-nfp, open project descriptions, code repository
•  Learning/Education/Research support:
–  Summer seminar series, P4DevCon conference, Tutorials (P4 Developer Day), research proposal support
for proposals to the NSF, state agencies
Summer seminar series to further progress to our objective. Present applied reusable research.
3©2016 Open-NFP
Universities Companies
P4DevCon Attendees/Open-NFP Projects*
*This	does	not	imply	that	these	organiza4ons	endorse	Open-NFP	or	Netronome
4©2016 Open-NFP
Session Agenda
1. Introduction
–  Objectives
2. Overview: The high level model for offload
-  What we are offloading – P4 / eBPF
-  Overall programmer model for transparent
offload
3. Linux Kernel Infrastructure
–  The Traffic Classifier (TC)
–  eXpress Data Path (XDP)
–  Current eBPF translation on X86/ARM64/PPC64
4. Hardware Intro to NFP (Network Flow
Processor) architecture
–  SmartNICs-Multi Core, Many Core
–  NUMA, Memory Hierarchy
5. Accelerating P4/eBPF in NFP :
Implementation
–  Kernel core infrastructure
–  Map handling in the kernel
–  Translating instructions
–  Basic Map Support
–  Optimizations
6. & 7. Demo; Summary
5©2016 Open-NFP
Session Objectives
6©2016 Open-NFP
Introduction: Objectives
Understanding how eBPF is relevant to P4
Understanding the support for offload and state of art in the Linux Kernel
The Code
– Understand the structure of a eBPF program
– Gain an insight into how this is translated and executed in hardware
Understanding how the NFP architecture on the Agilio CX enables high
performing, fully programmable network offload
– The Many Core architecture and its advantages
7©2016 Open-NFP
Overview: High level model for offload
•  What we are offloading – P4 / eBPF
•  Overall programmer model for
transparent offload
8©2016 Open-NFP
P4 and eBPF
What are P4 and eBPF?
Domain specific languages for specifying forwarding
behaviour of the data plane of network components
P4 - Programming Protocol-Independent Packet
Processors
•  Header format description
•  Parse Graphs (FSM)
•  Tables (<keys,actions>)
•  Actions manipulate packet header/metadata
•  Control flow – an imperative program, describing
sequence of data dependent match/actions
eBPF – Extended Berkley Packet Filters
•  Low level (machine code like) language
•  Code executed by a VM (restricted memory, no
sleeps/locks, limited API to kernel)in the Kernel (TC)
•  Code injected into netfilter hook points in kernel data
plane
•  Maps (<key, value> stores)
•  Chained filter functions
•  Match/action
•  Static verification of safety, guaranteed to terminate
9©2016 Open-NFP
Translating P4->eBPF
John Fastabend P4 to eBPF compiler
Why translate P4 to eBPF?
Table	and	diagrams	©	Mihai	Budiu
10©2016 Open-NFP
Model for Transparent Offload
Programmer / user is “unaware” that eBPF code is “offloaded”
Requirements
• Partial pipeline offload
• Fallback to software for any eBPF code block
• Transparent user mode / kernel mode access to tables
eBPF	
Program	2	
(HW	offload)	
eBPF	
Program	3	
Packet	
In	
eBPF	
Program	1	
(HW	offload)	
PCI-E	crossing
11©2016 Open-NFP
Linux Kernel Infrastucture
•  The Traffic Classifier (TC)
•  eXpress Data Path (XDP)
12©2016 Open-NFP
Linux Traffic Classifier (TC)
Component	 Linux	Component	
Shaping	 The	class	offers	shaping	capabili4es	
Scheduling	 A	qdisc	acts	as	a	scheduler	e.g.	FIFO	
Classifying	 The	filter	performs	classifica4on	through	a	classifier	
object.	
Policing	 A	policer	performs	policing	within	a	filter	
Dropping	 The	“drop”	ac4on	occurs	with	a	filter+policer	
Marking	 The	dsmark	qdisc	is	used	for	marking	
eBPF	
program	
TC	diagram	and	example	program	©	Jamal	Hadi	Salim
13©2016 Open-NFP
eXpress Data Path (XDP)
What
•  High performance,
programmable network
data path
Utility
•  Useful for packet processing
•  forwarding
•  load balancing
•  DOS mitigation
•  firewalls, etc.
XDP	architecture	diagram	©	Tom	Herbert
14©2016 Open-NFP
Hardware Intro to NFP (Network Flow
Processor) architecture
•  NUMA, Memory Hierarchy
•  Current eBPF translation on X86/ARM64/
PPC64
15©2016 Open-NFP
NUMA, Memory Hierarchy
Architecural Philosopies:
•  Bring the data close to where it needs to be processed
•  Facilitate highly concurrent access to memories
•  Mitigate branch costs and hide I/O & memory access
latencies
16©2016 Open-NFP
Current eBPF translation on X86/ARM64/PPC64
1) Write eBPF program as a simple
C Program
2) Compiled to eBPF byte code
3) Loaded into the Linux TC
4) Run through verifier
5) Cross compiled to X86/ARM64/PPC64
… Or now NFP Byte Code!
NFP	hardware	
offloaded	eBPF	
TC
17©2016 Open-NFP
Dataflow
User	Space	
Traffic	Classifier	(TC)	
Driver	(XDP)	
Firmware	&	Hardware	
PCI-E	
Network	
Kernel	
User	
NFP	
TCP	Stack	
Packet	+	Descriptor,	
Meta	data	
Packet	+	Sk_Buf
18©2016 Open-NFP
Supported Actions
User	Space	
Traffic	Classifier	(TC)	
Driver	(XDP)	
Firmware	&	Hardware	
PCI-E	
Network	
Kernel	
User	
NFP	
TCP	Stack	
Packet	+	Descriptor,	
Meta	data	
Packet	+	Sk_Buf	
Supported	Ac2ons	
•  Drop	
•  Mark	
•  Redirect	
Redirect	Drop	
Mark
19©2016 Open-NFP
Accelerating P4/eBPF in NFP :
Implementation
•  Kernel core infrastructure
•  Map handling in the kernel
•  eBPF to NFP
•  Map Support
•  Optimizations
20©2016 Open-NFP
Kernel core infrastructure
User	Space	
Traffic	Classifier	(TC)	
Driver	(XDP)	
NFP	Offload	
Control	
eBPF	Program	
+	Flags	
Firmware	&	Hardware	
PCI-E	
Network	
Kernel	
User	
NFP	
TCP	Stack	
skip_sw	|	skip_hw	
Offload	obj	
Stats
21©2016 Open-NFP
eBPF to NFP
eBPF	Registers	
10	x	
64bits	
MAP	
DRAM	
X	 X	
X	 X	
A	
B	
16	x		
	2	x	
32bits	
ME	Registers	
Translate	
Communica4on	
Registers	
NFP	
•  Non-linear mapping
•  32 bit translation
22©2016 Open-NFP
•  Write interception
•  Ownership
•  Associating with a device
•  Read-Only single-user maps
•  Read-Only multi-user maps
•  Write-Enabled single-user maps
•  Write-Enabled multi-user maps
Map Handling in Kernel & Map Write Reflection
User	
Space	
Network	
MAP	 Kernel	
Space	
NFP	MAP	
Write	Reflec4on	
PCI-E	
Control	
Applica4on
23©2016 Open-NFP
Optimizations
•  Dealing with different memory types
•  Peephole Optimizer
•  Dropping unnecessary jumps
•  Optimizing instructions with immediates
•  Fusing instructions
•  Full A/B register allocations
•  Liveness analysis with real state size tracking
24©2016 Open-NFP
Demo
25©2016 Open-NFP
Summary
•  Learnt the relationship between P4 and eBPF
•  Discovered the infrastructure in the Linux Kernel for eBPF
offload
•  Learnt about how the Netronome Smart NIC architecture is
optimised for network flow processing
•  Explored how we implemented the eBPF offload in hardware
26©2016 Open-NFP
QUESTIONS?
Dinan Gunawardena
dinan.gunawardena@netronome.com
Jakub Kicinski
Jakub.Kicinski@netronome.com
27©2016 Open-NFP
THANK YOU

Weitere ähnliche Inhalte

Was ist angesagt?

Cilium - Network security for microservices
Cilium - Network security for microservicesCilium - Network security for microservices
Cilium - Network security for microservicesThomas Graf
 
Kernel Recipes 2017 - EBPF and XDP - Eric Leblond
Kernel Recipes 2017 - EBPF and XDP - Eric LeblondKernel Recipes 2017 - EBPF and XDP - Eric Leblond
Kernel Recipes 2017 - EBPF and XDP - Eric LeblondAnne Nicolas
 
Using eBPF to Measure the k8s Cluster Health
Using eBPF to Measure the k8s Cluster HealthUsing eBPF to Measure the k8s Cluster Health
Using eBPF to Measure the k8s Cluster HealthScyllaDB
 
Enhancing Network and Runtime Security with Cilium and Tetragon by Raymond De...
Enhancing Network and Runtime Security with Cilium and Tetragon by Raymond De...Enhancing Network and Runtime Security with Cilium and Tetragon by Raymond De...
Enhancing Network and Runtime Security with Cilium and Tetragon by Raymond De...ContainerDay Security 2023
 
EBPF and Linux Networking
EBPF and Linux NetworkingEBPF and Linux Networking
EBPF and Linux NetworkingPLUMgrid
 
Accelerating Envoy and Istio with Cilium and the Linux Kernel
Accelerating Envoy and Istio with Cilium and the Linux KernelAccelerating Envoy and Istio with Cilium and the Linux Kernel
Accelerating Envoy and Istio with Cilium and the Linux KernelThomas Graf
 
DockerCon 2017 - Cilium - Network and Application Security with BPF and XDP
DockerCon 2017 - Cilium - Network and Application Security with BPF and XDPDockerCon 2017 - Cilium - Network and Application Security with BPF and XDP
DockerCon 2017 - Cilium - Network and Application Security with BPF and XDPThomas Graf
 
Meet cute-between-ebpf-and-tracing
Meet cute-between-ebpf-and-tracingMeet cute-between-ebpf-and-tracing
Meet cute-between-ebpf-and-tracingViller Hsiao
 
Faster packet processing in Linux: XDP
Faster packet processing in Linux: XDPFaster packet processing in Linux: XDP
Faster packet processing in Linux: XDPDaniel T. Lee
 
Cilium - Bringing the BPF Revolution to Kubernetes Networking and Security
Cilium - Bringing the BPF Revolution to Kubernetes Networking and SecurityCilium - Bringing the BPF Revolution to Kubernetes Networking and Security
Cilium - Bringing the BPF Revolution to Kubernetes Networking and SecurityThomas Graf
 
BPF: Tracing and more
BPF: Tracing and moreBPF: Tracing and more
BPF: Tracing and moreBrendan Gregg
 
Fast Userspace OVS with AF_XDP, OVS CONF 2018
Fast Userspace OVS with AF_XDP, OVS CONF 2018Fast Userspace OVS with AF_XDP, OVS CONF 2018
Fast Userspace OVS with AF_XDP, OVS CONF 2018Cheng-Chun William Tu
 
仮想化環境におけるパケットフォワーディング
仮想化環境におけるパケットフォワーディング仮想化環境におけるパケットフォワーディング
仮想化環境におけるパケットフォワーディングTakuya ASADA
 
Replacing iptables with eBPF in Kubernetes with Cilium
Replacing iptables with eBPF in Kubernetes with CiliumReplacing iptables with eBPF in Kubernetes with Cilium
Replacing iptables with eBPF in Kubernetes with CiliumMichal Rostecki
 
BPF / XDP 8월 세미나 KossLab
BPF / XDP 8월 세미나 KossLabBPF / XDP 8월 세미나 KossLab
BPF / XDP 8월 세미나 KossLabTaeung Song
 
Xdp and ebpf_maps
Xdp and ebpf_mapsXdp and ebpf_maps
Xdp and ebpf_mapslcplcp1
 
Linux Performance Analysis: New Tools and Old Secrets
Linux Performance Analysis: New Tools and Old SecretsLinux Performance Analysis: New Tools and Old Secrets
Linux Performance Analysis: New Tools and Old SecretsBrendan Gregg
 

Was ist angesagt? (20)

Cilium - Network security for microservices
Cilium - Network security for microservicesCilium - Network security for microservices
Cilium - Network security for microservices
 
Kernel Recipes 2017 - EBPF and XDP - Eric Leblond
Kernel Recipes 2017 - EBPF and XDP - Eric LeblondKernel Recipes 2017 - EBPF and XDP - Eric Leblond
Kernel Recipes 2017 - EBPF and XDP - Eric Leblond
 
Using eBPF to Measure the k8s Cluster Health
Using eBPF to Measure the k8s Cluster HealthUsing eBPF to Measure the k8s Cluster Health
Using eBPF to Measure the k8s Cluster Health
 
Enhancing Network and Runtime Security with Cilium and Tetragon by Raymond De...
Enhancing Network and Runtime Security with Cilium and Tetragon by Raymond De...Enhancing Network and Runtime Security with Cilium and Tetragon by Raymond De...
Enhancing Network and Runtime Security with Cilium and Tetragon by Raymond De...
 
EBPF and Linux Networking
EBPF and Linux NetworkingEBPF and Linux Networking
EBPF and Linux Networking
 
eBPF maps 101
eBPF maps 101eBPF maps 101
eBPF maps 101
 
Accelerating Envoy and Istio with Cilium and the Linux Kernel
Accelerating Envoy and Istio with Cilium and the Linux KernelAccelerating Envoy and Istio with Cilium and the Linux Kernel
Accelerating Envoy and Istio with Cilium and the Linux Kernel
 
DockerCon 2017 - Cilium - Network and Application Security with BPF and XDP
DockerCon 2017 - Cilium - Network and Application Security with BPF and XDPDockerCon 2017 - Cilium - Network and Application Security with BPF and XDP
DockerCon 2017 - Cilium - Network and Application Security with BPF and XDP
 
Scale Kubernetes to support 50000 services
Scale Kubernetes to support 50000 servicesScale Kubernetes to support 50000 services
Scale Kubernetes to support 50000 services
 
Meet cute-between-ebpf-and-tracing
Meet cute-between-ebpf-and-tracingMeet cute-between-ebpf-and-tracing
Meet cute-between-ebpf-and-tracing
 
Faster packet processing in Linux: XDP
Faster packet processing in Linux: XDPFaster packet processing in Linux: XDP
Faster packet processing in Linux: XDP
 
Cilium - Bringing the BPF Revolution to Kubernetes Networking and Security
Cilium - Bringing the BPF Revolution to Kubernetes Networking and SecurityCilium - Bringing the BPF Revolution to Kubernetes Networking and Security
Cilium - Bringing the BPF Revolution to Kubernetes Networking and Security
 
BPF: Tracing and more
BPF: Tracing and moreBPF: Tracing and more
BPF: Tracing and more
 
Fast Userspace OVS with AF_XDP, OVS CONF 2018
Fast Userspace OVS with AF_XDP, OVS CONF 2018Fast Userspace OVS with AF_XDP, OVS CONF 2018
Fast Userspace OVS with AF_XDP, OVS CONF 2018
 
仮想化環境におけるパケットフォワーディング
仮想化環境におけるパケットフォワーディング仮想化環境におけるパケットフォワーディング
仮想化環境におけるパケットフォワーディング
 
Replacing iptables with eBPF in Kubernetes with Cilium
Replacing iptables with eBPF in Kubernetes with CiliumReplacing iptables with eBPF in Kubernetes with Cilium
Replacing iptables with eBPF in Kubernetes with Cilium
 
BPF / XDP 8월 세미나 KossLab
BPF / XDP 8월 세미나 KossLabBPF / XDP 8월 세미나 KossLab
BPF / XDP 8월 세미나 KossLab
 
Xdp and ebpf_maps
Xdp and ebpf_mapsXdp and ebpf_maps
Xdp and ebpf_maps
 
eBPF Workshop
eBPF WorkshopeBPF Workshop
eBPF Workshop
 
Linux Performance Analysis: New Tools and Old Secrets
Linux Performance Analysis: New Tools and Old SecretsLinux Performance Analysis: New Tools and Old Secrets
Linux Performance Analysis: New Tools and Old Secrets
 

Ähnlich wie P4, EPBF, and Linux TC Offload

P4 for Custom Identification, Flow Tagging, Monitoring and Control
P4 for Custom Identification, Flow Tagging, Monitoring and ControlP4 for Custom Identification, Flow Tagging, Monitoring and Control
P4 for Custom Identification, Flow Tagging, Monitoring and ControlOpen-NFP
 
High Performance Flow Matching Architecture for Openflow Data Plane
High Performance Flow Matching Architecture for Openflow Data PlaneHigh Performance Flow Matching Architecture for Openflow Data Plane
High Performance Flow Matching Architecture for Openflow Data PlaneMahesh Dananjaya
 
1. OPNFV Updates @ Tokyo Meetup#2
1. OPNFV Updates @ Tokyo Meetup#21. OPNFV Updates @ Tokyo Meetup#2
1. OPNFV Updates @ Tokyo Meetup#2Mibu Ryota
 
Programming the Network Data Plane
Programming the Network Data PlaneProgramming the Network Data Plane
Programming the Network Data PlaneC4Media
 
High-Performance and Scalable Designs of Programming Models for Exascale Systems
High-Performance and Scalable Designs of Programming Models for Exascale SystemsHigh-Performance and Scalable Designs of Programming Models for Exascale Systems
High-Performance and Scalable Designs of Programming Models for Exascale Systemsinside-BigData.com
 
P4+ONOS SRv6 tutorial.pptx
P4+ONOS SRv6 tutorial.pptxP4+ONOS SRv6 tutorial.pptx
P4+ONOS SRv6 tutorial.pptxtampham61268
 
Stacks and Layers: Integrating P4, C, OVS and OpenStack
Stacks and Layers: Integrating P4, C, OVS and OpenStackStacks and Layers: Integrating P4, C, OVS and OpenStack
Stacks and Layers: Integrating P4, C, OVS and OpenStackOpen-NFP
 
Data Plane and VNF Acceleration Mini Summit
Data Plane and VNF Acceleration Mini Summit Data Plane and VNF Acceleration Mini Summit
Data Plane and VNF Acceleration Mini Summit Open-NFP
 
Scalable and Distributed DNN Training on Modern HPC Systems
Scalable and Distributed DNN Training on Modern HPC SystemsScalable and Distributed DNN Training on Modern HPC Systems
Scalable and Distributed DNN Training on Modern HPC Systemsinside-BigData.com
 
Communication Frameworks for HPC and Big Data
Communication Frameworks for HPC and Big DataCommunication Frameworks for HPC and Big Data
Communication Frameworks for HPC and Big Datainside-BigData.com
 
How to Achieve High-Performance, Scalable and Distributed DNN Training on Mod...
How to Achieve High-Performance, Scalable and Distributed DNN Training on Mod...How to Achieve High-Performance, Scalable and Distributed DNN Training on Mod...
How to Achieve High-Performance, Scalable and Distributed DNN Training on Mod...inside-BigData.com
 
Transparent eBPF Offload: Playing Nice with the Linux Kernel
Transparent eBPF Offload: Playing Nice with the Linux KernelTransparent eBPF Offload: Playing Nice with the Linux Kernel
Transparent eBPF Offload: Playing Nice with the Linux KernelOpen-NFP
 
Making our networking stack truly extensible
Making our networking stack truly extensible Making our networking stack truly extensible
Making our networking stack truly extensible Olivier Bonaventure
 
P4_tutorial.pdf
P4_tutorial.pdfP4_tutorial.pdf
P4_tutorial.pdfPramodhN3
 
OpenPOWER Acceleration of HPCC Systems
OpenPOWER Acceleration of HPCC SystemsOpenPOWER Acceleration of HPCC Systems
OpenPOWER Acceleration of HPCC SystemsHPCC Systems
 
Panda scalable hpc_bestpractices_tue100418
Panda scalable hpc_bestpractices_tue100418Panda scalable hpc_bestpractices_tue100418
Panda scalable hpc_bestpractices_tue100418inside-BigData.com
 
Designing Scalable HPC, Deep Learning and Cloud Middleware for Exascale Systems
Designing Scalable HPC, Deep Learning and Cloud Middleware for Exascale SystemsDesigning Scalable HPC, Deep Learning and Cloud Middleware for Exascale Systems
Designing Scalable HPC, Deep Learning and Cloud Middleware for Exascale Systemsinside-BigData.com
 
"New Standards for Embedded Vision and Neural Networks," a Presentation from ...
"New Standards for Embedded Vision and Neural Networks," a Presentation from ..."New Standards for Embedded Vision and Neural Networks," a Presentation from ...
"New Standards for Embedded Vision and Neural Networks," a Presentation from ...Edge AI and Vision Alliance
 

Ähnlich wie P4, EPBF, and Linux TC Offload (20)

P4 for Custom Identification, Flow Tagging, Monitoring and Control
P4 for Custom Identification, Flow Tagging, Monitoring and ControlP4 for Custom Identification, Flow Tagging, Monitoring and Control
P4 for Custom Identification, Flow Tagging, Monitoring and Control
 
High Performance Flow Matching Architecture for Openflow Data Plane
High Performance Flow Matching Architecture for Openflow Data PlaneHigh Performance Flow Matching Architecture for Openflow Data Plane
High Performance Flow Matching Architecture for Openflow Data Plane
 
1. OPNFV Updates @ Tokyo Meetup#2
1. OPNFV Updates @ Tokyo Meetup#21. OPNFV Updates @ Tokyo Meetup#2
1. OPNFV Updates @ Tokyo Meetup#2
 
Programming the Network Data Plane
Programming the Network Data PlaneProgramming the Network Data Plane
Programming the Network Data Plane
 
High-Performance and Scalable Designs of Programming Models for Exascale Systems
High-Performance and Scalable Designs of Programming Models for Exascale SystemsHigh-Performance and Scalable Designs of Programming Models for Exascale Systems
High-Performance and Scalable Designs of Programming Models for Exascale Systems
 
P4+ONOS SRv6 tutorial.pptx
P4+ONOS SRv6 tutorial.pptxP4+ONOS SRv6 tutorial.pptx
P4+ONOS SRv6 tutorial.pptx
 
Stacks and Layers: Integrating P4, C, OVS and OpenStack
Stacks and Layers: Integrating P4, C, OVS and OpenStackStacks and Layers: Integrating P4, C, OVS and OpenStack
Stacks and Layers: Integrating P4, C, OVS and OpenStack
 
Data Plane and VNF Acceleration Mini Summit
Data Plane and VNF Acceleration Mini Summit Data Plane and VNF Acceleration Mini Summit
Data Plane and VNF Acceleration Mini Summit
 
Scalable and Distributed DNN Training on Modern HPC Systems
Scalable and Distributed DNN Training on Modern HPC SystemsScalable and Distributed DNN Training on Modern HPC Systems
Scalable and Distributed DNN Training on Modern HPC Systems
 
Communication Frameworks for HPC and Big Data
Communication Frameworks for HPC and Big DataCommunication Frameworks for HPC and Big Data
Communication Frameworks for HPC and Big Data
 
How to Achieve High-Performance, Scalable and Distributed DNN Training on Mod...
How to Achieve High-Performance, Scalable and Distributed DNN Training on Mod...How to Achieve High-Performance, Scalable and Distributed DNN Training on Mod...
How to Achieve High-Performance, Scalable and Distributed DNN Training on Mod...
 
Transparent eBPF Offload: Playing Nice with the Linux Kernel
Transparent eBPF Offload: Playing Nice with the Linux KernelTransparent eBPF Offload: Playing Nice with the Linux Kernel
Transparent eBPF Offload: Playing Nice with the Linux Kernel
 
Making our networking stack truly extensible
Making our networking stack truly extensible Making our networking stack truly extensible
Making our networking stack truly extensible
 
Japan's post K Computer
Japan's post K ComputerJapan's post K Computer
Japan's post K Computer
 
P4_tutorial.pdf
P4_tutorial.pdfP4_tutorial.pdf
P4_tutorial.pdf
 
OpenPOWER Acceleration of HPCC Systems
OpenPOWER Acceleration of HPCC SystemsOpenPOWER Acceleration of HPCC Systems
OpenPOWER Acceleration of HPCC Systems
 
Panda scalable hpc_bestpractices_tue100418
Panda scalable hpc_bestpractices_tue100418Panda scalable hpc_bestpractices_tue100418
Panda scalable hpc_bestpractices_tue100418
 
Designing Scalable HPC, Deep Learning and Cloud Middleware for Exascale Systems
Designing Scalable HPC, Deep Learning and Cloud Middleware for Exascale SystemsDesigning Scalable HPC, Deep Learning and Cloud Middleware for Exascale Systems
Designing Scalable HPC, Deep Learning and Cloud Middleware for Exascale Systems
 
2017 dagstuhl-nfv-rothenberg
2017 dagstuhl-nfv-rothenberg2017 dagstuhl-nfv-rothenberg
2017 dagstuhl-nfv-rothenberg
 
"New Standards for Embedded Vision and Neural Networks," a Presentation from ...
"New Standards for Embedded Vision and Neural Networks," a Presentation from ..."New Standards for Embedded Vision and Neural Networks," a Presentation from ...
"New Standards for Embedded Vision and Neural Networks," a Presentation from ...
 

Mehr von Open-NFP

Accelerating Networked Applications with Flexible Packet Processing
Accelerating Networked Applications with Flexible Packet ProcessingAccelerating Networked Applications with Flexible Packet Processing
Accelerating Networked Applications with Flexible Packet ProcessingOpen-NFP
 
Network Measurement with P4 and C on Netronome Agilio
Network Measurement with P4 and C on Netronome AgilioNetwork Measurement with P4 and C on Netronome Agilio
Network Measurement with P4 and C on Netronome AgilioOpen-NFP
 
Measuring a 25 and 40Gb/s Data Plane
Measuring a 25 and 40Gb/s Data PlaneMeasuring a 25 and 40Gb/s Data Plane
Measuring a 25 and 40Gb/s Data PlaneOpen-NFP
 
OpenContrail, Real Speed: Offloading vRouter
OpenContrail, Real Speed: Offloading vRouterOpenContrail, Real Speed: Offloading vRouter
OpenContrail, Real Speed: Offloading vRouterOpen-NFP
 
Protecting the Privacy of the Network – Using P4 to Prototype and Extend Netw...
Protecting the Privacy of the Network – Using P4 to Prototype and Extend Netw...Protecting the Privacy of the Network – Using P4 to Prototype and Extend Netw...
Protecting the Privacy of the Network – Using P4 to Prototype and Extend Netw...Open-NFP
 
P4-based VNF and Micro-VNF Chaining for Servers With Intelligent Server Adapters
P4-based VNF and Micro-VNF Chaining for Servers With Intelligent Server AdaptersP4-based VNF and Micro-VNF Chaining for Servers With Intelligent Server Adapters
P4-based VNF and Micro-VNF Chaining for Servers With Intelligent Server AdaptersOpen-NFP
 
Consensus as a Network Service
Consensus as a Network ServiceConsensus as a Network Service
Consensus as a Network ServiceOpen-NFP
 

Mehr von Open-NFP (7)

Accelerating Networked Applications with Flexible Packet Processing
Accelerating Networked Applications with Flexible Packet ProcessingAccelerating Networked Applications with Flexible Packet Processing
Accelerating Networked Applications with Flexible Packet Processing
 
Network Measurement with P4 and C on Netronome Agilio
Network Measurement with P4 and C on Netronome AgilioNetwork Measurement with P4 and C on Netronome Agilio
Network Measurement with P4 and C on Netronome Agilio
 
Measuring a 25 and 40Gb/s Data Plane
Measuring a 25 and 40Gb/s Data PlaneMeasuring a 25 and 40Gb/s Data Plane
Measuring a 25 and 40Gb/s Data Plane
 
OpenContrail, Real Speed: Offloading vRouter
OpenContrail, Real Speed: Offloading vRouterOpenContrail, Real Speed: Offloading vRouter
OpenContrail, Real Speed: Offloading vRouter
 
Protecting the Privacy of the Network – Using P4 to Prototype and Extend Netw...
Protecting the Privacy of the Network – Using P4 to Prototype and Extend Netw...Protecting the Privacy of the Network – Using P4 to Prototype and Extend Netw...
Protecting the Privacy of the Network – Using P4 to Prototype and Extend Netw...
 
P4-based VNF and Micro-VNF Chaining for Servers With Intelligent Server Adapters
P4-based VNF and Micro-VNF Chaining for Servers With Intelligent Server AdaptersP4-based VNF and Micro-VNF Chaining for Servers With Intelligent Server Adapters
P4-based VNF and Micro-VNF Chaining for Servers With Intelligent Server Adapters
 
Consensus as a Network Service
Consensus as a Network ServiceConsensus as a Network Service
Consensus as a Network Service
 

Kürzlich hochgeladen

"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDGMarianaLemus7
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 

Kürzlich hochgeladen (20)

"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDG
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
The transition to renewables in India.pdf
The transition to renewables in India.pdfThe transition to renewables in India.pdf
The transition to renewables in India.pdf
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 

P4, EPBF, and Linux TC Offload

  • 1. 1©2016 Open-NFP Open-NFP Summer Webinar Series: Session 4: P4, EBPF And Linux TC Offload Dinan Gunawardena & Jakub Kicinski - Netronome August 24, 2016
  • 2. 2©2016 Open-NFP Open-NFP www.open-nfp.org Support and grow reusable research in accelerating dataplane network functions processing Reduce/eliminate the cost and technology barriers to research in this space •  Technologies: –  P4, eBPF, SDN, OpenFlow, Open vSwitch (OVS) offload •  Tools: –  Discounted hardware, development tools, software, cloud access •  Community: –  Website (www.open-nfp.org): learning & training materials, active Google group https://groups.google.com/d/forum/open-nfp, open project descriptions, code repository •  Learning/Education/Research support: –  Summer seminar series, P4DevCon conference, Tutorials (P4 Developer Day), research proposal support for proposals to the NSF, state agencies Summer seminar series to further progress to our objective. Present applied reusable research.
  • 3. 3©2016 Open-NFP Universities Companies P4DevCon Attendees/Open-NFP Projects* *This does not imply that these organiza4ons endorse Open-NFP or Netronome
  • 4. 4©2016 Open-NFP Session Agenda 1. Introduction –  Objectives 2. Overview: The high level model for offload -  What we are offloading – P4 / eBPF -  Overall programmer model for transparent offload 3. Linux Kernel Infrastructure –  The Traffic Classifier (TC) –  eXpress Data Path (XDP) –  Current eBPF translation on X86/ARM64/PPC64 4. Hardware Intro to NFP (Network Flow Processor) architecture –  SmartNICs-Multi Core, Many Core –  NUMA, Memory Hierarchy 5. Accelerating P4/eBPF in NFP : Implementation –  Kernel core infrastructure –  Map handling in the kernel –  Translating instructions –  Basic Map Support –  Optimizations 6. & 7. Demo; Summary
  • 6. 6©2016 Open-NFP Introduction: Objectives Understanding how eBPF is relevant to P4 Understanding the support for offload and state of art in the Linux Kernel The Code – Understand the structure of a eBPF program – Gain an insight into how this is translated and executed in hardware Understanding how the NFP architecture on the Agilio CX enables high performing, fully programmable network offload – The Many Core architecture and its advantages
  • 7. 7©2016 Open-NFP Overview: High level model for offload •  What we are offloading – P4 / eBPF •  Overall programmer model for transparent offload
  • 8. 8©2016 Open-NFP P4 and eBPF What are P4 and eBPF? Domain specific languages for specifying forwarding behaviour of the data plane of network components P4 - Programming Protocol-Independent Packet Processors •  Header format description •  Parse Graphs (FSM) •  Tables (<keys,actions>) •  Actions manipulate packet header/metadata •  Control flow – an imperative program, describing sequence of data dependent match/actions eBPF – Extended Berkley Packet Filters •  Low level (machine code like) language •  Code executed by a VM (restricted memory, no sleeps/locks, limited API to kernel)in the Kernel (TC) •  Code injected into netfilter hook points in kernel data plane •  Maps (<key, value> stores) •  Chained filter functions •  Match/action •  Static verification of safety, guaranteed to terminate
  • 9. 9©2016 Open-NFP Translating P4->eBPF John Fastabend P4 to eBPF compiler Why translate P4 to eBPF? Table and diagrams © Mihai Budiu
  • 10. 10©2016 Open-NFP Model for Transparent Offload Programmer / user is “unaware” that eBPF code is “offloaded” Requirements • Partial pipeline offload • Fallback to software for any eBPF code block • Transparent user mode / kernel mode access to tables eBPF Program 2 (HW offload) eBPF Program 3 Packet In eBPF Program 1 (HW offload) PCI-E crossing
  • 11. 11©2016 Open-NFP Linux Kernel Infrastucture •  The Traffic Classifier (TC) •  eXpress Data Path (XDP)
  • 12. 12©2016 Open-NFP Linux Traffic Classifier (TC) Component Linux Component Shaping The class offers shaping capabili4es Scheduling A qdisc acts as a scheduler e.g. FIFO Classifying The filter performs classifica4on through a classifier object. Policing A policer performs policing within a filter Dropping The “drop” ac4on occurs with a filter+policer Marking The dsmark qdisc is used for marking eBPF program TC diagram and example program © Jamal Hadi Salim
  • 13. 13©2016 Open-NFP eXpress Data Path (XDP) What •  High performance, programmable network data path Utility •  Useful for packet processing •  forwarding •  load balancing •  DOS mitigation •  firewalls, etc. XDP architecture diagram © Tom Herbert
  • 14. 14©2016 Open-NFP Hardware Intro to NFP (Network Flow Processor) architecture •  NUMA, Memory Hierarchy •  Current eBPF translation on X86/ARM64/ PPC64
  • 15. 15©2016 Open-NFP NUMA, Memory Hierarchy Architecural Philosopies: •  Bring the data close to where it needs to be processed •  Facilitate highly concurrent access to memories •  Mitigate branch costs and hide I/O & memory access latencies
  • 16. 16©2016 Open-NFP Current eBPF translation on X86/ARM64/PPC64 1) Write eBPF program as a simple C Program 2) Compiled to eBPF byte code 3) Loaded into the Linux TC 4) Run through verifier 5) Cross compiled to X86/ARM64/PPC64 … Or now NFP Byte Code! NFP hardware offloaded eBPF TC
  • 19. 19©2016 Open-NFP Accelerating P4/eBPF in NFP : Implementation •  Kernel core infrastructure •  Map handling in the kernel •  eBPF to NFP •  Map Support •  Optimizations
  • 20. 20©2016 Open-NFP Kernel core infrastructure User Space Traffic Classifier (TC) Driver (XDP) NFP Offload Control eBPF Program + Flags Firmware & Hardware PCI-E Network Kernel User NFP TCP Stack skip_sw | skip_hw Offload obj Stats
  • 21. 21©2016 Open-NFP eBPF to NFP eBPF Registers 10 x 64bits MAP DRAM X X X X A B 16 x 2 x 32bits ME Registers Translate Communica4on Registers NFP •  Non-linear mapping •  32 bit translation
  • 22. 22©2016 Open-NFP •  Write interception •  Ownership •  Associating with a device •  Read-Only single-user maps •  Read-Only multi-user maps •  Write-Enabled single-user maps •  Write-Enabled multi-user maps Map Handling in Kernel & Map Write Reflection User Space Network MAP Kernel Space NFP MAP Write Reflec4on PCI-E Control Applica4on
  • 23. 23©2016 Open-NFP Optimizations •  Dealing with different memory types •  Peephole Optimizer •  Dropping unnecessary jumps •  Optimizing instructions with immediates •  Fusing instructions •  Full A/B register allocations •  Liveness analysis with real state size tracking
  • 25. 25©2016 Open-NFP Summary •  Learnt the relationship between P4 and eBPF •  Discovered the infrastructure in the Linux Kernel for eBPF offload •  Learnt about how the Netronome Smart NIC architecture is optimised for network flow processing •  Explored how we implemented the eBPF offload in hardware