[Top][All Lists]

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

Re: [lwip-devel] again... Zero Copy Ethernet interface

From: Piero 74
Subject: Re: [lwip-devel] again... Zero Copy Ethernet interface
Date: Tue, 23 Dec 2008 17:36:12 +0100

2008/12/23 bill <address@hidden>

As I was advised on this list last year, zero copy with DMA is possible and not difficult (for incoming packets) by allocating pbufs and pointing the DMA controller at the pbuf payload (you may have to play with alignment of this pointer depending on the architecture).  When a packet arrives, allocate a new pbuf, set the DMA controller to this new packet and return the pbuf that the DMA controller just filed to the caller of low_level_input.

i suppose i could have a driver with more than one pbuf allocated... it could be more efficient... but, my problem, is the pbuf allocation memory:
DMA MUST works in FIXED region in memory, and instead i have no control where pbuf payload are allocated... do you have a solution?


As also mentioned in the past, outgoing zero copy is more difficult because lwIP wants to free the pbuf after the call to low_level_input and this could happen before the DMA transfer has occurred.  Maybe I have this wrong but I recall some complication in regards to sending data.

i think we can discuss here of some solution....

Thanks for your (first i hope) reply





From: lwip-devel-bounces+bauerbach=arrayonline.com@nongnu.org [mailto:lwip-devel-bounces+bauerbach=arrayonline.com@nongnu.org] On Behalf Of Piero 74
Sent: Tuesday, December 23, 2008 10:38 AM
To: lwip-devel
Subject: [lwip-devel] again... Zero Copy Ethernet interface


Hi all


I want to open again a thread for zero copy driver implementation


I think that it could be useful a more powerful implementation of pbufs, that could give to developer the possibility to build driver which can avoid a copy from friver to stack.


I have a microcontroller with an emac HW which uses DMA for ethernet packet managment. 

It works with a circular array of buffers with descriptors.


My ethernetif loop, checks if packet is present, copies it in a raw pbuf, and move DMA pointer.


I'd like to remove copy operation; i have to understand better how pbufs works, but i suppose that something have to change:

first, it could be necessary the possibility to allocate pbuf memory in particula memory region: my micro, for example, has emac dma which works on a fixed RAM region.

second, it could be necessary that stack informs lowlevel driver when a pbuf is free


Any idea? any implementation of this planned in the future?


and... out of thread...

what about of SOCKET2 (sockets build without netconn)? some news? is it planned in the future?





" merry Christmas and happy new year!! :OD "

lwip-devel mailing list

reply via email to

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