lwip-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-devel] [task #6735] Provide new pbuf type: PBUF_RAM_NOCOPY


From: Kieran Mansley
Subject: [lwip-devel] [task #6735] Provide new pbuf type: PBUF_RAM_NOCOPY
Date: Wed, 01 Aug 2007 08:03:02 +0000
User-agent: Opera/9.21 (X11; Linux i686; U; en)

Follow-up Comment #15, task #6735 (project lwip):

In my opinion, if the application was going to use the buffers in that way
(i.e. never modify the contents, just free it after sending) they could just
use the PBUF_ROM type (or the suggested new PBUF_RAM_NOCOPY if the stack
should do the free) and the stack would have the guarantees it needs.  We
should assume that if they've used PBUF_REF, they have done so for a reason. 
The current API allows the application to choose both ways, so I'd rather not
restrict it if we don't have to.

Also, just preventing users from re-using PBUFs doesn't really solve the
problem.  If they free it, then allocate another one for the next send, they
might get the same one back and so it be identical to re-use.  We can't expect
the application to cope with that level of subtlety.

lwIP can support zero-copy *if* the application allows it.  I think where we
need API changes are between the stack and the driver (so that information
about what needs copying if not sent synchronously can be passed) not between
the application and the stack.  Either way, this will be a 1.4 not 1.3
problem.

    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/task/?6735>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]