[Tinyos-devel] thoughts on buffer management....
cire831 at gmail.com
Sun Oct 6 18:19:30 PDT 2013
I've been rewriting the CC2520 driver and have been looking at how we
receive packets and the interactions with upper layers. In particular
By default, a low level driver has a buffer (usually defined in the driver
itself) that is "parked" and available for use by the low level driver
(LLD). When the packet is filled in RadioReceive.receive is signaled. On
return the LLD is handed the next buffer to use for the next receive.
Now if we are in buffer starvation, the upper layer is forced to hand back
the buffer that it has just been handed. There are no other provisions for
upper layer and/or buffer management code to inform a LLD that the system
is in buffer starvation and it should just discard incoming packets.
Is first any LLD in the systems will each be holding onto buffers (one per
LLD) and 2nd the LLD will be doing work copying packets into its only
buffer and handing it off to the upper layer where it is thrown away. Not
doing the extra work would be better.
Clearly, this is how the current system works. And it is clear that it
does work and is stable enough.
However, buffer starvation and mechanisms for flow control push back as
well as buffer management mechanisms would allow for better tuning in
system behaviour. And they don't have to be complex.
Do we want LLD to continue to behave this way or is it desireable to add
slightly more capability to better deal with buffer starvation issues?
Eric B. Decker
Senior (over 50 :-) Researcher
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Tinyos-devel