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: Jared Grubb
Subject: [lwip-devel] [task #6735] Provide new pbuf type: PBUF_RAM_NOCOPY
Date: Mon, 30 Jul 2007 21:59:36 +0000
User-agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.8.1.5) Gecko/20070713 Firefox/2.0.0.5

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

(background: relative newcomer to lwIP)

Reply to #7, Jonathan:
> With this change the notional abstraction for the netif layer output
function is now very clear that it will behave as if it sent the packet
immediately (e.g. like a polled driver). In practice this may mean copying the
payload if it needs to.

I wrote my Ethernet driver completely zero-copy and I haven't had any issues
yet -- what part of lwIP code expects to be able to alter a pbuf after it is
submitted? (Maybe I haven't enabled that module yet!) A brief glance through
the code seems to suggest that "some_output (p); pbuf_free(p);" is a common
sequence of code. To require a driver to allocate a new buffer, copy the data,
and then transmit seems to be a waste when the next statement upon return is
often a pbuf_free anyway.

When I wrote the driver, I had to guess whether zero-copy would work (since I
didn’t see anything in the doc or in the comments), and so far it has worked
for me.

Jared 


    _______________________________________________________

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]