Michael Decker: Driver Development
Week C
13 August
This morning I installed an iSCSI server on my laptop. It turned out much simpler than anticipated. I am running Ubuntu 8.04 (Hardy Heron), and it turns out the iSCSI target kernel module is present by default? So, a point & click install via Synaptic Package Manager, and modification of /etc/ietd.conf
was all that was needed.
Once working, I tested the 3c59x driver I've been hacking on recently. Of course there were network errors present, which I didn't see when using AoE. A scandisk
run over DOS froze up the system.
I spent a while going through the code and checking suspect areas. I eventually discovered that the Linux code was freeing the tx buffers, which is a no-no in gPXE. This code was fixed to issue netdev_tx_complete()
notifications.
Subsequent testing continued showing errors. This baffled me for some time until I decided to reboot the laptop. The next test showed no errors! Interesting. Further testing suddenly showed errors again. I then discovered simply restarting Wireshark would prevent the TCP errors from appearing. Further experimentation resulted in Wireshark crashing unexpectedly!? So, while the universe seems broken, my driver is not :)
To be more clear: If the PC is restarted or turned off & on during a single Wireshark capture, subsequent TCP packets will be flagged as retransmissions. However, if the Wireshark capture is restarted, no retransmissions will be flagged. I suppose this has something to do with Wireshark's retransmission-identification heuristic, iSCSI's protocol format, and gPXE's TCP implementation.
I submit this driver for testing by anyone else before I trim out the old Linux driver code.
15 August
Early start this morning:
I tested the skge driver with iSCSI and found it freezing at a surface scan through scandisk
in DOS. I found in this driver I left in the tx iob freeing, and neglected tx completion notification - just as I did in 3c59x. I also updated some comments. Testing now reveals excellent operation via iSCSI.
Pushed a few minor 3c59x memory allocation fixes. Removed all the old Linux code from 3c59x. I feel the driver is ready for prime-time, so I pruned out that code. It's nice and shiny now. ;)
18 August
Final journal entry. What a fast summer.
First, I'd like to comment that this has been a tremendous experience. I feel honored to have had the opportunity to participate in the Google Summer of Code. Participating in the Etherboot project has been a privilege. The mentors here are very wise.
Over the past three months I rewrote the eepro100 network driver, with little left unchanged. This driver has been tested by both mdc and myself, and works flawlessly in iSCSI. The code is located in its own branch in my repository here.
The skge network driver was brought in from the Linux tree and converted to work with gPXE. I eliminated unsupported features and functions, and made modifications as needed to interface with gPXE. The code was changed as little as possible to make future references to the Linux driver easy, for newer features or bug fixing. iSCSI testing by myself showed flawless operation. The skge branch is here.
The 3c59x network driver was brought in from Linux as well. Again, unsupported features were removed, and code was preserved where possible for easier cross referencing. iSCSI testing by myself shows flawless operation. The 3c59x branch is here.
Also, the atlx network driver was brought in from Linux, in an attempt to support the Attansic L2. This driver only supports the L1, so I could not test it. No testing or debugging was performed, although it should be close to running. You can find the atlx branch here.
Additionally, in my first few weeks I documented some newer gPXE network and PCI driver API routines. This documentation should prove a useful reference for anyone working on drivers. I encourage anyone to update/add to this as necessary!
Well, that's it!