lwip-devel
[Top][All Lists]
Advanced

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

[lwip-devel] [task #7896] Support zero-copy drivers


From: Joel Cunningham
Subject: [lwip-devel] [task #7896] Support zero-copy drivers
Date: Thu, 01 Oct 2015 14:01:40 +0000
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:41.0) Gecko/20100101 Firefox/41.0

Follow-up Comment #9, task #7896 (project lwip):

For zero-copy TX into the driver, is the goal here to support a synchronous
zero-copy output through the netif_output_fn()?  

Meaning that once the output function returns, the transmit has been complete
and the pbuf memory is no longer referenced by the driver

I ask because in my products, the underlying driver operates in an
asynchronous manner where the packet is enqueued during the netif_output_fn
and then is transmitted at a later time.

Asynchronous zero-copy TX is more complicated.  I'm thinking it would work by
the driver queuing a reference to the pbuf (incrementing pbuf->ref) and then
calling pbuf_free() once it has completed the transmit.  Any modifications to
the pbuf when pbuf->ref > 1 (by LwIP on TCP rexmit or driver) would be
required making a copy of the packet.  Also, any PBUF_REF would need to be
copied since that memory may not be in scope after LwIP is done with the
netif_output_fn (UDP fits this case)

    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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