This is an old revision of the document!


Week 8 [ Mon 12 Jul 2010 - Sun 18 Jul 2010 ]

Day 1 [ Mon 12 Jul 2010 ]

Git commit: a8e9adfd4a8e3775c227a5f8f8138ef9d2a9d922

I started out today by creating a new local branch and removing any non-critical code, constantly comparing what I had with the old driver. Eventually I reached a point where the new driver was very very similar to the old one, yet it still didn't work. I then remembered that Marty suggested that there might be alignment issues. And indeed there were. Using malloc_dma() and an alignment of 32 got the driver working and I finally booted a PXELINUX + DSL combo. Yay :)

Tomorrow I'll post some speed comparisons between the new and the old driver and start cleaning up the code.

Day 2 [ Tue 13 Jul 2010 ]

No coding today, just some tests.

I ran both the old driver and the new one and got the following results ( the test downloads an 100mb image 5 times ):

Old New
12 12
11 11
11 12
11 13
11 62

The new driver does not perform better than the old one does, on the contrary. When I'll start cleaning up the code, I'll also try and optimize to get better performance.

Also, there is probably a bug in the driver since the last image was downloaded in over 60 seconds. Luckily, this behaviour is deterministic making it easier to fix. Plus, I saved the Wireshark dumps and I think they will help too.

I'll spend the rest of the day refreshing my TCP knowledge, I think it'll help when looking at the packet dumps.

Day 3 [ Wed 14 Jul 2010 ]

me.rest()

Day 4 [ Thu 15 Jul 2010 ]

Git commits:

Cleanup time!

Initally I wanted to have a commit for each core routine but that didn't pan out since a change in one routine meant changing some .h variables which influenced other pieces of code.

[1] I started out with cleaning up .probe which also meant removing a lot of unnecessary variables (related to VLANs, MSIs, etc.), plus a lot of code being removed. In the end, .probe turned out pretty good.

[2] I had the most difficult time with the .open routine. It doesn't lend itself very well to organizing since most of it is just writing to all sorts of registers, and the related writes are usually only 3 or 4 which doesn't make them good candidates for a separate routine. Unwillingly I also changed a lot of the tx and rx code here. It is after this commit that the driver stopped having the bug I mentioned two days ago. It does now get the 100mb image in 12/11/11/11/11s consistently, just like the old driver.

[3] .close wasn't finished, I still had to cleanup the rings and deallocate any used memory. Also, .remove wasn't complete.

[4] I got .irq done, and also did a couple of other small fixes. Unfortunately, the driver does not work when chaining with undionly.kpxe for now. I have yet to debug this issue.

A few more iterations and I think I'll be happy with how the driver turns out :)


QR Code
QR Code soc:2010:andreif:journal:week8 (generated for current page)