Takeaways of Implementing a Native Rust UDP Tunneling Network Driver in the Linux Kernel
Résumé
C is the primary programming language used in the Linux kernel. Recently, the Linux developer community oversaw the experimental addition of Rust into the kernel's build system. Networking is one of the areas often mentioned when discussing the adoption of Rust. In networking, both perfect memory management and performance are critical. In this paper, we present a Rust UDP tunneling driver for Linux, which provides UDP encapsulation between two peers. We use this driver to discuss design considerations of writing Rust networking code for Linux. We then compare the performance of our driver against a similar driver written in C. We find that our Rust driver performs slightly worse on a gigabit link for both latency (+0.1906%, p-value = 1.464e−15) and throughput (−0.00090%, p-value = 6.004e−5). We then discuss potential causes for that loss.
Domaines
Système d'exploitation [cs.OS]Origine | Fichiers produits par l'(les) auteur(s) |
---|