Professional Documents
Culture Documents
Open-NFP Summer Webinar Series:: Session 4: P4, EBPF and Linux TC Offload
Open-NFP Summer Webinar Series:: Session 4: P4, EBPF and Linux TC Offload
©2016 Open-NFP
1
Open-NFP www.open-nfp.org
Support and grow reusable research in accelerating dataplane network functions processing
• 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.
©2016 Open-NFP
2
P4DevCon Attendees/Open-NFP Projects*
Universities Companies
*This does not imply that these organiza4ons endorse Open-NFP or Netronome
©2016 Open-NFP
3
Session Agenda
1. Introduction 4. Hardware Intro to NFP (Network Flow
– Objectives Processor) architecture
2. Overview: The high level model for offload – SmartNICs-Multi Core, Many Core
– NUMA, Memory Hierarchy
- What we are offloading – P4 / eBPF
5. Accelerating P4/eBPF in NFP :
- Overall programmer model for transparent
Implementation
offload
– Kernel core infrastructure
3. Linux Kernel Infrastructure – Map handling in the kernel
– The Traffic Classifier (TC) – Translating instructions
– eXpress Data Path (XDP) – Basic Map Support
– Current eBPF translation on X86/ARM64/PPC64 – Optimizations
©2016 Open-NFP
4
Session Objectives
©2016 Open-NFP
5
Introduction: Objectives
©2016 Open-NFP
6
Overview: High level model for offload
©2016 Open-NFP
7
P4 and eBPF
Domain specific languages for specifying forwarding • Low level (machine code like) language
behaviour of the data plane of network components
• Code executed by a VM (restricted memory, no
P4 - Programming Protocol-Independent Packet sleeps/locks, limited API to kernel)in the Kernel (TC)
Processors
• Code injected into netfilter hook points in kernel data
• Header format description plane
• Control flow – an imperative program, describing • Static verification of safety, guaranteed to terminate
sequence of data dependent match/actions
©2016 Open-NFP
8
Translating P4->eBPF
John Fastabend P4 to eBPF compiler
©2016 Open-NFP
11
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
• High performance,
programmable network
data path
Utility
• forwarding
• load balancing
• DOS mitigation
• firewalls, etc.
©2016 Open-NFP
14
NUMA, Memory Hierarchy
Architecural Philosopies:
©2016 Open-NFP
15
Current eBPF translation on X86/ARM64/PPC64
©2016 Open-NFP
16
Dataflow
TCP Stack
Traffic Classifier (TC)
Packet + Sk_Buf Kernel
Driver (XDP)
PCI-E
Packet + Descriptor,
Firmware & Hardware Meta data
NFP
TCP Stack
Traffic Classifier (TC)
Packet + Sk_Buf Kernel
Mark
Driver (XDP)
PCI-E
Packet + Descriptor,
Firmware & Hardware Meta data
NFP
©2016 Open-NFP
Drop Redirect Network 18
Accelerating P4/eBPF in NFP :
Implementation
• Kernel core infrastructure
• Map handling in the kernel
• eBPF to NFP
• Map Support
• Optimizations
©2016 Open-NFP
19
Kernel core infrastructure
skip_sw | skip_hw
TCP Stack
Offload obj Traffic Classifier (TC)
Kernel
NFP Offload Stats
Driver (XDP)
Control
PCI-E
Firmware & Hardware NFP
Control User
• Write interception Applica4on Space
• Ownership
• Associating with a device MAP Kernel
Space
Write Reflec4on
PCI-E
• Read-Only single-user maps
©2016 Open-NFP
24
Summary
©2016 Open-NFP
25
QUESTIONS?
Dinan Gunawardena
dinan.gunawardena@netronome.com
Jakub Kicinski
Jakub.Kicinski@netronome.com
©2016 Open-NFP
26
THANK YOU
©2016 Open-NFP
27