Problems in 16bit emulation with PC-Net II
Posted: 18. Jan 2012, 10:01
Hello I've been working with Virtual Box for use with testing some low-level software. I've found two problems when using the PC-Net II setting in Virtual Box. The first is having to do with the size of buffers for the NIC where the buffer size has to be 3072 bytes or more or the frame will not be transmitted but receiving frames this doesn't apply.
It can be found on line 2424 of root/trunk/src/VBox/Devices/Network/DevPCNet.cpp
2424 const unsigned cb = 4096 - tmd.tmd1.bcnt;
2434 if (RT_LIKELY(cb <= MAX_FRAME))
using any number less then the 3072 byte buffer size will cause the function to fall through to a pcnetXmitFailTMDLinkDown and nothing will happen on the wire.
The source code is very complex I understand the difficulty of altering it but I wanted to make known that this bug exists.
Another bug for which I haven't any clue about is once you use this 3072 byte long buffer all your frames generated are 1024 bytes long. Even for instance an Address Resolution Protocol packet will be this size.
Thanks to the programmers who designed this very complex amazing program and to give it away for free but it'd be great if these bugs could be patched because at the 16bit level using 3072 byte long buffers will take up a good amount of your memory.
It can be found on line 2424 of root/trunk/src/VBox/Devices/Network/DevPCNet.cpp
2424 const unsigned cb = 4096 - tmd.tmd1.bcnt;
2434 if (RT_LIKELY(cb <= MAX_FRAME))
using any number less then the 3072 byte buffer size will cause the function to fall through to a pcnetXmitFailTMDLinkDown and nothing will happen on the wire.
The source code is very complex I understand the difficulty of altering it but I wanted to make known that this bug exists.
Another bug for which I haven't any clue about is once you use this 3072 byte long buffer all your frames generated are 1024 bytes long. Even for instance an Address Resolution Protocol packet will be this size.
Thanks to the programmers who designed this very complex amazing program and to give it away for free but it'd be great if these bugs could be patched because at the 16bit level using 3072 byte long buffers will take up a good amount of your memory.