embassy icon indicating copy to clipboard operation
embassy copied to clipboard

net: reconsider buffer allocation

Open Dirbaio opened this issue 4 years ago • 0 comments

Currently net is responsible for allocating buffers from a PacketPool.

  • It doesn't play nicely at all with drivers with special needs for DMA, like
    • special alignment
    • special RAM region so DMA can read it
    • extra prepended data such as DMA descriptors
  • It is possible for drivers to hold on to packets for too long, which can make the pool full.
  • When it gets full, core can go into a hot poll loop of "try to allocate, fail, retry".
  • It requires this Poor Man's Vec that's "data + range".

Maybe allocation should be handled by the driver, like in smoltcp...

Dirbaio avatar Aug 05 '21 21:08 Dirbaio