lwip-users
[Top][All Lists]
Advanced

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

RE: [lwip-users] Ethernet Driver development guidelines.


From: Bill Auerbach
Subject: RE: [lwip-users] Ethernet Driver development guidelines.
Date: Tue, 18 Mar 2008 08:52:36 -0400

> -----Original Message-----
> From: address@hidden
> [mailto:address@hidden On Behalf
> Of Stephane Lesage
> Sent: Tuesday, March 18, 2008 7:57 AM
> To: Mailing list for lwIP users
> Subject: [lwip-users] Ethernet Driver development guidelines.
> 

<snip>

> 3- Packet Buffers...
> 
> As everyone, I would like to achieve an ideal zero-copy mechanism...
> 
> a. DMA-TX: I can eventually manage chained-pbufs with multiple DMA
> descriptors... The condition is that intermediary pbufs are always full
> and multiple of 4 bytes. Is that possible ?
> (I don't know if TCP merges packets before the Naggle algorithm delay is
> expired)
> 
> b. DMA-RX: I need a full 1514 bytes buffer for reception.
>  From what I read, it's not a good idea to have a big size for PBUF_POOL.
> So I should not directly use pools.
> An idea would be a static array of DMA buffers.
> Then 1 bad solution is PBUF_REF, because no way to know when it's
> released...
> Another solution is to allocate a pbuf from the pool in my RX thread and
> copy from the pre-allocated buffer. But I want to avoid the copy.
> 
> So the only way would be to malloc() PBUF_RAM buffers... A set of
> initial buffers + create a new one and insert it in my DMA list each
> time a packet is received.
> Are people doing this ?

I don't know Blackfin, but if it has buffer descriptors like the PowerPC,
then this thread answered the question for me for no-copy buffers that the
Ethernet controller can DMA into.  Works great for me on a PPC.

http://lists.gnu.org/archive/html/lwip-users/2007-12/msg00071.html

Bill





reply via email to

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