lwip-devel
[Top][All Lists]
Advanced

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

Re: [lwip-devel] Zero Copy support


From: Joel Cunningham
Subject: Re: [lwip-devel] Zero Copy support
Date: Mon, 19 Sep 2016 14:41:58 +0000 (GMT)

Here's some information on the state of zero-copy:

RX has been implemented in git head (2.0.0 pending release) and can be implemented using PBUF_REF instead of PBUF_POOL.  The winpcap netif in lwip-contrib has an example of how to use PBUF_REF and a custom pbuf in the RX pathway.  Note the winpcap example isn't actually zero-copy from the pcap API because that doesn't allow handing off memory allocations, but you can see how the PBUF_REF/custom pbuf works

TX for TCP from the core to the driver is not fully implemented for asynchronous drivers.  There's an open task tracking the remaining work: https://savannah.nongnu.org/task/?7896.  The main piece missing is that when the pbuf is passed to the driver, we end up making a second reference to the pbuf because TCP continues to hold a reference for retransmission.  Synchronization for access and modification across multiple contexts (TCP retransmision and driver) is not currently implemented, thus leaving a case where both could modify the memory at the same time.  Other stacks (Linux for example) make a copy of the pbuf upon the case of modification when the reference count is > 1

Joel

On Sep 17, 2016, at 04:21 AM, Dimax <address@hidden> wrote:

Hi,
We have started to work on implementation of Zero Copy in our ETH driver based on lwip-1.4.1. But now it looks like 2.0.0 release is on it's way, so we are thinking to migrate with new development to 0.2.0.

My questions are: 
- What critical changes were made between 1.4.1 and 2.0.0 in what is related to pbufs allocation/deallocation
- Are there any guidelines or thought about Zero Copy implementation in 2.0.0  

Our initial effort was to find a place(s) to catch pbufs alloc/free and overlay it with our functionality that will be synced with DMA buffers creation processing and release.
I can see LWIP_SUPPORT_CUSTOM_PBUF introduced in 2.0.0. Where can we get mode details about this feature?

Thanks

_______________________________________________
lwip-devel mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/lwip-devel

reply via email to

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