Snabb Switch has built-in kernel-bypass networking support. The switch is engineered as firmware and that means regarding hardware specifications on equal footing with software APIs when designing subsystems. My personal conclusion for this project is that hardware network interfaces from Intel compare favourably with software interfaces from third-party API developers. So I have written the code to talk directly to the hardware.
Here are the most notable features of the design:
- It’s special-purpose: exactly the features that benefit the application.
- It’s written 100% from scratch, including the base ethernet device driver.
- It’s small: about 1 KLOC of source code; about 20KB of object code.
- It’s fast: tens of millions of packets per second.
- It supports Intel hardware: great quality in all shapes and sizes.
- It runs on any modern Linux kernel. No kernel module or device driver needed.
- It’s portable to other platforms: Give it access to hardware (physical RAM, raw PCI) and it takes care of everything else.
- It’s independent. No forks to maintain, no upstreams to feed, no license fees to pay.
This design suits Snabb Switch very well. In the future I foresee support for more Intel NICs, more advanced NIC features, more operating systems, and more hardware families. This will be a fun challenge over the months and years ahead.