Subject: Including NDIS in NetBSD
To: None <>
From: Alan Ritter <>
List: tech-kern
Date: 12/28/2005 17:12:40
Hash: SHA1
Hello all,

I ported the FreeBSD NDIS code to NetBSD as part of Google's Summer of
Code (
<>), and now I'm wondering if
it should be included in NetBSD.  Including NDIS in the NetBSD current
source code would attract more testers/contributors, and would provide
support for many network cards currently unsupported by NetBSD.

I am currently in the process of filling out a NetBSD membership
application (Dr. Nelson, my mentor and also one of my professors,
offered to sponsor me) and I would be interested in doing further work
and providing support for NetBSD NDIS drivers.

Currently I have two working NDIS drivers for the following cards:
~  -Intel Etherexpress Pro/100 (NetBSD already has support (fxp),
however this was easy to test on as I have the source code for the
Windows driver).
~  -A Dell-branded Broadcom wireless card (NetBSD previously had no
support for this card).

The Broadcom card is working right now on NetBSD 3.99.14 (I just gave
my laptop to Dr. Nelson to play around with) and I have the other card
working on 3.99.7.  I didn't have to make any changes to the code when
upgrading my laptop from 3.99.7, so I think that both drivers (and
hopefully others) should work without any modifications.

Some things that I would like to do in the future are:
~  -Add support for PCMCIA cards (cardbus/pccard)
~      This really shouldn't be that much work, the framework from
FreeBSD is in place, so the device attachment code for each bus
architecture just needs to be written.  Currently I only have PCI working.
~  -Test and fix bugs on a multiprocessor system
~      I don't have access to one of these right now, but I've made an
effort to write everything with the appropriate simple_lock's in place
so hopefully it should just be a matter of debugging.
~  -Add support for 64-bit systems
~      They seem to have this in FreeBSD, and it doesn't look like
there's that much work to get this working, but again I don't have
access to one of these.
~  -Review and merge with the latest FreeBSD NDIS code.
~      The current FreeBSD NDIS code is a bit different than what I
have been using.  The main difference I noticed was in the area of
kernel threads, in the version I'm using there are only two kernel
threads (taskqueue and software interrupt) that run Windows Deferred
Procedure Calls, and other tasks requested by the Windows driver.  In
the new FreeBSD code they seem to create a new kernel thread for each
task rather than queueing them to run in only two threads.  I'm not
sure if the new way would be better suited to NetBSD or not however.

Anyway, I'm just posting to this list in order to try and spark some
discussion about including NDIS in NetBSD.  Also Dr. Nelson is
reviewing my code right now, but if there is anybody else who would
like to review it and possibly sponsor me to become a member I would
be very grateful.

P.S. Here are some links:
The project's webpage:
The current NDIS source code (the most important parts are in
sys/compat/ndis, and sys/dev/if_ndis):
A short article I wrote about the project in DDJ:
Version: GnuPG v1.4.1 (MingW32)
Comment: Using GnuPG with Thunderbird -