|
From: | bill |
Subject: | RE: [lwip-devel] again... Zero Copy Ethernet interface |
Date: | Tue, 23 Dec 2008 11:29:03 -0500 |
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. 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. Bill From:
address@hidden [mailto:address@hidden
On Behalf Of Piero 74 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? bye Piero " merry Christmas and happy new year!! :OD " |
[Prev in Thread] | Current Thread | [Next in Thread] |