SlideShare a Scribd company logo
Snabb: Open
Source Meets
Dataplane
RIPE77, October 2018, Amsterdam
Andy Wingo | wingo@igalia.com |
@andywingo
this
talk
Why? The problem solved by Snabb
How? Snabb from the ground up
What? What’s in the box
Who? Snabb in the wild
why? Ever want to deploy a new RFC, but no
vendor is selling it?
Maybe it’s not even an RFC yet?
10 years ago – too bad
Now – open source software +
commodity servers
software? User-space data planes
Avoid the kernel, handle all data in
user-space
Snabb, DPDK, VPP (fd.io)
user
space
Tell Linux to forget about NIC
Mmap NIC’s PCI registers into address
space
Read and write memory == read
and write PCI registers
❧
Poke registers as needed to bring up
NIC
Set up a ring buffer for RX/TX
Busy-loop to take packets from RX,
process, send to TX
advantage You get the whole packet
No hazard for straying off device-
supported hot-path
Program using whatever technology
you want: C, Rust, Lua, Scheme, ...
“It’s just programming”
Hire anyone you want to modify the
programs
limits Limited by PCI bandwidth
Limited to ~10-50Gbps/CPU core
(parallelization possible)
Tangential to containerization /
kubernetes / openstack hellscape
an
aside
on
snabb
Goal: “rewritable software”
The hard part: searching program-
space for elegant hacks
“Is that all? I could rewrite that in a
weekend.”
in a
nutshell
A snabb program consists of a graph of
apps
Apps are connected by directional links
A snabb program processes packets in
units of breaths
program
code
Instantiate apps
Declare links
Breathe
local Intel82599 =
require("apps.intel.intel_app").Intel82599
local PcapFilter =
require("apps.packet_filter.pcap_filter").PcapFilter
local c = config.new()
config.app(c, "nic", Intel82599, {pciaddr="82:00.0"})
config.app(c, "filter", PcapFilter, {filter="tcp port 80"})
config.link(c, "nic.tx -> filter.input")
config.link(c, "filter.output -> nic.rx")
engine.configure(c)
while true do engine.breathe() end
snabb
is
written
in lua
Short and sweet programs
LuaJIT does the heavy lifting
High-performance just-in-time
compilation, applied to networking
domain
Lua all the way down – packet
processing, not just configuration
breaths Each breath has two phases:
Inhale a batch of packets into the
network
❧
Process those packets❧
To inhale, run pull functions on apps
that have them
To process, run push functions on apps
that have them
# Pull function for built-in Intel82599 app
function Intel82599:pull ()
for i = 1, engine.pull_npackets do
if not self.dev:can_receive() then break end
local pkt = self.dev:receive()
link.transmit(self.output.tx, pkt)
end
end
# Push function for built-in PcapFilter app
function PcapFilter:push ()
while not link.empty(self.input.rx) do
local p = link.receive(self.input.rx)
if self.accept_fn(p.data, p.length) then
link.transmit(self.output.tx, p)
else
packet.free(p)
end
end
end
packets
and
links
struct packet {
uint16_t length;
unsigned char data[10*1024];
};
struct link {
struct packet *packets[1024];
// the next element to be read
int read;
// the next element to be written
int write;
};
// (Some statistics counters elided)
voilà At this point, you can rewrite Snabb
(Please do!)
But you might want to use it as-is...
unboxing $ git clone 
https://github.com/snabbco/snabb
$ cd snabb
$ make
$ ./src/snabb
What’s in there?
How are people using it?
apps I/O: Intel i210/i350/82599, Mellanox
ConnectX4/5, TAP, AF_PACKET,
AF_XDP, vhost/virtio, pcap...
L2: ARP, NDP, learning bridge,
l2vpn...
L3: IPsec, ICMP, fragmentation...
+: IPFIX, lwAFTR, DPI, firewall,
pflang...
Apps: learning bridge, NIC
yang App graph as function of YANG-
modelled configuration
Run-time config/state query,
reconfigure
Multi-process
Statistics aggregation
https://snabbco.github.io/#ptree
libraries LPM, JSON, fast raw hash tables,
protocol stack, timer wheel, profiling,
packet match domain-specific
language compilers, NUMA/CPU
binding, RRD files...
https://snabbco.github.io/
no full
router
yet
Some support for receiving routes
from Linux
We would love to flesh this out!
snabb
in the
wild
See lightning talk “8 ways network
engineers use Snabb” for more
examples
exploratory
analysis
Flexibility, expressiveness, and rapid
development of scapy, the speed to run
live
A large CDN uses Snabb in this way
internally
layer 2
vpn
# github.com/alexandergall/snabb
# l2vpn branch
$ snabb l2vpn l2vpn.conf
RFC 4664 layer 2 learning bridge over
IPv6
Built by SWITCH network engineer
Alexander Gall because what he
needed wasn’t on offer
In production linking academic sites in
Switzerland
ipsec
vpn
Vita: https://github.com/inters/
vita
Secure VPN between sites, IPSec, 1-10
Gbps/core
Funded by NLnet Foundation
border
router
tunnel
endpoint
$ snabb lwaftr run lwaftr.conf
Lightweight 4-over-6 AFTR: processes
all IPv4 traffic for a network
YANG-enabled, runtime
reconfigurable
Multi-process: one instance can
manage many NICs in a machine
See K. Zorbadelos (OTE) at RIPE76:
https://ripe76.ripe.net/archives/
video/30/
join
us!
https://github.com/snabbco/snabb
snabb.slack.com (see Github page for
join link)
wingo@igalia.com, @andywingo
Happy hacking!
Ad

More Related Content

What's hot (20)

DISTRIBUTED PERFORMANCE ANALYSIS USING INFLUXDB AND THE LINUX EBPF VIRTUAL MA...
DISTRIBUTED PERFORMANCE ANALYSIS USING INFLUXDB AND THE LINUX EBPF VIRTUAL MA...DISTRIBUTED PERFORMANCE ANALYSIS USING INFLUXDB AND THE LINUX EBPF VIRTUAL MA...
DISTRIBUTED PERFORMANCE ANALYSIS USING INFLUXDB AND THE LINUX EBPF VIRTUAL MA...
InfluxData
 
On the Capability and Achievable Performance of FPGAs for HPC Applications
On the Capability and Achievable Performance of FPGAs for HPC ApplicationsOn the Capability and Achievable Performance of FPGAs for HPC Applications
On the Capability and Achievable Performance of FPGAs for HPC Applications
Wim Vanderbauwhede
 
My First FD.io VPP
My First FD.io VPPMy First FD.io VPP
My First FD.io VPP
Naoto MATSUMOTO
 
NBIS RNA-seq course
NBIS RNA-seq courseNBIS RNA-seq course
NBIS RNA-seq course
Phil Ewels
 
0.5mln packets per second with Erlang
0.5mln packets per second with Erlang0.5mln packets per second with Erlang
0.5mln packets per second with Erlang
Maxim Kharchenko
 
Netty - a pragmatic introduction
Netty - a pragmatic introductionNetty - a pragmatic introduction
Netty - a pragmatic introduction
Raphael Stary
 
Why is Python slow? Python Nordeste 2013
Why is Python slow? Python Nordeste 2013Why is Python slow? Python Nordeste 2013
Why is Python slow? Python Nordeste 2013
Daker Fernandes
 
How to Introduce Telemetry Streaming (gNMI) in Your Network with SNMP with Te...
How to Introduce Telemetry Streaming (gNMI) in Your Network with SNMP with Te...How to Introduce Telemetry Streaming (gNMI) in Your Network with SNMP with Te...
How to Introduce Telemetry Streaming (gNMI) in Your Network with SNMP with Te...
InfluxData
 
0.5mln packets per second with Erlang
0.5mln packets per second with Erlang0.5mln packets per second with Erlang
0.5mln packets per second with Erlang
Maxim Kharchenko
 
Performance optimization 101 - Erlang Factory SF 2014
Performance optimization 101 - Erlang Factory SF 2014Performance optimization 101 - Erlang Factory SF 2014
Performance optimization 101 - Erlang Factory SF 2014
lpgauth
 
Circuit Simplifier
Circuit SimplifierCircuit Simplifier
Circuit Simplifier
Vineet Markan
 
Get Lower Latency and Higher Throughput for Java Applications
Get Lower Latency and Higher Throughput for Java ApplicationsGet Lower Latency and Higher Throughput for Java Applications
Get Lower Latency and Higher Throughput for Java Applications
ScyllaDB
 
High-Performance Networking Using eBPF, XDP, and io_uring
High-Performance Networking Using eBPF, XDP, and io_uringHigh-Performance Networking Using eBPF, XDP, and io_uring
High-Performance Networking Using eBPF, XDP, and io_uring
ScyllaDB
 
Running Accurate, Scalable, and Reproducible Simulations of Distributed Syste...
Running Accurate, Scalable, and Reproducible Simulations of Distributed Syste...Running Accurate, Scalable, and Reproducible Simulations of Distributed Syste...
Running Accurate, Scalable, and Reproducible Simulations of Distributed Syste...
Rafael Ferreira da Silva
 
Whoops! I Rewrote It in Rust
Whoops! I Rewrote It in RustWhoops! I Rewrote It in Rust
Whoops! I Rewrote It in Rust
ScyllaDB
 
Reproducible bioinformatics workflows with Nextflow and nf-core
Reproducible bioinformatics workflows with Nextflow and nf-coreReproducible bioinformatics workflows with Nextflow and nf-core
Reproducible bioinformatics workflows with Nextflow and nf-core
Phil Ewels
 
New Process/Thread Runtime
New Process/Thread Runtime	New Process/Thread Runtime
New Process/Thread Runtime
Linaro
 
Understanding Apache Kafka P99 Latency at Scale
Understanding Apache Kafka P99 Latency at ScaleUnderstanding Apache Kafka P99 Latency at Scale
Understanding Apache Kafka P99 Latency at Scale
ScyllaDB
 
Mirko Damiani - An Embedded soft real time distributed system in Go
Mirko Damiani - An Embedded soft real time distributed system in GoMirko Damiani - An Embedded soft real time distributed system in Go
Mirko Damiani - An Embedded soft real time distributed system in Go
linuxlab_conf
 
Data Structures for High Resolution, Real-time Telemetry at Scale
Data Structures for High Resolution, Real-time Telemetry at ScaleData Structures for High Resolution, Real-time Telemetry at Scale
Data Structures for High Resolution, Real-time Telemetry at Scale
ScyllaDB
 
DISTRIBUTED PERFORMANCE ANALYSIS USING INFLUXDB AND THE LINUX EBPF VIRTUAL MA...
DISTRIBUTED PERFORMANCE ANALYSIS USING INFLUXDB AND THE LINUX EBPF VIRTUAL MA...DISTRIBUTED PERFORMANCE ANALYSIS USING INFLUXDB AND THE LINUX EBPF VIRTUAL MA...
DISTRIBUTED PERFORMANCE ANALYSIS USING INFLUXDB AND THE LINUX EBPF VIRTUAL MA...
InfluxData
 
On the Capability and Achievable Performance of FPGAs for HPC Applications
On the Capability and Achievable Performance of FPGAs for HPC ApplicationsOn the Capability and Achievable Performance of FPGAs for HPC Applications
On the Capability and Achievable Performance of FPGAs for HPC Applications
Wim Vanderbauwhede
 
NBIS RNA-seq course
NBIS RNA-seq courseNBIS RNA-seq course
NBIS RNA-seq course
Phil Ewels
 
0.5mln packets per second with Erlang
0.5mln packets per second with Erlang0.5mln packets per second with Erlang
0.5mln packets per second with Erlang
Maxim Kharchenko
 
Netty - a pragmatic introduction
Netty - a pragmatic introductionNetty - a pragmatic introduction
Netty - a pragmatic introduction
Raphael Stary
 
Why is Python slow? Python Nordeste 2013
Why is Python slow? Python Nordeste 2013Why is Python slow? Python Nordeste 2013
Why is Python slow? Python Nordeste 2013
Daker Fernandes
 
How to Introduce Telemetry Streaming (gNMI) in Your Network with SNMP with Te...
How to Introduce Telemetry Streaming (gNMI) in Your Network with SNMP with Te...How to Introduce Telemetry Streaming (gNMI) in Your Network with SNMP with Te...
How to Introduce Telemetry Streaming (gNMI) in Your Network with SNMP with Te...
InfluxData
 
0.5mln packets per second with Erlang
0.5mln packets per second with Erlang0.5mln packets per second with Erlang
0.5mln packets per second with Erlang
Maxim Kharchenko
 
Performance optimization 101 - Erlang Factory SF 2014
Performance optimization 101 - Erlang Factory SF 2014Performance optimization 101 - Erlang Factory SF 2014
Performance optimization 101 - Erlang Factory SF 2014
lpgauth
 
Get Lower Latency and Higher Throughput for Java Applications
Get Lower Latency and Higher Throughput for Java ApplicationsGet Lower Latency and Higher Throughput for Java Applications
Get Lower Latency and Higher Throughput for Java Applications
ScyllaDB
 
High-Performance Networking Using eBPF, XDP, and io_uring
High-Performance Networking Using eBPF, XDP, and io_uringHigh-Performance Networking Using eBPF, XDP, and io_uring
High-Performance Networking Using eBPF, XDP, and io_uring
ScyllaDB
 
Running Accurate, Scalable, and Reproducible Simulations of Distributed Syste...
Running Accurate, Scalable, and Reproducible Simulations of Distributed Syste...Running Accurate, Scalable, and Reproducible Simulations of Distributed Syste...
Running Accurate, Scalable, and Reproducible Simulations of Distributed Syste...
Rafael Ferreira da Silva
 
Whoops! I Rewrote It in Rust
Whoops! I Rewrote It in RustWhoops! I Rewrote It in Rust
Whoops! I Rewrote It in Rust
ScyllaDB
 
Reproducible bioinformatics workflows with Nextflow and nf-core
Reproducible bioinformatics workflows with Nextflow and nf-coreReproducible bioinformatics workflows with Nextflow and nf-core
Reproducible bioinformatics workflows with Nextflow and nf-core
Phil Ewels
 
New Process/Thread Runtime
New Process/Thread Runtime	New Process/Thread Runtime
New Process/Thread Runtime
Linaro
 
Understanding Apache Kafka P99 Latency at Scale
Understanding Apache Kafka P99 Latency at ScaleUnderstanding Apache Kafka P99 Latency at Scale
Understanding Apache Kafka P99 Latency at Scale
ScyllaDB
 
Mirko Damiani - An Embedded soft real time distributed system in Go
Mirko Damiani - An Embedded soft real time distributed system in GoMirko Damiani - An Embedded soft real time distributed system in Go
Mirko Damiani - An Embedded soft real time distributed system in Go
linuxlab_conf
 
Data Structures for High Resolution, Real-time Telemetry at Scale
Data Structures for High Resolution, Real-time Telemetry at ScaleData Structures for High Resolution, Real-time Telemetry at Scale
Data Structures for High Resolution, Real-time Telemetry at Scale
ScyllaDB
 

Similar to D. Fast, Simple User-Space Network Functions with Snabb (RIPE 77) (20)

Practical virtual network functions with Snabb (SDN Barcelona VI)
Practical virtual network functions with Snabb (SDN Barcelona VI)Practical virtual network functions with Snabb (SDN Barcelona VI)
Practical virtual network functions with Snabb (SDN Barcelona VI)
Igalia
 
Snabb, a toolkit for building user-space network functions (ES.NOG 20)
Snabb, a toolkit for building user-space network functions (ES.NOG 20)Snabb, a toolkit for building user-space network functions (ES.NOG 20)
Snabb, a toolkit for building user-space network functions (ES.NOG 20)
Igalia
 
Snabbflow: A Scalable IPFIX exporter
Snabbflow: A Scalable IPFIX exporterSnabbflow: A Scalable IPFIX exporter
Snabbflow: A Scalable IPFIX exporter
Igalia
 
8 Ways Network Engineers use Snabb (RIPE 77)
8 Ways Network Engineers use Snabb (RIPE 77)8 Ways Network Engineers use Snabb (RIPE 77)
8 Ways Network Engineers use Snabb (RIPE 77)
Igalia
 
Production high-performance networking with Snabb and LuaJIT (Linux.conf.au 2...
Production high-performance networking with Snabb and LuaJIT (Linux.conf.au 2...Production high-performance networking with Snabb and LuaJIT (Linux.conf.au 2...
Production high-performance networking with Snabb and LuaJIT (Linux.conf.au 2...
Igalia
 
Practical virtual network functions with Snabb (8th SDN Workshop)
Practical virtual network functions with Snabb (8th SDN Workshop)Practical virtual network functions with Snabb (8th SDN Workshop)
Practical virtual network functions with Snabb (8th SDN Workshop)
Igalia
 
Node-RED and Minecraft - CamJam September 2015
Node-RED and Minecraft - CamJam September 2015Node-RED and Minecraft - CamJam September 2015
Node-RED and Minecraft - CamJam September 2015
Boris Adryan
 
NUSE (Network Stack in Userspace) at #osio
NUSE (Network Stack in Userspace) at #osioNUSE (Network Stack in Userspace) at #osio
NUSE (Network Stack in Userspace) at #osio
Hajime Tazaki
 
Debugging Python with gdb
Debugging Python with gdbDebugging Python with gdb
Debugging Python with gdb
Roman Podoliaka
 
CAPI and OpenCAPI Hardware acceleration enablement
CAPI and OpenCAPI Hardware acceleration enablementCAPI and OpenCAPI Hardware acceleration enablement
CAPI and OpenCAPI Hardware acceleration enablement
Ganesan Narayanasamy
 
Python Streaming Pipelines on Flink - Beam Meetup at Lyft 2019
Python Streaming Pipelines on Flink - Beam Meetup at Lyft 2019Python Streaming Pipelines on Flink - Beam Meetup at Lyft 2019
Python Streaming Pipelines on Flink - Beam Meetup at Lyft 2019
Thomas Weise
 
Multicore
MulticoreMulticore
Multicore
Birgit Plötzeneder
 
[Webinar Slides] Programming the Network Dataplane in P4
[Webinar Slides] Programming the Network Dataplane in P4[Webinar Slides] Programming the Network Dataplane in P4
[Webinar Slides] Programming the Network Dataplane in P4
Open Networking Summits
 
Dpdk applications
Dpdk applicationsDpdk applications
Dpdk applications
Vipin Varghese
 
ApacheCon2022_Deep Dive into Building Streaming Applications with Apache Pulsar
ApacheCon2022_Deep Dive into Building Streaming Applications with Apache PulsarApacheCon2022_Deep Dive into Building Streaming Applications with Apache Pulsar
ApacheCon2022_Deep Dive into Building Streaming Applications with Apache Pulsar
Timothy Spann
 
BUD17-300: Journey of a packet
BUD17-300: Journey of a packetBUD17-300: Journey of a packet
BUD17-300: Journey of a packet
Linaro
 
LibOS as a regression test framework for Linux networking #netdev1.1
LibOS as a regression test framework for Linux networking #netdev1.1LibOS as a regression test framework for Linux networking #netdev1.1
LibOS as a regression test framework for Linux networking #netdev1.1
Hajime Tazaki
 
Varnish http accelerator
Varnish http acceleratorVarnish http accelerator
Varnish http accelerator
no no
 
GoSF Jan 2016 - Go Write a Plugin for Snap!
GoSF Jan 2016 - Go Write a Plugin for Snap!GoSF Jan 2016 - Go Write a Plugin for Snap!
GoSF Jan 2016 - Go Write a Plugin for Snap!
Matthew Broberg
 
FD.io - The Universal Dataplane
FD.io - The Universal DataplaneFD.io - The Universal Dataplane
FD.io - The Universal Dataplane
Open Networking Summit
 
Practical virtual network functions with Snabb (SDN Barcelona VI)
Practical virtual network functions with Snabb (SDN Barcelona VI)Practical virtual network functions with Snabb (SDN Barcelona VI)
Practical virtual network functions with Snabb (SDN Barcelona VI)
Igalia
 
Snabb, a toolkit for building user-space network functions (ES.NOG 20)
Snabb, a toolkit for building user-space network functions (ES.NOG 20)Snabb, a toolkit for building user-space network functions (ES.NOG 20)
Snabb, a toolkit for building user-space network functions (ES.NOG 20)
Igalia
 
Snabbflow: A Scalable IPFIX exporter
Snabbflow: A Scalable IPFIX exporterSnabbflow: A Scalable IPFIX exporter
Snabbflow: A Scalable IPFIX exporter
Igalia
 
8 Ways Network Engineers use Snabb (RIPE 77)
8 Ways Network Engineers use Snabb (RIPE 77)8 Ways Network Engineers use Snabb (RIPE 77)
8 Ways Network Engineers use Snabb (RIPE 77)
Igalia
 
Production high-performance networking with Snabb and LuaJIT (Linux.conf.au 2...
Production high-performance networking with Snabb and LuaJIT (Linux.conf.au 2...Production high-performance networking with Snabb and LuaJIT (Linux.conf.au 2...
Production high-performance networking with Snabb and LuaJIT (Linux.conf.au 2...
Igalia
 
Practical virtual network functions with Snabb (8th SDN Workshop)
Practical virtual network functions with Snabb (8th SDN Workshop)Practical virtual network functions with Snabb (8th SDN Workshop)
Practical virtual network functions with Snabb (8th SDN Workshop)
Igalia
 
Node-RED and Minecraft - CamJam September 2015
Node-RED and Minecraft - CamJam September 2015Node-RED and Minecraft - CamJam September 2015
Node-RED and Minecraft - CamJam September 2015
Boris Adryan
 
NUSE (Network Stack in Userspace) at #osio
NUSE (Network Stack in Userspace) at #osioNUSE (Network Stack in Userspace) at #osio
NUSE (Network Stack in Userspace) at #osio
Hajime Tazaki
 
Debugging Python with gdb
Debugging Python with gdbDebugging Python with gdb
Debugging Python with gdb
Roman Podoliaka
 
CAPI and OpenCAPI Hardware acceleration enablement
CAPI and OpenCAPI Hardware acceleration enablementCAPI and OpenCAPI Hardware acceleration enablement
CAPI and OpenCAPI Hardware acceleration enablement
Ganesan Narayanasamy
 
Python Streaming Pipelines on Flink - Beam Meetup at Lyft 2019
Python Streaming Pipelines on Flink - Beam Meetup at Lyft 2019Python Streaming Pipelines on Flink - Beam Meetup at Lyft 2019
Python Streaming Pipelines on Flink - Beam Meetup at Lyft 2019
Thomas Weise
 
[Webinar Slides] Programming the Network Dataplane in P4
[Webinar Slides] Programming the Network Dataplane in P4[Webinar Slides] Programming the Network Dataplane in P4
[Webinar Slides] Programming the Network Dataplane in P4
Open Networking Summits
 
ApacheCon2022_Deep Dive into Building Streaming Applications with Apache Pulsar
ApacheCon2022_Deep Dive into Building Streaming Applications with Apache PulsarApacheCon2022_Deep Dive into Building Streaming Applications with Apache Pulsar
ApacheCon2022_Deep Dive into Building Streaming Applications with Apache Pulsar
Timothy Spann
 
BUD17-300: Journey of a packet
BUD17-300: Journey of a packetBUD17-300: Journey of a packet
BUD17-300: Journey of a packet
Linaro
 
LibOS as a regression test framework for Linux networking #netdev1.1
LibOS as a regression test framework for Linux networking #netdev1.1LibOS as a regression test framework for Linux networking #netdev1.1
LibOS as a regression test framework for Linux networking #netdev1.1
Hajime Tazaki
 
Varnish http accelerator
Varnish http acceleratorVarnish http accelerator
Varnish http accelerator
no no
 
GoSF Jan 2016 - Go Write a Plugin for Snap!
GoSF Jan 2016 - Go Write a Plugin for Snap!GoSF Jan 2016 - Go Write a Plugin for Snap!
GoSF Jan 2016 - Go Write a Plugin for Snap!
Matthew Broberg
 
Ad

More from Igalia (20)

Don't let your motivation go, save time with kworkflow
Don't let your motivation go, save time with kworkflowDon't let your motivation go, save time with kworkflow
Don't let your motivation go, save time with kworkflow
Igalia
 
Solving the world’s (localization) problems
Solving the world’s (localization) problemsSolving the world’s (localization) problems
Solving the world’s (localization) problems
Igalia
 
The Whippet Embeddable Garbage Collection Library
The Whippet Embeddable Garbage Collection LibraryThe Whippet Embeddable Garbage Collection Library
The Whippet Embeddable Garbage Collection Library
Igalia
 
Nobody asks "How is JavaScript?"
Nobody asks         "How is JavaScript?"Nobody asks         "How is JavaScript?"
Nobody asks "How is JavaScript?"
Igalia
 
Getting more juice out from your Raspberry Pi GPU
Getting more juice out from your Raspberry Pi GPUGetting more juice out from your Raspberry Pi GPU
Getting more juice out from your Raspberry Pi GPU
Igalia
 
WebRTC support in WebKitGTK and WPEWebKit with GStreamer: Status update
WebRTC support in WebKitGTK and WPEWebKit with GStreamer: Status updateWebRTC support in WebKitGTK and WPEWebKit with GStreamer: Status update
WebRTC support in WebKitGTK and WPEWebKit with GStreamer: Status update
Igalia
 
Demystifying Temporal: A Deep Dive into JavaScript New Temporal API
Demystifying Temporal: A Deep Dive into JavaScript New Temporal APIDemystifying Temporal: A Deep Dive into JavaScript New Temporal API
Demystifying Temporal: A Deep Dive into JavaScript New Temporal API
Igalia
 
CSS :has() Unlimited Power
CSS :has()               Unlimited PowerCSS :has()               Unlimited Power
CSS :has() Unlimited Power
Igalia
 
Device-Generated Commands in Vulkan
Device-Generated Commands      in VulkanDevice-Generated Commands      in Vulkan
Device-Generated Commands in Vulkan
Igalia
 
Current state of Lavapipe: Mesa's software renderer for Vulkan
Current state of Lavapipe: Mesa's software renderer for VulkanCurrent state of Lavapipe: Mesa's software renderer for Vulkan
Current state of Lavapipe: Mesa's software renderer for Vulkan
Igalia
 
Vulkan Video is Open: Application showcase
Vulkan Video is Open: Application showcaseVulkan Video is Open: Application showcase
Vulkan Video is Open: Application showcase
Igalia
 
Scheme on WebAssembly: It is happening!
Scheme on WebAssembly:  It is happening!Scheme on WebAssembly:  It is happening!
Scheme on WebAssembly: It is happening!
Igalia
 
EBC - A new backend compiler for etnaviv
EBC - A new backend compiler for etnavivEBC - A new backend compiler for etnaviv
EBC - A new backend compiler for etnaviv
Igalia
 
RISC-V LLVM State of the Union
RISC-V LLVM           State of the UnionRISC-V LLVM           State of the Union
RISC-V LLVM State of the Union
Igalia
 
Device-Generated Commands in Vulkan
Device-Generated Commands      in VulkanDevice-Generated Commands      in Vulkan
Device-Generated Commands in Vulkan
Igalia
 
Downstream challenges
Downstream                    challengesDownstream                    challenges
Downstream challenges
Igalia
 
Using Chrome for Building Apps
Using Chrome           for Building AppsUsing Chrome           for Building Apps
Using Chrome for Building Apps
Igalia
 
Sustainable Futures - Funding the Web Ecosystem v2 - fonts.pdf
Sustainable Futures - Funding the Web Ecosystem v2 - fonts.pdfSustainable Futures - Funding the Web Ecosystem v2 - fonts.pdf
Sustainable Futures - Funding the Web Ecosystem v2 - fonts.pdf
Igalia
 
New and upcoming features in the Node.js module loaders
New and upcoming features in the Node.js module loadersNew and upcoming features in the Node.js module loaders
New and upcoming features in the Node.js module loaders
Igalia
 
WebDriver BiDi in WebKit
WebDriver BiDi in WebKitWebDriver BiDi in WebKit
WebDriver BiDi in WebKit
Igalia
 
Don't let your motivation go, save time with kworkflow
Don't let your motivation go, save time with kworkflowDon't let your motivation go, save time with kworkflow
Don't let your motivation go, save time with kworkflow
Igalia
 
Solving the world’s (localization) problems
Solving the world’s (localization) problemsSolving the world’s (localization) problems
Solving the world’s (localization) problems
Igalia
 
The Whippet Embeddable Garbage Collection Library
The Whippet Embeddable Garbage Collection LibraryThe Whippet Embeddable Garbage Collection Library
The Whippet Embeddable Garbage Collection Library
Igalia
 
Nobody asks "How is JavaScript?"
Nobody asks         "How is JavaScript?"Nobody asks         "How is JavaScript?"
Nobody asks "How is JavaScript?"
Igalia
 
Getting more juice out from your Raspberry Pi GPU
Getting more juice out from your Raspberry Pi GPUGetting more juice out from your Raspberry Pi GPU
Getting more juice out from your Raspberry Pi GPU
Igalia
 
WebRTC support in WebKitGTK and WPEWebKit with GStreamer: Status update
WebRTC support in WebKitGTK and WPEWebKit with GStreamer: Status updateWebRTC support in WebKitGTK and WPEWebKit with GStreamer: Status update
WebRTC support in WebKitGTK and WPEWebKit with GStreamer: Status update
Igalia
 
Demystifying Temporal: A Deep Dive into JavaScript New Temporal API
Demystifying Temporal: A Deep Dive into JavaScript New Temporal APIDemystifying Temporal: A Deep Dive into JavaScript New Temporal API
Demystifying Temporal: A Deep Dive into JavaScript New Temporal API
Igalia
 
CSS :has() Unlimited Power
CSS :has()               Unlimited PowerCSS :has()               Unlimited Power
CSS :has() Unlimited Power
Igalia
 
Device-Generated Commands in Vulkan
Device-Generated Commands      in VulkanDevice-Generated Commands      in Vulkan
Device-Generated Commands in Vulkan
Igalia
 
Current state of Lavapipe: Mesa's software renderer for Vulkan
Current state of Lavapipe: Mesa's software renderer for VulkanCurrent state of Lavapipe: Mesa's software renderer for Vulkan
Current state of Lavapipe: Mesa's software renderer for Vulkan
Igalia
 
Vulkan Video is Open: Application showcase
Vulkan Video is Open: Application showcaseVulkan Video is Open: Application showcase
Vulkan Video is Open: Application showcase
Igalia
 
Scheme on WebAssembly: It is happening!
Scheme on WebAssembly:  It is happening!Scheme on WebAssembly:  It is happening!
Scheme on WebAssembly: It is happening!
Igalia
 
EBC - A new backend compiler for etnaviv
EBC - A new backend compiler for etnavivEBC - A new backend compiler for etnaviv
EBC - A new backend compiler for etnaviv
Igalia
 
RISC-V LLVM State of the Union
RISC-V LLVM           State of the UnionRISC-V LLVM           State of the Union
RISC-V LLVM State of the Union
Igalia
 
Device-Generated Commands in Vulkan
Device-Generated Commands      in VulkanDevice-Generated Commands      in Vulkan
Device-Generated Commands in Vulkan
Igalia
 
Downstream challenges
Downstream                    challengesDownstream                    challenges
Downstream challenges
Igalia
 
Using Chrome for Building Apps
Using Chrome           for Building AppsUsing Chrome           for Building Apps
Using Chrome for Building Apps
Igalia
 
Sustainable Futures - Funding the Web Ecosystem v2 - fonts.pdf
Sustainable Futures - Funding the Web Ecosystem v2 - fonts.pdfSustainable Futures - Funding the Web Ecosystem v2 - fonts.pdf
Sustainable Futures - Funding the Web Ecosystem v2 - fonts.pdf
Igalia
 
New and upcoming features in the Node.js module loaders
New and upcoming features in the Node.js module loadersNew and upcoming features in the Node.js module loaders
New and upcoming features in the Node.js module loaders
Igalia
 
WebDriver BiDi in WebKit
WebDriver BiDi in WebKitWebDriver BiDi in WebKit
WebDriver BiDi in WebKit
Igalia
 
Ad

Recently uploaded (20)

Procurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptxProcurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptx
Jon Hansen
 
#AdminHour presents: Hour of Code2018 slide deck from 12/6/2018
#AdminHour presents: Hour of Code2018 slide deck from 12/6/2018#AdminHour presents: Hour of Code2018 slide deck from 12/6/2018
#AdminHour presents: Hour of Code2018 slide deck from 12/6/2018
Lynda Kane
 
Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025
Splunk
 
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In FranceManifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
chb3
 
Buckeye Dreamin 2024: Assessing and Resolving Technical Debt
Buckeye Dreamin 2024: Assessing and Resolving Technical DebtBuckeye Dreamin 2024: Assessing and Resolving Technical Debt
Buckeye Dreamin 2024: Assessing and Resolving Technical Debt
Lynda Kane
 
Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)
Ortus Solutions, Corp
 
Image processinglab image processing image processing
Image processinglab image processing  image processingImage processinglab image processing  image processing
Image processinglab image processing image processing
RaghadHany
 
Hands On: Create a Lightning Aura Component with force:RecordData
Hands On: Create a Lightning Aura Component with force:RecordDataHands On: Create a Lightning Aura Component with force:RecordData
Hands On: Create a Lightning Aura Component with force:RecordData
Lynda Kane
 
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
Alan Dix
 
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdfSAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
Precisely
 
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc
 
Asthma presentación en inglés abril 2025 pdf
Asthma presentación en inglés abril 2025 pdfAsthma presentación en inglés abril 2025 pdf
Asthma presentación en inglés abril 2025 pdf
VanessaRaudez
 
Datastucture-Unit 4-Linked List Presentation.pptx
Datastucture-Unit 4-Linked List Presentation.pptxDatastucture-Unit 4-Linked List Presentation.pptx
Datastucture-Unit 4-Linked List Presentation.pptx
kaleeswaric3
 
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes
 
Buckeye Dreamin' 2023: De-fogging Debug Logs
Buckeye Dreamin' 2023: De-fogging Debug LogsBuckeye Dreamin' 2023: De-fogging Debug Logs
Buckeye Dreamin' 2023: De-fogging Debug Logs
Lynda Kane
 
Rock, Paper, Scissors: An Apex Map Learning Journey
Rock, Paper, Scissors: An Apex Map Learning JourneyRock, Paper, Scissors: An Apex Map Learning Journey
Rock, Paper, Scissors: An Apex Map Learning Journey
Lynda Kane
 
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdfThe Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
Abi john
 
Leading AI Innovation As A Product Manager - Michael Jidael
Leading AI Innovation As A Product Manager - Michael JidaelLeading AI Innovation As A Product Manager - Michael Jidael
Leading AI Innovation As A Product Manager - Michael Jidael
Michael Jidael
 
What is Model Context Protocol(MCP) - The new technology for communication bw...
What is Model Context Protocol(MCP) - The new technology for communication bw...What is Model Context Protocol(MCP) - The new technology for communication bw...
What is Model Context Protocol(MCP) - The new technology for communication bw...
Vishnu Singh Chundawat
 
Automation Hour 1/28/2022: Capture User Feedback from Anywhere
Automation Hour 1/28/2022: Capture User Feedback from AnywhereAutomation Hour 1/28/2022: Capture User Feedback from Anywhere
Automation Hour 1/28/2022: Capture User Feedback from Anywhere
Lynda Kane
 
Procurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptxProcurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptx
Jon Hansen
 
#AdminHour presents: Hour of Code2018 slide deck from 12/6/2018
#AdminHour presents: Hour of Code2018 slide deck from 12/6/2018#AdminHour presents: Hour of Code2018 slide deck from 12/6/2018
#AdminHour presents: Hour of Code2018 slide deck from 12/6/2018
Lynda Kane
 
Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025
Splunk
 
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In FranceManifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
chb3
 
Buckeye Dreamin 2024: Assessing and Resolving Technical Debt
Buckeye Dreamin 2024: Assessing and Resolving Technical DebtBuckeye Dreamin 2024: Assessing and Resolving Technical Debt
Buckeye Dreamin 2024: Assessing and Resolving Technical Debt
Lynda Kane
 
Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)
Ortus Solutions, Corp
 
Image processinglab image processing image processing
Image processinglab image processing  image processingImage processinglab image processing  image processing
Image processinglab image processing image processing
RaghadHany
 
Hands On: Create a Lightning Aura Component with force:RecordData
Hands On: Create a Lightning Aura Component with force:RecordDataHands On: Create a Lightning Aura Component with force:RecordData
Hands On: Create a Lightning Aura Component with force:RecordData
Lynda Kane
 
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
Alan Dix
 
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdfSAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
Precisely
 
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc
 
Asthma presentación en inglés abril 2025 pdf
Asthma presentación en inglés abril 2025 pdfAsthma presentación en inglés abril 2025 pdf
Asthma presentación en inglés abril 2025 pdf
VanessaRaudez
 
Datastucture-Unit 4-Linked List Presentation.pptx
Datastucture-Unit 4-Linked List Presentation.pptxDatastucture-Unit 4-Linked List Presentation.pptx
Datastucture-Unit 4-Linked List Presentation.pptx
kaleeswaric3
 
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes
 
Buckeye Dreamin' 2023: De-fogging Debug Logs
Buckeye Dreamin' 2023: De-fogging Debug LogsBuckeye Dreamin' 2023: De-fogging Debug Logs
Buckeye Dreamin' 2023: De-fogging Debug Logs
Lynda Kane
 
Rock, Paper, Scissors: An Apex Map Learning Journey
Rock, Paper, Scissors: An Apex Map Learning JourneyRock, Paper, Scissors: An Apex Map Learning Journey
Rock, Paper, Scissors: An Apex Map Learning Journey
Lynda Kane
 
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdfThe Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
Abi john
 
Leading AI Innovation As A Product Manager - Michael Jidael
Leading AI Innovation As A Product Manager - Michael JidaelLeading AI Innovation As A Product Manager - Michael Jidael
Leading AI Innovation As A Product Manager - Michael Jidael
Michael Jidael
 
What is Model Context Protocol(MCP) - The new technology for communication bw...
What is Model Context Protocol(MCP) - The new technology for communication bw...What is Model Context Protocol(MCP) - The new technology for communication bw...
What is Model Context Protocol(MCP) - The new technology for communication bw...
Vishnu Singh Chundawat
 
Automation Hour 1/28/2022: Capture User Feedback from Anywhere
Automation Hour 1/28/2022: Capture User Feedback from AnywhereAutomation Hour 1/28/2022: Capture User Feedback from Anywhere
Automation Hour 1/28/2022: Capture User Feedback from Anywhere
Lynda Kane
 

D. Fast, Simple User-Space Network Functions with Snabb (RIPE 77)

  • 1. Snabb: Open Source Meets Dataplane RIPE77, October 2018, Amsterdam Andy Wingo | [email protected] | @andywingo
  • 2. this talk Why? The problem solved by Snabb How? Snabb from the ground up What? What’s in the box Who? Snabb in the wild
  • 3. why? Ever want to deploy a new RFC, but no vendor is selling it? Maybe it’s not even an RFC yet? 10 years ago – too bad Now – open source software + commodity servers
  • 4. software? User-space data planes Avoid the kernel, handle all data in user-space Snabb, DPDK, VPP (fd.io)
  • 5. user space Tell Linux to forget about NIC Mmap NIC’s PCI registers into address space Read and write memory == read and write PCI registers ❧ Poke registers as needed to bring up NIC Set up a ring buffer for RX/TX Busy-loop to take packets from RX, process, send to TX
  • 6. advantage You get the whole packet No hazard for straying off device- supported hot-path Program using whatever technology you want: C, Rust, Lua, Scheme, ... “It’s just programming” Hire anyone you want to modify the programs
  • 7. limits Limited by PCI bandwidth Limited to ~10-50Gbps/CPU core (parallelization possible) Tangential to containerization / kubernetes / openstack hellscape
  • 8. an aside on snabb Goal: “rewritable software” The hard part: searching program- space for elegant hacks “Is that all? I could rewrite that in a weekend.”
  • 9. in a nutshell A snabb program consists of a graph of apps Apps are connected by directional links A snabb program processes packets in units of breaths
  • 11. local Intel82599 = require("apps.intel.intel_app").Intel82599 local PcapFilter = require("apps.packet_filter.pcap_filter").PcapFilter local c = config.new() config.app(c, "nic", Intel82599, {pciaddr="82:00.0"}) config.app(c, "filter", PcapFilter, {filter="tcp port 80"}) config.link(c, "nic.tx -> filter.input") config.link(c, "filter.output -> nic.rx") engine.configure(c) while true do engine.breathe() end
  • 12. snabb is written in lua Short and sweet programs LuaJIT does the heavy lifting High-performance just-in-time compilation, applied to networking domain Lua all the way down – packet processing, not just configuration
  • 13. breaths Each breath has two phases: Inhale a batch of packets into the network ❧ Process those packets❧ To inhale, run pull functions on apps that have them To process, run push functions on apps that have them
  • 14. # Pull function for built-in Intel82599 app function Intel82599:pull () for i = 1, engine.pull_npackets do if not self.dev:can_receive() then break end local pkt = self.dev:receive() link.transmit(self.output.tx, pkt) end end
  • 15. # Push function for built-in PcapFilter app function PcapFilter:push () while not link.empty(self.input.rx) do local p = link.receive(self.input.rx) if self.accept_fn(p.data, p.length) then link.transmit(self.output.tx, p) else packet.free(p) end end end
  • 16. packets and links struct packet { uint16_t length; unsigned char data[10*1024]; }; struct link { struct packet *packets[1024]; // the next element to be read int read; // the next element to be written int write; }; // (Some statistics counters elided)
  • 17. voilà At this point, you can rewrite Snabb (Please do!) But you might want to use it as-is...
  • 18. unboxing $ git clone https://github.com/snabbco/snabb $ cd snabb $ make $ ./src/snabb What’s in there? How are people using it?
  • 19. apps I/O: Intel i210/i350/82599, Mellanox ConnectX4/5, TAP, AF_PACKET, AF_XDP, vhost/virtio, pcap... L2: ARP, NDP, learning bridge, l2vpn... L3: IPsec, ICMP, fragmentation... +: IPFIX, lwAFTR, DPI, firewall, pflang... Apps: learning bridge, NIC
  • 20. yang App graph as function of YANG- modelled configuration Run-time config/state query, reconfigure Multi-process Statistics aggregation https://snabbco.github.io/#ptree
  • 21. libraries LPM, JSON, fast raw hash tables, protocol stack, timer wheel, profiling, packet match domain-specific language compilers, NUMA/CPU binding, RRD files... https://snabbco.github.io/
  • 22. no full router yet Some support for receiving routes from Linux We would love to flesh this out!
  • 23. snabb in the wild See lightning talk “8 ways network engineers use Snabb” for more examples
  • 24. exploratory analysis Flexibility, expressiveness, and rapid development of scapy, the speed to run live A large CDN uses Snabb in this way internally
  • 25. layer 2 vpn # github.com/alexandergall/snabb # l2vpn branch $ snabb l2vpn l2vpn.conf RFC 4664 layer 2 learning bridge over IPv6 Built by SWITCH network engineer Alexander Gall because what he needed wasn’t on offer In production linking academic sites in Switzerland
  • 26. ipsec vpn Vita: https://github.com/inters/ vita Secure VPN between sites, IPSec, 1-10 Gbps/core Funded by NLnet Foundation
  • 27. border router tunnel endpoint $ snabb lwaftr run lwaftr.conf Lightweight 4-over-6 AFTR: processes all IPv4 traffic for a network YANG-enabled, runtime reconfigurable Multi-process: one instance can manage many NICs in a machine See K. Zorbadelos (OTE) at RIPE76: https://ripe76.ripe.net/archives/ video/30/