Peter Hedinger 2015-01-06 09:44:09 GMT
The standard MII buffering is structured with two banks in order to have one that is being written to while the pointers in the other bank are being updated.
However, this has the effect of making the memory usage very inefficient for large packets. Consider the following case:
Both banks are completely empty, but their write pointers are not at the base.
A large packet arrives followed by a small packet.
The large packet goes into bank 0, but because the large packet didn't start at the base it has now effectively filled bank 0 (packets can't be started if the write pointer is after the lastSafePtr nor can it fit before the packet in the buffer).
For that reason it sets the next write pointer as -1 to indicate there is now no place to write the next packet.
The small packet arrives, but finds that the next write pointer is -1 so it drops that packet as the buffer it has needs to be re-used.
As a result, in this case only 1/4 of the buffer is actually used.
A more effective scheme might be to have 4 independent maximum sized frame buffers since they are being copied to the client anyway.
http://bugzilla.xmos.local/show_bug.cgi?id=16282
Peter Hedinger 2015-01-06 09:44:09 GMT The standard MII buffering is structured with two banks in order to have one that is being written to while the pointers in the other bank are being updated.
However, this has the effect of making the memory usage very inefficient for large packets. Consider the following case:
As a result, in this case only 1/4 of the buffer is actually used.
A more effective scheme might be to have 4 independent maximum sized frame buffers since they are being copied to the client anyway.