Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Standard MII buffering does not cope well with large packets #61

Open
shuchitak opened this issue Nov 25, 2024 · 1 comment
Open

Standard MII buffering does not cope well with large packets #61

shuchitak opened this issue Nov 25, 2024 · 1 comment

Comments

@shuchitak
Copy link
Contributor

shuchitak commented Nov 25, 2024

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:

  • 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.

@shuchitak
Copy link
Contributor Author

Possibly, also reported as part of #28

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant