Monday, January 1

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.


Filed under: cons, Network Hacks

No comments:

Post a Comment