SlideShare uma empresa Scribd logo
1 de 28
Baixar para ler offline
© 2018 NETRONOME SYSTEMS, INC.
Jakub Kicinski
BPF Hardware Offload Deep Dive
© 2018 NETRONOME SYSTEMS, INC. 2
BPF Sandbox
○ As a goal of BPF IR JITing of BPF IR to most RISC cores should be very easy
○ BPF VM provides a simple and well understood execution environment
○ Designed by Linux kernel-minded architects making sure there are no
implementation details leaking into the definition of the VM and ABIs
○ Unlike higher level languages BPF is a intermediate representation (IR) which
provides binary compatibility, it is a mechanism
○ BPF is extensible through helpers and maps allowing us to make use of special
HW features (when gain justifies the effort)
© 2018 NETRONOME SYSTEMS, INC. 3
BPF Ecosystem
○ Kernel infrastructure improves, including verifier/analyzer, JIT compilers for all
common host architectures and some common embedded architectures like
ARM or x86
○ Linux kernel community is very active in extending performance and improving
BPF feature set, with AF_XDP being a most recent example
○ Android APF targets smaller processors in mobile handsets for filtering wake ups
from remote processors (most likely network interfaces) to improve battery life
© 2018 NETRONOME SYSTEMS, INC. 4
BPF Universe
r0 = 0
r2 = *(u32 *)(r1 + 4)
r1 = *(u32 *)(r1 + 0)
r3 = r1
r3 += 14
if r3 > r2 goto 7
r0 = 1
r2 = *(u8 *)(r1 + 12)
if r2 != 34 goto 4
r1 = *(u8 *)(r1 + 13)
r0 = 2
if r1 == 34 goto 1
r0 = 1
...
array LPM
helpers
data storage maps
hash
device
perf
event
socket
anchor maps
program
user space
© 2018 NETRONOME SYSTEMS, INC. 5
r0 = 0
r2 = *(u32 *)(r1 + 4)
r1 = *(u32 *)(r1 + 0)
r3 = r1
r3 += 14
if r3 > r2 goto 7
r0 = 1
r2 = *(u8 *)(r1 + 12)
if r2 != 34 goto 4
r1 = *(u8 *)(r1 + 13)
r0 = 2
if r1 == 34 goto 1
r0 = 1
...
array LPM
helpers
data storage maps
hash
device
perf
event
socket
anchor maps
program
User space
BPF Universe
● Translate the program code into device’s native machine code
○ Use advanced instructions
○ Optimize instruction scheduling
○ Optimize I/O
● Provide device-specific implementation of the helpers
● Use hardware accelerators for maps
○ Use of richer memory architectures
○ Algorithmic lookup engines
○ TCAMs
● Filter packets directly in the NIC
● Handle advanced switching/routing
● Application-specific packet reception policies
© 2018 NETRONOME SYSTEMS, INC. 6
• Optimized for standard server based cloud data centers
• Based on the Netronome Network Flow Processor 4xxx line
• Low profile, half length PCIe form factor for all versions
• Memory: 2GB DRAM
• <25W Power, typical 15-20W
© 2018 NETRONOME SYSTEMS, INC. 7
SoC Architecture-Conceptual Components
4x PCIe Gen 3x8
Multi-threaded transactional memory
engines and accelerators optimized for
network processing
Flow processing cores
distributed into ‘islands’
of 12 (up to 7 islands)
ASIC based packet
processors, crypto
engines, etc…
14Tbps distributed
fabric-crucial
foundation for many
core architecturesUp to 100 Gbps
© 2018 NETRONOME SYSTEMS, INC. 8
NFP SoC Architecture
© 2018 NETRONOME SYSTEMS, INC. 9
NFP SoC Architecture
BPF maps
BPF
programs
© 2018 NETRONOME SYSTEMS, INC. 10
NFP SoC Packet Flow
© 2018 NETRONOME SYSTEMS, INC. 11
NFP SoC Packet Flow
© 2018 NETRONOME SYSTEMS, INC. 12
NFP SoC Packet Flow
© 2018 NETRONOME SYSTEMS, INC. 13
NFP SoC Packet Flow
© 2018 NETRONOME SYSTEMS, INC. 14
NFP SoC Packet Flow
© 2018 NETRONOME SYSTEMS, INC. 15
Memory Architecture - Latencies
NIC
Chip
Island (x6 per Chip)
CTM (256 KB)
IMEM (4 MB)
DRAM
(2+GB)
CLS
(64 KB)
Thread (x4 per Core)
800Mhz Core
LMEM
(1 KB)
GPRs
x50 BPF
workers
LMEM - 1-3 cycles
CLS - 20-50 cycles
CTM - 50-100 cycles
IMEM - 150-250 cycles
GPRS/xfer regs - 1 cycle
DRAM - 150-500 cycles
© 2018 NETRONOME SYSTEMS, INC. 16
Memory Architecture
Thread 0 Thread 1 Thread 2 Dispatcher Thread Thread
CPP Read X and
Yield
Yield
CPP Write Y
Yield
Push Value X
Pull Value Y
Return Value Y
Yield
Yield
Flow Processing Core Cluster Target Memory
Multithreaded Transactional Memory Architecture Hides Latency
© 2018 NETRONOME SYSTEMS, INC. 17
Kernel Offload - BPF Offload Memory Mapping
NIC
Chip
Island (x6 per Chip)
CTM (256 KB)
IMEM(4 MB)
DRAM
(2+GB)
CLS
(64 KB)
Thread (x4 per Core)
800Mhz Core
LMEM
(1 KB)
GPRs
10 Registers
(64-bit, 32-bit
subregisters)
512 byte
stack
Maps, varying
sizes
Driver
x50 BPF
workers
© 2018 NETRONOME SYSTEMS, INC. 18
Programming Model
● Program is written in standard manner
● LLVM compiled as normal
● iproute/tc/libbpf loads the program
requesting offload
● The nfp_bpf_jit.c converts the BPF
bytecode to NFP machine code (and
we mean the actual machine code :))
● Translation reuses a significant amount
of verifier infrastructure
© 2018 NETRONOME SYSTEMS, INC. 19
BPF Object Creation (maps)
1. Get map file descriptors:
a. For existing maps - get access to a file descriptor:
i. from bpffs (pinned map) - open a pseudo file
ii. by ID - use BPF_MAP_GET_FD_BY_ID bpf syscall command
b. Create new maps - BPF_MAP_CREATE bpf syscall command:
union bpf_attr {
struct { /* anonymous struct used by BPF_MAP_CREATE command */
__u32 map_type; /* one of enum bpf_map_type */
__u32 key_size; /* size of key in bytes */
__u32 value_size; /* size of value in bytes */
__u32 max_entries; /* max number of entries in a map */
__u32 map_flags; /* BPF_MAP_CREATE related
* flags defined above.
*/
__u32 inner_map_fd; /* fd pointing to the inner map */
__u32 numa_node; /* numa node (effective only if
* BPF_F_NUMA_NODE is set).
*/
char map_name[BPF_OBJ_NAME_LEN];
__u32 map_ifindex; /* ifindex of netdev to create on */
__u32 btf_fd; /* fd pointing to a BTF type data */
__u32 btf_key_type_id; /* BTF type_id of the key */
__u32 btf_value_type_id; /* BTF type_id of the value */
};
© 2018 NETRONOME SYSTEMS, INC. 20
BPF object creation (programs)
1. Get program instructions;
2. Perform relocations (replace map references with file descriptors IDs);
3. Use BPF_PROG_LOAD to load the program;
union bpf_attr {
struct { /* anonymous struct used by BPF_PROG_LOAD command */
__u32 prog_type; /* one of enum bpf_prog_type */
__u32 insn_cnt;
__aligned_u64 insns;
__aligned_u64 license;
__u32 log_level; /* verbosity level of verifier */
__u32 log_size; /* size of user buffer */
__aligned_u64 log_buf; /* user supplied buffer */
__u32 kern_version; /* checked when prog_type=kprobe */
__u32 prog_flags;
char prog_name[BPF_OBJ_NAME_LEN];
__u32 prog_ifindex; /* ifindex of netdev to prep for */
/* For some prog types expected attach type must be known at
* load time to verify attach type specific parts of prog
* (context accesses, allowed helpers, etc).
*/
__u32 expected_attach_type;
};
© 2018 NETRONOME SYSTEMS, INC. 21
BPF Object Creation (libbpf)
● With libbpf use the extended attributes to set the ifindex:
struct bpf_prog_load_attr {
const char *file;
enum bpf_prog_type prog_type;
enum bpf_attach_type expected_attach_type;
int ifindex;
};
int bpf_prog_load_xattr(const struct bpf_prog_load_attr *attr,
struct bpf_object **pobj, int *prog_fd);
Normal kernel BPF ABIs are used, opt-in for offload by setting ifindex.
© 2018 NETRONOME SYSTEMS, INC. 22
Map Offload
kernel/
bpf/
syscall.c
kernel/
bpf/
offload.c
drivers/
net/
ethernet/
netronome/
nfp/
bpf/
struct
bpf_map_dev_ops
BPF
syscall
is
offloaded
?
BPF_MAP_CREATE,
BPF_MAP_LOOKUP_ELEM,
BPF_MAP_UPDATE_ELEM,
BPF_MAP_DELETE_ELEM,
BPF_MAP_GET_NEXT_KEY,
create, free
lookup, update,
delete, get_next_key
netdevice
ops
(ndo_bpf)
Linux network
config lock
Device Control
message
handler
© 2018 NETRONOME SYSTEMS, INC. 23
Map Offload
● Maps reside entirely in device memory
● Programs running on the host do not have access to offloaded maps and vice
versa (because host cannot efficiently access device memory)
● User space API remains unchanged
Kernel NFP
offloaded
program
offloaded maps
XDP
maps
cls_bpf
bpfilter
PCIe
Ethernet
© 2018 NETRONOME SYSTEMS, INC. 24
Map Offload
● Each map in the kernel has set of ops associated:
● Each map type (array, hash, LRU, LPM, etc.) has its own set of ops which
implement the map specific logic
● If map_ifindex is set the ops are pointed to an empty set of “offload ops”
regardless of the type (bpf_offload_prog_ops)
● Only calls from user space will now be allowed
/* map is generic key/value storage optionally accessible by eBPF programs */
struct bpf_map_ops {
/* funcs callable from userspace (via syscall) */
int (*map_alloc_check)(union bpf_attr *attr);
struct bpf_map *(*map_alloc)(union bpf_attr *attr);
void (*map_release)(struct bpf_map *map, struct file *map_file);
void (*map_free)(struct bpf_map *map);
int (*map_get_next_key)(struct bpf_map *map, void *key, void *next_key);
/* funcs callable from userspace and from eBPF programs */
void *(*map_lookup_elem)(struct bpf_map *map, void *key);
int (*map_update_elem)(struct bpf_map *map, void *key, void *value, u64 flags);
int (*map_delete_elem)(struct bpf_map *map, void *key);
};
© 2018 NETRONOME SYSTEMS, INC. 25
Program Offload
● Kernel verifier performs verification and some of common JIT steps for the host
architectures
● For offload these steps cause loss of context information and are incompatible
with the target
● Allow device translator to access the loaded program as-is:
○ IDs/offsets not translated:
■ structure field offsets
■ functions
■ map IDs
○ No prolog/epilogue injected
○ No optimizations made
For offloaded devices the verifier skips the extra host-centric rewrites.
© 2018 NETRONOME SYSTEMS, INC. 26
Program Offload Lifecycle
kernel/
bpf/
syscall.c
kernel/
bpf/
offload.c
BPF
syscall
kernel/
bpf/
verifier.c
bpf_prog_offload_init()
allocate data structures
for tracking offload
device association
NFP
driver
bpf_prog_offload_-
-verifier_prep()
netdevice ops :: ndo_bpf()
BPF_OFFLOAD_VERIFIER_PREP
allocate and construct driver-
-specific program data structures
per-instruction
verification
callback
nfp_verify_insn()
perform extra dev-specific
checks; gather context
information
kernel/
bpf/
core.c
bpf_prog_offload_-
-translate()
BPF_OFFLOAD_TRANSLATE
run optimizations and machine code
generation
bpf_prog_offload_-
-destroy()
BPF_OFFLOAD_DESTROY
free all data structures and
machine code image
netdevice ops :: ndo_bpf()
© 2018 NETRONOME SYSTEMS, INC. 27
Program Offload
● After program has been loaded into the kernel the subsystem specific handling
remains unchanged
● For network programs offloaded program can be attached to device ingress to
XDP (BPF_PROG_TYPE_XDP) or cls_bpf (BPF_PROG_TYPE_SCHED_CLS)
● Program can be attached to any of the ports of device for which it was loaded
● Actually loading program to device memory only happens when it’s being
attached
© 2018 NETRONOME SYSTEMS, INC. 28
BPF Offload - Summary
● BPF VM/sandbox is well suited for a heterogeneous processing engine
● BPF offload allows loading a BPF program onto a device instead of host CPU
● All user space tooling and ABIs remain unchanged
● No vendor-specific APIs or SDKs
● BPF offload is part of the upstream Linux kernel (recent kernel required)
● BPF programs loaded onto device can take advantage of HW accelerators such
as HW memory lookup engines
● Try it out today on standard NFP server cards! (academic pricing available on open-nfp.org )
● Reach out with BPF-related questions:
○ https://help.netronome.com/a/forums/
○ https://groups.google.com/forum/#!forum/open-nfp
○ xdp-newbies@vger.kernel.org
● Register for the next webinar in this series!

Mais conteúdo relacionado

Mais procurados

Fun with Network Interfaces
Fun with Network InterfacesFun with Network Interfaces
Fun with Network InterfacesKernel TLV
 
Xdp and ebpf_maps
Xdp and ebpf_mapsXdp and ebpf_maps
Xdp and ebpf_mapslcplcp1
 
Introduction to eBPF
Introduction to eBPFIntroduction to eBPF
Introduction to eBPFRogerColl2
 
SR-IOV+KVM on Debian/Stable
SR-IOV+KVM on Debian/StableSR-IOV+KVM on Debian/Stable
SR-IOV+KVM on Debian/Stablejuet-y
 
The TCP/IP Stack in the Linux Kernel
The TCP/IP Stack in the Linux KernelThe TCP/IP Stack in the Linux Kernel
The TCP/IP Stack in the Linux KernelDivye Kapoor
 
Introduction to DPDK
Introduction to DPDKIntroduction to DPDK
Introduction to DPDKKernel TLV
 
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
 
DPDK in Containers Hands-on Lab
DPDK in Containers Hands-on LabDPDK in Containers Hands-on Lab
DPDK in Containers Hands-on LabMichelle Holley
 
BPF Internals (eBPF)
BPF Internals (eBPF)BPF Internals (eBPF)
BPF Internals (eBPF)Brendan Gregg
 
EBPF and Linux Networking
EBPF and Linux NetworkingEBPF and Linux Networking
EBPF and Linux NetworkingPLUMgrid
 
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
 
LinuxCon 2015 Linux Kernel Networking Walkthrough
LinuxCon 2015 Linux Kernel Networking WalkthroughLinuxCon 2015 Linux Kernel Networking Walkthrough
LinuxCon 2015 Linux Kernel Networking WalkthroughThomas Graf
 
Cilium - BPF & XDP for containers
 Cilium - BPF & XDP for containers Cilium - BPF & XDP for containers
Cilium - BPF & XDP for containersDocker, Inc.
 
netfilter and iptables
netfilter and iptablesnetfilter and iptables
netfilter and iptablesKernel TLV
 
DMA Survival Guide
DMA Survival GuideDMA Survival Guide
DMA Survival GuideKernel TLV
 
Linux Linux Traffic Control
Linux Linux Traffic ControlLinux Linux Traffic Control
Linux Linux Traffic ControlSUSE Labs Taipei
 
Cilium - Container Networking with BPF & XDP
Cilium - Container Networking with BPF & XDPCilium - Container Networking with BPF & XDP
Cilium - Container Networking with BPF & XDPThomas Graf
 
Linux MMAP & Ioremap introduction
Linux MMAP & Ioremap introductionLinux MMAP & Ioremap introduction
Linux MMAP & Ioremap introductionGene Chang
 

Mais procurados (20)

Fun with Network Interfaces
Fun with Network InterfacesFun with Network Interfaces
Fun with Network Interfaces
 
Understanding DPDK
Understanding DPDKUnderstanding DPDK
Understanding DPDK
 
Xdp and ebpf_maps
Xdp and ebpf_mapsXdp and ebpf_maps
Xdp and ebpf_maps
 
Introduction to eBPF
Introduction to eBPFIntroduction to eBPF
Introduction to eBPF
 
SR-IOV+KVM on Debian/Stable
SR-IOV+KVM on Debian/StableSR-IOV+KVM on Debian/Stable
SR-IOV+KVM on Debian/Stable
 
The TCP/IP Stack in the Linux Kernel
The TCP/IP Stack in the Linux KernelThe TCP/IP Stack in the Linux Kernel
The TCP/IP Stack in the Linux Kernel
 
Introduction to DPDK
Introduction to DPDKIntroduction to DPDK
Introduction to DPDK
 
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
 
DPDK in Containers Hands-on Lab
DPDK in Containers Hands-on LabDPDK in Containers Hands-on Lab
DPDK in Containers Hands-on Lab
 
BPF Internals (eBPF)
BPF Internals (eBPF)BPF Internals (eBPF)
BPF Internals (eBPF)
 
EBPF and Linux Networking
EBPF and Linux NetworkingEBPF and Linux Networking
EBPF and Linux Networking
 
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
 
LinuxCon 2015 Linux Kernel Networking Walkthrough
LinuxCon 2015 Linux Kernel Networking WalkthroughLinuxCon 2015 Linux Kernel Networking Walkthrough
LinuxCon 2015 Linux Kernel Networking Walkthrough
 
Cilium - BPF & XDP for containers
 Cilium - BPF & XDP for containers Cilium - BPF & XDP for containers
Cilium - BPF & XDP for containers
 
netfilter and iptables
netfilter and iptablesnetfilter and iptables
netfilter and iptables
 
DMA Survival Guide
DMA Survival GuideDMA Survival Guide
DMA Survival Guide
 
Linux Linux Traffic Control
Linux Linux Traffic ControlLinux Linux Traffic Control
Linux Linux Traffic Control
 
Cilium - Container Networking with BPF & XDP
Cilium - Container Networking with BPF & XDPCilium - Container Networking with BPF & XDP
Cilium - Container Networking with BPF & XDP
 
Linux MMAP & Ioremap introduction
Linux MMAP & Ioremap introductionLinux MMAP & Ioremap introduction
Linux MMAP & Ioremap introduction
 
Linux Network Stack
Linux Network StackLinux Network Stack
Linux Network Stack
 

Semelhante a BPF Hardware Offload Deep Dive

BKK16-103 OpenCSD - Open for Business!
BKK16-103 OpenCSD - Open for Business!BKK16-103 OpenCSD - Open for Business!
BKK16-103 OpenCSD - Open for Business!Linaro
 
Comprehensive XDP Off‌load-handling the Edge Cases
Comprehensive XDP Off‌load-handling the Edge CasesComprehensive XDP Off‌load-handling the Edge Cases
Comprehensive XDP Off‌load-handling the Edge CasesNetronome
 
Heterogeneous multiprocessing on androd and i.mx7
Heterogeneous multiprocessing on androd and i.mx7Heterogeneous multiprocessing on androd and i.mx7
Heterogeneous multiprocessing on androd and i.mx7Kynetics
 
Lcu14 101- coresight overview
Lcu14 101- coresight overviewLcu14 101- coresight overview
Lcu14 101- coresight overviewLinaro
 
AMP Kynetics - ELC 2018 Portland
AMP  Kynetics - ELC 2018 PortlandAMP  Kynetics - ELC 2018 Portland
AMP Kynetics - ELC 2018 PortlandKynetics
 
Asymmetric Multiprocessing - Kynetics ELC 2018 portland
Asymmetric Multiprocessing - Kynetics ELC 2018 portlandAsymmetric Multiprocessing - Kynetics ELC 2018 portland
Asymmetric Multiprocessing - Kynetics ELC 2018 portlandNicola La Gloria
 
An Enhanced FPGA Based Asynchronous Microprocessor Design Using VIVADO and ISIM
An Enhanced FPGA Based Asynchronous Microprocessor Design Using VIVADO and ISIMAn Enhanced FPGA Based Asynchronous Microprocessor Design Using VIVADO and ISIM
An Enhanced FPGA Based Asynchronous Microprocessor Design Using VIVADO and ISIMjournalBEEI
 
A 32-Bit Parameterized Leon-3 Processor with Custom Peripheral Integration
A 32-Bit Parameterized Leon-3 Processor with Custom Peripheral IntegrationA 32-Bit Parameterized Leon-3 Processor with Custom Peripheral Integration
A 32-Bit Parameterized Leon-3 Processor with Custom Peripheral IntegrationTalal Khaliq
 
HKG18-318 - OpenAMP Workshop
HKG18-318 - OpenAMP WorkshopHKG18-318 - OpenAMP Workshop
HKG18-318 - OpenAMP WorkshopLinaro
 
Gl embedded starterkit_ethernet
Gl embedded starterkit_ethernetGl embedded starterkit_ethernet
Gl embedded starterkit_ethernetRoman Brovko
 
LAS16-300: Mini Conference 2 Cortex-M Software - Device Configuration
LAS16-300: Mini Conference 2 Cortex-M Software - Device ConfigurationLAS16-300: Mini Conference 2 Cortex-M Software - Device Configuration
LAS16-300: Mini Conference 2 Cortex-M Software - Device ConfigurationLinaro
 
ebpf and IO Visor: The What, how, and what next!
ebpf and IO Visor: The What, how, and what next!ebpf and IO Visor: The What, how, and what next!
ebpf and IO Visor: The What, how, and what next!Affan Syed
 
Stream Processing
Stream ProcessingStream Processing
Stream Processingarnamoy10
 
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
 
Investigation report on 64 bit support and some of new features in aosp master
Investigation report on 64 bit support and some of new features in aosp masterInvestigation report on 64 bit support and some of new features in aosp master
Investigation report on 64 bit support and some of new features in aosp masterhidenorly
 
eBPF in the view of a storage developer
eBPF in the view of a storage developereBPF in the view of a storage developer
eBPF in the view of a storage developerRichárd Kovács
 
LAS16-210: Hardware Assisted Tracing on ARM with CoreSight and OpenCSD
LAS16-210: Hardware Assisted Tracing on ARM with CoreSight and OpenCSDLAS16-210: Hardware Assisted Tracing on ARM with CoreSight and OpenCSD
LAS16-210: Hardware Assisted Tracing on ARM with CoreSight and OpenCSDLinaro
 
BPF & Cilium - Turning Linux into a Microservices-aware Operating System
BPF  & Cilium - Turning Linux into a Microservices-aware Operating SystemBPF  & Cilium - Turning Linux into a Microservices-aware Operating System
BPF & Cilium - Turning Linux into a Microservices-aware Operating SystemThomas Graf
 
chapter2-part1-140329134839-phpapp02.pptx
chapter2-part1-140329134839-phpapp02.pptxchapter2-part1-140329134839-phpapp02.pptx
chapter2-part1-140329134839-phpapp02.pptxSangeetaTripathi8
 

Semelhante a BPF Hardware Offload Deep Dive (20)

BKK16-103 OpenCSD - Open for Business!
BKK16-103 OpenCSD - Open for Business!BKK16-103 OpenCSD - Open for Business!
BKK16-103 OpenCSD - Open for Business!
 
Comprehensive XDP Off‌load-handling the Edge Cases
Comprehensive XDP Off‌load-handling the Edge CasesComprehensive XDP Off‌load-handling the Edge Cases
Comprehensive XDP Off‌load-handling the Edge Cases
 
Heterogeneous multiprocessing on androd and i.mx7
Heterogeneous multiprocessing on androd and i.mx7Heterogeneous multiprocessing on androd and i.mx7
Heterogeneous multiprocessing on androd and i.mx7
 
Lcu14 101- coresight overview
Lcu14 101- coresight overviewLcu14 101- coresight overview
Lcu14 101- coresight overview
 
AMP Kynetics - ELC 2018 Portland
AMP  Kynetics - ELC 2018 PortlandAMP  Kynetics - ELC 2018 Portland
AMP Kynetics - ELC 2018 Portland
 
Asymmetric Multiprocessing - Kynetics ELC 2018 portland
Asymmetric Multiprocessing - Kynetics ELC 2018 portlandAsymmetric Multiprocessing - Kynetics ELC 2018 portland
Asymmetric Multiprocessing - Kynetics ELC 2018 portland
 
An Enhanced FPGA Based Asynchronous Microprocessor Design Using VIVADO and ISIM
An Enhanced FPGA Based Asynchronous Microprocessor Design Using VIVADO and ISIMAn Enhanced FPGA Based Asynchronous Microprocessor Design Using VIVADO and ISIM
An Enhanced FPGA Based Asynchronous Microprocessor Design Using VIVADO and ISIM
 
A 32-Bit Parameterized Leon-3 Processor with Custom Peripheral Integration
A 32-Bit Parameterized Leon-3 Processor with Custom Peripheral IntegrationA 32-Bit Parameterized Leon-3 Processor with Custom Peripheral Integration
A 32-Bit Parameterized Leon-3 Processor with Custom Peripheral Integration
 
HKG18-318 - OpenAMP Workshop
HKG18-318 - OpenAMP WorkshopHKG18-318 - OpenAMP Workshop
HKG18-318 - OpenAMP Workshop
 
Gl embedded starterkit_ethernet
Gl embedded starterkit_ethernetGl embedded starterkit_ethernet
Gl embedded starterkit_ethernet
 
LAS16-300: Mini Conference 2 Cortex-M Software - Device Configuration
LAS16-300: Mini Conference 2 Cortex-M Software - Device ConfigurationLAS16-300: Mini Conference 2 Cortex-M Software - Device Configuration
LAS16-300: Mini Conference 2 Cortex-M Software - Device Configuration
 
NWU and HPC
NWU and HPCNWU and HPC
NWU and HPC
 
ebpf and IO Visor: The What, how, and what next!
ebpf and IO Visor: The What, how, and what next!ebpf and IO Visor: The What, how, and what next!
ebpf and IO Visor: The What, how, and what next!
 
Stream Processing
Stream ProcessingStream Processing
Stream Processing
 
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
 
Investigation report on 64 bit support and some of new features in aosp master
Investigation report on 64 bit support and some of new features in aosp masterInvestigation report on 64 bit support and some of new features in aosp master
Investigation report on 64 bit support and some of new features in aosp master
 
eBPF in the view of a storage developer
eBPF in the view of a storage developereBPF in the view of a storage developer
eBPF in the view of a storage developer
 
LAS16-210: Hardware Assisted Tracing on ARM with CoreSight and OpenCSD
LAS16-210: Hardware Assisted Tracing on ARM with CoreSight and OpenCSDLAS16-210: Hardware Assisted Tracing on ARM with CoreSight and OpenCSD
LAS16-210: Hardware Assisted Tracing on ARM with CoreSight and OpenCSD
 
BPF & Cilium - Turning Linux into a Microservices-aware Operating System
BPF  & Cilium - Turning Linux into a Microservices-aware Operating SystemBPF  & Cilium - Turning Linux into a Microservices-aware Operating System
BPF & Cilium - Turning Linux into a Microservices-aware Operating System
 
chapter2-part1-140329134839-phpapp02.pptx
chapter2-part1-140329134839-phpapp02.pptxchapter2-part1-140329134839-phpapp02.pptx
chapter2-part1-140329134839-phpapp02.pptx
 

Mais de Netronome

Disaggregation a Primer: Optimizing design for Edge Cloud & Bare Metal applic...
Disaggregation a Primer: Optimizing design for Edge Cloud & Bare Metal applic...Disaggregation a Primer: Optimizing design for Edge Cloud & Bare Metal applic...
Disaggregation a Primer: Optimizing design for Edge Cloud & Bare Metal applic...Netronome
 
LFSMM AF XDP Queue I-DS
LFSMM AF XDP Queue I-DSLFSMM AF XDP Queue I-DS
LFSMM AF XDP Queue I-DSNetronome
 
LFSMM Verifier Optimizations and 1 M Instructions
LFSMM Verifier Optimizations and 1 M InstructionsLFSMM Verifier Optimizations and 1 M Instructions
LFSMM Verifier Optimizations and 1 M InstructionsNetronome
 
Using Network Acceleration for an Optimized Edge Cloud Server Architecture
Using Network Acceleration for an Optimized Edge Cloud Server ArchitectureUsing Network Acceleration for an Optimized Edge Cloud Server Architecture
Using Network Acceleration for an Optimized Edge Cloud Server ArchitectureNetronome
 
Offloading TC Rules on OVS Internal Ports
Offloading TC Rules on OVS Internal Ports Offloading TC Rules on OVS Internal Ports
Offloading TC Rules on OVS Internal Ports Netronome
 
Quality of Service Ingress Rate Limiting and OVS Hardware Offloads
Quality of Service Ingress Rate Limiting and OVS Hardware OffloadsQuality of Service Ingress Rate Limiting and OVS Hardware Offloads
Quality of Service Ingress Rate Limiting and OVS Hardware OffloadsNetronome
 
ODSA Sub-Project Launch
 ODSA Sub-Project Launch ODSA Sub-Project Launch
ODSA Sub-Project LaunchNetronome
 
Flexible and Scalable Domain-Specific Architectures
Flexible and Scalable Domain-Specific ArchitecturesFlexible and Scalable Domain-Specific Architectures
Flexible and Scalable Domain-Specific ArchitecturesNetronome
 
Unifying Network Filtering Rules for the Linux Kernel with eBPF
Unifying Network Filtering Rules for the Linux Kernel with eBPFUnifying Network Filtering Rules for the Linux Kernel with eBPF
Unifying Network Filtering Rules for the Linux Kernel with eBPFNetronome
 
Massively Parallel RISC-V Processing with Transactional Memory
Massively Parallel RISC-V Processing with Transactional MemoryMassively Parallel RISC-V Processing with Transactional Memory
Massively Parallel RISC-V Processing with Transactional MemoryNetronome
 
Offloading Linux LAG Devices Via Open vSwitch and TC
Offloading Linux LAG Devices Via Open vSwitch and TCOffloading Linux LAG Devices Via Open vSwitch and TC
Offloading Linux LAG Devices Via Open vSwitch and TCNetronome
 
eBPF Debugging Infrastructure - Current Techniques
eBPF Debugging Infrastructure - Current TechniqueseBPF Debugging Infrastructure - Current Techniques
eBPF Debugging Infrastructure - Current TechniquesNetronome
 
Efficient JIT to 32-bit Arches
Efficient JIT to 32-bit ArchesEfficient JIT to 32-bit Arches
Efficient JIT to 32-bit ArchesNetronome
 
eBPF & Switch Abstractions
eBPF & Switch AbstractionseBPF & Switch Abstractions
eBPF & Switch AbstractionsNetronome
 
eBPF Tooling and Debugging Infrastructure
eBPF Tooling and Debugging InfrastructureeBPF Tooling and Debugging Infrastructure
eBPF Tooling and Debugging InfrastructureNetronome
 
Demystify eBPF JIT Compiler
Demystify eBPF JIT CompilerDemystify eBPF JIT Compiler
Demystify eBPF JIT CompilerNetronome
 
P4 Introduction
P4 Introduction P4 Introduction
P4 Introduction Netronome
 
Host Data Plane Acceleration: SmartNIC Deployment Models
Host Data Plane Acceleration: SmartNIC Deployment ModelsHost Data Plane Acceleration: SmartNIC Deployment Models
Host Data Plane Acceleration: SmartNIC Deployment ModelsNetronome
 
The Power of SmartNICs
The Power of SmartNICsThe Power of SmartNICs
The Power of SmartNICsNetronome
 
DPDK Support for New HW Offloads
DPDK Support for New HW OffloadsDPDK Support for New HW Offloads
DPDK Support for New HW OffloadsNetronome
 

Mais de Netronome (20)

Disaggregation a Primer: Optimizing design for Edge Cloud & Bare Metal applic...
Disaggregation a Primer: Optimizing design for Edge Cloud & Bare Metal applic...Disaggregation a Primer: Optimizing design for Edge Cloud & Bare Metal applic...
Disaggregation a Primer: Optimizing design for Edge Cloud & Bare Metal applic...
 
LFSMM AF XDP Queue I-DS
LFSMM AF XDP Queue I-DSLFSMM AF XDP Queue I-DS
LFSMM AF XDP Queue I-DS
 
LFSMM Verifier Optimizations and 1 M Instructions
LFSMM Verifier Optimizations and 1 M InstructionsLFSMM Verifier Optimizations and 1 M Instructions
LFSMM Verifier Optimizations and 1 M Instructions
 
Using Network Acceleration for an Optimized Edge Cloud Server Architecture
Using Network Acceleration for an Optimized Edge Cloud Server ArchitectureUsing Network Acceleration for an Optimized Edge Cloud Server Architecture
Using Network Acceleration for an Optimized Edge Cloud Server Architecture
 
Offloading TC Rules on OVS Internal Ports
Offloading TC Rules on OVS Internal Ports Offloading TC Rules on OVS Internal Ports
Offloading TC Rules on OVS Internal Ports
 
Quality of Service Ingress Rate Limiting and OVS Hardware Offloads
Quality of Service Ingress Rate Limiting and OVS Hardware OffloadsQuality of Service Ingress Rate Limiting and OVS Hardware Offloads
Quality of Service Ingress Rate Limiting and OVS Hardware Offloads
 
ODSA Sub-Project Launch
 ODSA Sub-Project Launch ODSA Sub-Project Launch
ODSA Sub-Project Launch
 
Flexible and Scalable Domain-Specific Architectures
Flexible and Scalable Domain-Specific ArchitecturesFlexible and Scalable Domain-Specific Architectures
Flexible and Scalable Domain-Specific Architectures
 
Unifying Network Filtering Rules for the Linux Kernel with eBPF
Unifying Network Filtering Rules for the Linux Kernel with eBPFUnifying Network Filtering Rules for the Linux Kernel with eBPF
Unifying Network Filtering Rules for the Linux Kernel with eBPF
 
Massively Parallel RISC-V Processing with Transactional Memory
Massively Parallel RISC-V Processing with Transactional MemoryMassively Parallel RISC-V Processing with Transactional Memory
Massively Parallel RISC-V Processing with Transactional Memory
 
Offloading Linux LAG Devices Via Open vSwitch and TC
Offloading Linux LAG Devices Via Open vSwitch and TCOffloading Linux LAG Devices Via Open vSwitch and TC
Offloading Linux LAG Devices Via Open vSwitch and TC
 
eBPF Debugging Infrastructure - Current Techniques
eBPF Debugging Infrastructure - Current TechniqueseBPF Debugging Infrastructure - Current Techniques
eBPF Debugging Infrastructure - Current Techniques
 
Efficient JIT to 32-bit Arches
Efficient JIT to 32-bit ArchesEfficient JIT to 32-bit Arches
Efficient JIT to 32-bit Arches
 
eBPF & Switch Abstractions
eBPF & Switch AbstractionseBPF & Switch Abstractions
eBPF & Switch Abstractions
 
eBPF Tooling and Debugging Infrastructure
eBPF Tooling and Debugging InfrastructureeBPF Tooling and Debugging Infrastructure
eBPF Tooling and Debugging Infrastructure
 
Demystify eBPF JIT Compiler
Demystify eBPF JIT CompilerDemystify eBPF JIT Compiler
Demystify eBPF JIT Compiler
 
P4 Introduction
P4 Introduction P4 Introduction
P4 Introduction
 
Host Data Plane Acceleration: SmartNIC Deployment Models
Host Data Plane Acceleration: SmartNIC Deployment ModelsHost Data Plane Acceleration: SmartNIC Deployment Models
Host Data Plane Acceleration: SmartNIC Deployment Models
 
The Power of SmartNICs
The Power of SmartNICsThe Power of SmartNICs
The Power of SmartNICs
 
DPDK Support for New HW Offloads
DPDK Support for New HW OffloadsDPDK Support for New HW Offloads
DPDK Support for New HW Offloads
 

Último

08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
#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
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 

Último (20)

08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
#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
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 

BPF Hardware Offload Deep Dive

  • 1. © 2018 NETRONOME SYSTEMS, INC. Jakub Kicinski BPF Hardware Offload Deep Dive
  • 2. © 2018 NETRONOME SYSTEMS, INC. 2 BPF Sandbox ○ As a goal of BPF IR JITing of BPF IR to most RISC cores should be very easy ○ BPF VM provides a simple and well understood execution environment ○ Designed by Linux kernel-minded architects making sure there are no implementation details leaking into the definition of the VM and ABIs ○ Unlike higher level languages BPF is a intermediate representation (IR) which provides binary compatibility, it is a mechanism ○ BPF is extensible through helpers and maps allowing us to make use of special HW features (when gain justifies the effort)
  • 3. © 2018 NETRONOME SYSTEMS, INC. 3 BPF Ecosystem ○ Kernel infrastructure improves, including verifier/analyzer, JIT compilers for all common host architectures and some common embedded architectures like ARM or x86 ○ Linux kernel community is very active in extending performance and improving BPF feature set, with AF_XDP being a most recent example ○ Android APF targets smaller processors in mobile handsets for filtering wake ups from remote processors (most likely network interfaces) to improve battery life
  • 4. © 2018 NETRONOME SYSTEMS, INC. 4 BPF Universe r0 = 0 r2 = *(u32 *)(r1 + 4) r1 = *(u32 *)(r1 + 0) r3 = r1 r3 += 14 if r3 > r2 goto 7 r0 = 1 r2 = *(u8 *)(r1 + 12) if r2 != 34 goto 4 r1 = *(u8 *)(r1 + 13) r0 = 2 if r1 == 34 goto 1 r0 = 1 ... array LPM helpers data storage maps hash device perf event socket anchor maps program user space
  • 5. © 2018 NETRONOME SYSTEMS, INC. 5 r0 = 0 r2 = *(u32 *)(r1 + 4) r1 = *(u32 *)(r1 + 0) r3 = r1 r3 += 14 if r3 > r2 goto 7 r0 = 1 r2 = *(u8 *)(r1 + 12) if r2 != 34 goto 4 r1 = *(u8 *)(r1 + 13) r0 = 2 if r1 == 34 goto 1 r0 = 1 ... array LPM helpers data storage maps hash device perf event socket anchor maps program User space BPF Universe ● Translate the program code into device’s native machine code ○ Use advanced instructions ○ Optimize instruction scheduling ○ Optimize I/O ● Provide device-specific implementation of the helpers ● Use hardware accelerators for maps ○ Use of richer memory architectures ○ Algorithmic lookup engines ○ TCAMs ● Filter packets directly in the NIC ● Handle advanced switching/routing ● Application-specific packet reception policies
  • 6. © 2018 NETRONOME SYSTEMS, INC. 6 • Optimized for standard server based cloud data centers • Based on the Netronome Network Flow Processor 4xxx line • Low profile, half length PCIe form factor for all versions • Memory: 2GB DRAM • <25W Power, typical 15-20W
  • 7. © 2018 NETRONOME SYSTEMS, INC. 7 SoC Architecture-Conceptual Components 4x PCIe Gen 3x8 Multi-threaded transactional memory engines and accelerators optimized for network processing Flow processing cores distributed into ‘islands’ of 12 (up to 7 islands) ASIC based packet processors, crypto engines, etc… 14Tbps distributed fabric-crucial foundation for many core architecturesUp to 100 Gbps
  • 8. © 2018 NETRONOME SYSTEMS, INC. 8 NFP SoC Architecture
  • 9. © 2018 NETRONOME SYSTEMS, INC. 9 NFP SoC Architecture BPF maps BPF programs
  • 10. © 2018 NETRONOME SYSTEMS, INC. 10 NFP SoC Packet Flow
  • 11. © 2018 NETRONOME SYSTEMS, INC. 11 NFP SoC Packet Flow
  • 12. © 2018 NETRONOME SYSTEMS, INC. 12 NFP SoC Packet Flow
  • 13. © 2018 NETRONOME SYSTEMS, INC. 13 NFP SoC Packet Flow
  • 14. © 2018 NETRONOME SYSTEMS, INC. 14 NFP SoC Packet Flow
  • 15. © 2018 NETRONOME SYSTEMS, INC. 15 Memory Architecture - Latencies NIC Chip Island (x6 per Chip) CTM (256 KB) IMEM (4 MB) DRAM (2+GB) CLS (64 KB) Thread (x4 per Core) 800Mhz Core LMEM (1 KB) GPRs x50 BPF workers LMEM - 1-3 cycles CLS - 20-50 cycles CTM - 50-100 cycles IMEM - 150-250 cycles GPRS/xfer regs - 1 cycle DRAM - 150-500 cycles
  • 16. © 2018 NETRONOME SYSTEMS, INC. 16 Memory Architecture Thread 0 Thread 1 Thread 2 Dispatcher Thread Thread CPP Read X and Yield Yield CPP Write Y Yield Push Value X Pull Value Y Return Value Y Yield Yield Flow Processing Core Cluster Target Memory Multithreaded Transactional Memory Architecture Hides Latency
  • 17. © 2018 NETRONOME SYSTEMS, INC. 17 Kernel Offload - BPF Offload Memory Mapping NIC Chip Island (x6 per Chip) CTM (256 KB) IMEM(4 MB) DRAM (2+GB) CLS (64 KB) Thread (x4 per Core) 800Mhz Core LMEM (1 KB) GPRs 10 Registers (64-bit, 32-bit subregisters) 512 byte stack Maps, varying sizes Driver x50 BPF workers
  • 18. © 2018 NETRONOME SYSTEMS, INC. 18 Programming Model ● Program is written in standard manner ● LLVM compiled as normal ● iproute/tc/libbpf loads the program requesting offload ● The nfp_bpf_jit.c converts the BPF bytecode to NFP machine code (and we mean the actual machine code :)) ● Translation reuses a significant amount of verifier infrastructure
  • 19. © 2018 NETRONOME SYSTEMS, INC. 19 BPF Object Creation (maps) 1. Get map file descriptors: a. For existing maps - get access to a file descriptor: i. from bpffs (pinned map) - open a pseudo file ii. by ID - use BPF_MAP_GET_FD_BY_ID bpf syscall command b. Create new maps - BPF_MAP_CREATE bpf syscall command: union bpf_attr { struct { /* anonymous struct used by BPF_MAP_CREATE command */ __u32 map_type; /* one of enum bpf_map_type */ __u32 key_size; /* size of key in bytes */ __u32 value_size; /* size of value in bytes */ __u32 max_entries; /* max number of entries in a map */ __u32 map_flags; /* BPF_MAP_CREATE related * flags defined above. */ __u32 inner_map_fd; /* fd pointing to the inner map */ __u32 numa_node; /* numa node (effective only if * BPF_F_NUMA_NODE is set). */ char map_name[BPF_OBJ_NAME_LEN]; __u32 map_ifindex; /* ifindex of netdev to create on */ __u32 btf_fd; /* fd pointing to a BTF type data */ __u32 btf_key_type_id; /* BTF type_id of the key */ __u32 btf_value_type_id; /* BTF type_id of the value */ };
  • 20. © 2018 NETRONOME SYSTEMS, INC. 20 BPF object creation (programs) 1. Get program instructions; 2. Perform relocations (replace map references with file descriptors IDs); 3. Use BPF_PROG_LOAD to load the program; union bpf_attr { struct { /* anonymous struct used by BPF_PROG_LOAD command */ __u32 prog_type; /* one of enum bpf_prog_type */ __u32 insn_cnt; __aligned_u64 insns; __aligned_u64 license; __u32 log_level; /* verbosity level of verifier */ __u32 log_size; /* size of user buffer */ __aligned_u64 log_buf; /* user supplied buffer */ __u32 kern_version; /* checked when prog_type=kprobe */ __u32 prog_flags; char prog_name[BPF_OBJ_NAME_LEN]; __u32 prog_ifindex; /* ifindex of netdev to prep for */ /* For some prog types expected attach type must be known at * load time to verify attach type specific parts of prog * (context accesses, allowed helpers, etc). */ __u32 expected_attach_type; };
  • 21. © 2018 NETRONOME SYSTEMS, INC. 21 BPF Object Creation (libbpf) ● With libbpf use the extended attributes to set the ifindex: struct bpf_prog_load_attr { const char *file; enum bpf_prog_type prog_type; enum bpf_attach_type expected_attach_type; int ifindex; }; int bpf_prog_load_xattr(const struct bpf_prog_load_attr *attr, struct bpf_object **pobj, int *prog_fd); Normal kernel BPF ABIs are used, opt-in for offload by setting ifindex.
  • 22. © 2018 NETRONOME SYSTEMS, INC. 22 Map Offload kernel/ bpf/ syscall.c kernel/ bpf/ offload.c drivers/ net/ ethernet/ netronome/ nfp/ bpf/ struct bpf_map_dev_ops BPF syscall is offloaded ? BPF_MAP_CREATE, BPF_MAP_LOOKUP_ELEM, BPF_MAP_UPDATE_ELEM, BPF_MAP_DELETE_ELEM, BPF_MAP_GET_NEXT_KEY, create, free lookup, update, delete, get_next_key netdevice ops (ndo_bpf) Linux network config lock Device Control message handler
  • 23. © 2018 NETRONOME SYSTEMS, INC. 23 Map Offload ● Maps reside entirely in device memory ● Programs running on the host do not have access to offloaded maps and vice versa (because host cannot efficiently access device memory) ● User space API remains unchanged Kernel NFP offloaded program offloaded maps XDP maps cls_bpf bpfilter PCIe Ethernet
  • 24. © 2018 NETRONOME SYSTEMS, INC. 24 Map Offload ● Each map in the kernel has set of ops associated: ● Each map type (array, hash, LRU, LPM, etc.) has its own set of ops which implement the map specific logic ● If map_ifindex is set the ops are pointed to an empty set of “offload ops” regardless of the type (bpf_offload_prog_ops) ● Only calls from user space will now be allowed /* map is generic key/value storage optionally accessible by eBPF programs */ struct bpf_map_ops { /* funcs callable from userspace (via syscall) */ int (*map_alloc_check)(union bpf_attr *attr); struct bpf_map *(*map_alloc)(union bpf_attr *attr); void (*map_release)(struct bpf_map *map, struct file *map_file); void (*map_free)(struct bpf_map *map); int (*map_get_next_key)(struct bpf_map *map, void *key, void *next_key); /* funcs callable from userspace and from eBPF programs */ void *(*map_lookup_elem)(struct bpf_map *map, void *key); int (*map_update_elem)(struct bpf_map *map, void *key, void *value, u64 flags); int (*map_delete_elem)(struct bpf_map *map, void *key); };
  • 25. © 2018 NETRONOME SYSTEMS, INC. 25 Program Offload ● Kernel verifier performs verification and some of common JIT steps for the host architectures ● For offload these steps cause loss of context information and are incompatible with the target ● Allow device translator to access the loaded program as-is: ○ IDs/offsets not translated: ■ structure field offsets ■ functions ■ map IDs ○ No prolog/epilogue injected ○ No optimizations made For offloaded devices the verifier skips the extra host-centric rewrites.
  • 26. © 2018 NETRONOME SYSTEMS, INC. 26 Program Offload Lifecycle kernel/ bpf/ syscall.c kernel/ bpf/ offload.c BPF syscall kernel/ bpf/ verifier.c bpf_prog_offload_init() allocate data structures for tracking offload device association NFP driver bpf_prog_offload_- -verifier_prep() netdevice ops :: ndo_bpf() BPF_OFFLOAD_VERIFIER_PREP allocate and construct driver- -specific program data structures per-instruction verification callback nfp_verify_insn() perform extra dev-specific checks; gather context information kernel/ bpf/ core.c bpf_prog_offload_- -translate() BPF_OFFLOAD_TRANSLATE run optimizations and machine code generation bpf_prog_offload_- -destroy() BPF_OFFLOAD_DESTROY free all data structures and machine code image netdevice ops :: ndo_bpf()
  • 27. © 2018 NETRONOME SYSTEMS, INC. 27 Program Offload ● After program has been loaded into the kernel the subsystem specific handling remains unchanged ● For network programs offloaded program can be attached to device ingress to XDP (BPF_PROG_TYPE_XDP) or cls_bpf (BPF_PROG_TYPE_SCHED_CLS) ● Program can be attached to any of the ports of device for which it was loaded ● Actually loading program to device memory only happens when it’s being attached
  • 28. © 2018 NETRONOME SYSTEMS, INC. 28 BPF Offload - Summary ● BPF VM/sandbox is well suited for a heterogeneous processing engine ● BPF offload allows loading a BPF program onto a device instead of host CPU ● All user space tooling and ABIs remain unchanged ● No vendor-specific APIs or SDKs ● BPF offload is part of the upstream Linux kernel (recent kernel required) ● BPF programs loaded onto device can take advantage of HW accelerators such as HW memory lookup engines ● Try it out today on standard NFP server cards! (academic pricing available on open-nfp.org ) ● Reach out with BPF-related questions: ○ https://help.netronome.com/a/forums/ ○ https://groups.google.com/forum/#!forum/open-nfp ○ xdp-newbies@vger.kernel.org ● Register for the next webinar in this series!