A Simpler and Faster NIC Driver Model for Network Functions

The advent of software network functions calls for stronger correctness guarantees and higher performance at every level of the stack. Current network stacks trade simplicity for performance and flexibility, especially in their driver model. We show that performance and simplicity can coexist, at the cost of some flexibility, with a new NIC driver model tailored to network functions. The key idea behind our model is that the driver can efficiently reuse packet buffers because buffers follow a single logical path. We implement a driver for the Intel 82599 network card in 550 lines of code. By merely replacing the state-of-theart driver with our driver, formal verification of the entire software stack completes in 7x less time, while the verified functions’ throughput improves by 160%. Our driver also beats, on realistic workloads, the throughput of drivers that cannot yet be formally verified, thanks to its low variability and resource use. Our code is available at github.com/dslab-epfl/tinynf.

[1]  Jóakim von Kistowski,et al.  SPEC CPU2017: Next-Generation Compute Benchmark , 2018, ICPE Companion.

[2]  Adrian Schüpbach,et al.  The multikernel: a new OS architecture for scalable multicore systems , 2009, SOSP '09.

[3]  Thomas E. Anderson,et al.  TAS: TCP Acceleration as an OS Service , 2019, EuroSys.

[4]  Dawson R. Engler,et al.  KLEE: Unassisted and Automatic Generation of High-Coverage Tests for Complex Systems Programs , 2008, OSDI.

[5]  George Candea,et al.  A Formally Verified NAT Stack , 2018, KBNets@SIGCOMM.

[6]  Katerina J. Argyraki,et al.  Performance Contracts for Software Network Functions , 2019, NSDI.

[7]  Timothy Roscoe,et al.  Arrakis , 2014, OSDI.

[8]  Katerina J. Argyraki,et al.  How to Measure the Killer Microsecond , 2017, CCRV.

[9]  Jack J. Dongarra,et al.  Collecting Performance Data with PAPI-C , 2009, Parallel Tools Workshop.

[10]  Christoforos E. Kozyrakis,et al.  Corrigendum to “The IX Operating System: Combining Low Latency, High Throughput and Efficiency in a Protected Dataplane” , 2017, ACM Trans. Comput. Syst..

[11]  A. Turing On Computable Numbers, with an Application to the Entscheidungsproblem. , 1937 .

[12]  Paul Emmerich,et al.  User Space Network Drivers , 2018, 2019 ACM/IEEE Symposium on Architectures for Networking and Communications Systems (ANCS).

[13]  Vyas Sekar,et al.  Achieving 100Gbps Intrusion Prevention on a Single Server , 2020, OSDI.

[14]  Frank Piessens,et al.  VeriFast: A Powerful, Sound, Predictable, Fast Verifier for C and Java , 2011, NASA Formal Methods.

[15]  Peng Wang,et al.  TiML: a functional language for practical complexity analysis with invariants , 2017, Proc. ACM Program. Lang..

[16]  Asim Kadav,et al.  SymDrive: Testing Drivers without Devices , 2012, OSDI.

[17]  Sylvia Ratnasamy,et al.  SoftNIC: A Software NIC to Augment Hardware , 2015 .

[18]  Daniel Raumer,et al.  MoonGen: A Scriptable High-Speed Packet Generator , 2014, Internet Measurement Conference.

[19]  George Candea,et al.  Verifying software network functions with no verification expertise , 2019, SOSP.

[20]  Carlo Contavalli,et al.  Maglev: A Fast and Reliable Software Network Load Balancer , 2016, NSDI.

[21]  Luigi Rizzo,et al.  netmap: A Novel Framework for Fast Packet I/O , 2012, USENIX ATC.

[22]  Roberto Bifulco,et al.  ClickOS and the Art of Network Function Virtualization , 2014, NSDI.

[23]  Andrew W. Moore,et al.  Understanding PCIe performance for end host networking , 2018, SIGCOMM.