[riot-notifications] [RIOT-OS/RIOT] Discussion: How should netdev_driver_t::recv() behave when buffer is too smal (#10413)

Marian Buschsieweke notifications at github.com
Fri Nov 16 14:11:16 CET 2018


@gebart: E.g. the `cc2420` is unable to read data from the RX FIFO without removing it from the RX FIFO. Thus, it is impossible to implement that API without sacrificing RAM for an additional buffer on the MCU.

In general I'm in favor of your proposal. But I think need a solution for drivers than can access the incoming frame only once. Making an exception from the API for drivers that do not allow retrieving only parts of a frame would make the API too complex in my opinion. Adding a buffer to cache the retrieved chunk of the frame for subsequent calls to `recv()` would in my opinion be too wasteful with the already limited amount of RAM.

Even though I do prefer in general that the driver should still retrieve the chunk that fits into the buffer, I would vote against this to make life for drivers like the `cc2420` easier.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/issues/10413#issuecomment-439388371
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20181116/72bc6326/attachment.html>


More information about the notifications mailing list