PDA

View Full Version : mTCP Updates



mbbrutman
April 23rd, 2010, 06:41 PM
I've posted another round of mTCP updates at http://brutman.com/mTCP/ .

This update was to fix a bug in my IP checksum code that could cause a connection to drop. Credit goes to Raven for pointing it out to me. I tried to make an optimization to the algorithm which was within the spirit of the law, but not good enough to pass. :-) There was a 1 in 65535 chance of hitting the bug, and Raven was getting quite lucky.

The replacement code is not only correct, but is far faster too. On data transfers using netcat where there is no disk I/O I'm getting up to 30% more throughput. With disk I/O your mileage will vary, but it will be faster. And it has the great side effect of not generating the one bad checksum that the old code was generating.

Please update and let me know what else you'd like. And I don't ever expect to have problems with this code again. :-)

For my next release I'm hoping to make usability enhancements. Let me know what you are interested in seeing.


Regards,
Mike

Raven
April 23rd, 2010, 07:14 PM
Raven was getting quite lucky every 2-3 files he tried to transfer, in fact. :P

The new version has completely fixed the problem (for me) and is quite nice.

When I get my new MediaGX box mTCP will adorn it as the TCP/IP stack, and more testing shall commence. :)

BTW - I've purchased a 5160 from Chromedome45 that will be shipping out to me tomorrow. When I get an 8-bit network adapter running with it I'll also try it out on there.