The case for writing network drivers in high-level programming languages

Paul Emmerich, Sebastian Voit, Georg Carle, Simon Ellmann, Fabian Bonk, Alex Egger, Esau Garcia Sanchez-Torija, Thomas Gunzel, Sebastian Di Luzio, Alexandru Obada, Maximilian Stadlmeier

Research output: Chapter in Book/Report/Conference proceedingConference contributionpeer-review

12 Scopus citations

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 packet but is only 4 % slower than a reference C implementation. Go's garbage collector keeps latencies below 100 μs even under heavy load. Other languages fare worse, but their unique properties make for an interesting case study. All implementations are available as free and open source at https://githud.com/ixy-languages/ixy-languages.

Original languageEnglish
Title of host publication2019 ACM/IEEE Symposium on Architectures for Networking and Communications Systems, ANCS 2019
PublisherInstitute of Electrical and Electronics Engineers Inc.
ISBN (Electronic)9781728143873
DOIs
StatePublished - Sep 2019
Event2019 ACM/IEEE Symposium on Architectures for Networking and Communications Systems, ANCS 2019 - Cambridge, United Kingdom
Duration: 24 Sep 201925 Sep 2019

Publication series

Name2019 ACM/IEEE Symposium on Architectures for Networking and Communications Systems, ANCS 2019

Conference

Conference2019 ACM/IEEE Symposium on Architectures for Networking and Communications Systems, ANCS 2019
Country/TerritoryUnited Kingdom
CityCambridge
Period24/09/1925/09/19

Keywords

  • C#
  • Go
  • Haskell
  • Java
  • JavaScript
  • OCaml
  • Python
  • Rust
  • Swift

Fingerprint

Dive into the research topics of 'The case for writing network drivers in high-level programming languages'. Together they form a unique fingerprint.

Cite this