Re: Network buffer fragmentation support


Jukka Rissanen
 

Hi Joakim,

the fragments will be individual small buffers with possibly some link
level layer space reserved before the actual data. This way it is
possible to avoid memory copy in lower network levels. If the buf size
is carefully selected for a given bearer technology like 802.15.4, then
we can use the same buffer from application level to the device driver.

Cheers,
Jukka

On Mon, 2016-04-25 at 16:43 +0200, Joakim Eriksson wrote:
Hi!

Quick question without a deep dive in the code. Is it intended to
create
consecutive fragments to allow using the packet/network memory
directly 
(e.g.  to will a fragmentet buffer look the same as one big buffer)?

In Contiki we have quite often used structs to access data in the
network
buffer which more or less requires consecutive buffers.

Best regards,
— Joakim



On 25 Apr 2016, at 15:56, Jukka Rissanen <jukka.rissanen(a)linux.inte
l.com> wrote:

Hi All,

I just uploaded net_buf fragmentation support to gerrit.

https://gerrit.zephyrproject.org/r/#/c/1648/

The fragmentation support allows the network stack to use smaller
buffer fragments to support bigger IP buffers. So instead of
allocating
full IPv6 buffer (1280 bytes) we can allocate smaller fragments
instead. This is useful as typically network packets are quite
small
and always allocating full buffer wastes memory.

This patchset is just an enabler, it does not implement the
fragmentation in the IP stack.

Please review the patchset if this topic interests you.


Cheers,
Jukka

Join devel@lists.zephyrproject.org to automatically receive all group messages.