BSDCan2010 - Final Release

BSDCan 2010
The Technical BSD Conference

Luigi Rizzo
Day Talks - 2 - 2010-05-14
Room DMS 1140
Start time 10:00
Duration 01:00
ID 200
Event type Lecture
Track Hacking
Language used for presentation English

Porting dummynet to Linux and Windows

(and to userland)

Porting userland code to different platforms is a common practice. Porting kernel code is much less common for many reasons, including the absence of common APIs, a fact which often prevents code reuse and suggest complete rewrites. There are however areas (including pieces of the network stack) where such differences are less important and porting becomes attractive. Furthermore, writing code with portability in mind also helps running kernel code in user-space, which is a huge help in testing and performance analysis. In this talk we will discuss our experience in porting the ipfw and dummynet subsystems to Linux and Windows. We will describe how we dealt with the OS-specific features in the subsystems we used: packet representation, locking, timers and other OS services, compilers and build environments. The experience helped us a lot in the development of the new (ipfw3) version of these two subsystems, which runs almost the same code on all three platforms.