34C3: Roll Your Own Network Driver In Four Simple Steps

Writing your own drivers is a special discipline. Drivers on the one hand work closely with external hardware and at the same time are deeply ingrained into the operating system. That’s two kinds of specialization in one problem. In recent years a lot of dedicated networking hardware is being replaced by software. [Paul Emmerich] is a researcher who works on improving the performance of these systems.

Making software act like network hardware requires drivers that can swiftly handle a lot of small packets, something that the standard APIs where not designed for. In his talk at this year’s Chaos Commnication Congress [Paul] dissects the different approaches to writing this special flavor of drivers and explains the shortcomings of each.

[Paul] introduces us to the Intel ixgbe family of NICs which lend themselves to this kind of work because they’re common, well documented and feature an approachable firmware. The second half of the talk goes into the specifics of writing a user space driver for these cards. Emphasis is put on how to correctly allocate memory for DMA and what happens to your file system if you make a mistake here.

Another good project to get a taste of writing drivers is the one for this old flip dot display. For those who prefer to tinker with their own Ethernet hardware, adding it to an ESP32 is the way to go.

7 thoughts on “34C3: Roll Your Own Network Driver In Four Simple Steps

      1. @feuerrot:

        Thanks for the link (missing from the HaD post in addition to the broken HaD embedded YouTube link). The link you provided has lots of download options for offline viewing (so you don’t have to go through the trouble of scraping the YouTube video).

        I haven’t watched the full video yet (will do so Thursday on an airplane trip to Singapore). But from my preview, I wonder what’s the meaning of the animated Japanese Maneki-Neko (Fortune-Cat) toy on the podium? Is it relevant to the presentation?

        1. A few years ago the VOC – one of the *OCs at congress, the Video Operation Center – had some problems with broken software (iirc dvswitch) where they couldn’t be sure if there is nothing happening on the stage right now or if the software just copied the same frame again and again.
          Their solution: Winkekatze, which also became the VOC mascot.

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.