lwip-devel
[Top][All Lists]
Advanced

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

RE: [lwip-devel] [task #7896] Support zero-copy drivers


From: Bill Auerbach
Subject: RE: [lwip-devel] [task #7896] Support zero-copy drivers
Date: Mon, 24 May 2010 08:44:47 -0400

I solved this in the Ethernet driver.  I used a chained DMA.  I copied 8 bytes 
to a stack-based array (which is aligned) and set up DMA to copy for 4 plus 
what it takes to align the second segment.  So it's not 0 copy, but takes only 
4 instructions to do the copy to the array.  Then I set up the second DMA 
transfer to start at the aligned address in the data for count minus what is in 
the first DMA segment.  For a 1k or larger transmit, this was far more 
efficient than copying the whole packet to an aligned stack-based array (which 
is what the driver I started with was doing).  I think it would still be more 
efficient if you don't have chained DMA if you had to do this in 2 separate 
transfers to the MAC.

Bill

>Follow-up Comment #2, task #7896 (project lwip):
>Anyway, with those limitations I cannot see how zero-copy transmission
>could work without imposing severe restrictions on how the application
>supplies data to lwip. Basically, it would not be practical.
>Am I right in this?





reply via email to

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