The Case for Writing Network Drivers in High-Level Programming Languages
Paul Emmerich, Simon Ellmann, Fabian Bonk, Alex Egger, Esa\'u Garc\'ia, S\'anchez-Torija, Thomas G\"unzel, Sebastian Di Luzio, Alexandru Obada,, Maximilian Stadlmeier, Sebastian Voit, Georg Carle

TL;DR
This paper explores implementing network drivers in high-level languages like Rust, Go, and others, demonstrating safety benefits and analyzing performance trade-offs compared to traditional C drivers.
Contribution
It presents the first set of user space network drivers in multiple high-level languages and evaluates their safety and performance characteristics.
Findings
High-level language drivers are safer with fewer bugs.
Rust driver is only 4% slower than C despite more instructions.
Go's garbage collection maintains low latency under load.
Abstract
Drivers are written in C or restricted subsets of C++ on all production-grade server, desktop, and mobile operating systems. They account for 66% of the code in Linux, but 39 out of 40 security bugs related to memory safety found in Linux in 2017 are located in drivers. These bugs could have been prevented by using high-level languages for drivers. We present user space drivers for the Intel ixgbe 10 Gbit/s network cards implemented in Rust, Go, C#, Java, OCaml, Haskell, Swift, JavaScript, and Python written from scratch in idiomatic style for the respective languages. We quantify costs and benefits of using these languages: High-level languages are safer (fewer bugs, more safety checks), but run-time safety checks reduce throughput and garbage collection leads to latency spikes. Out-of-order CPUs mitigate the cost of safety checks: Our Rust driver executes 63% more instructions per…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Code & Models
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
