|
From: | Dirk Ziegelmeier |
Subject: | Re: [lwip-devel] Zero Copy support |
Date: | Tue, 20 Sep 2016 09:07:07 +0200 |
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 worksTX 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/?789 6. 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 > 1JoelHi,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.0Our 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
_______________________________________________
lwip-devel mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/lwip-devel
[Prev in Thread] | Current Thread | [Next in Thread] |