|
From: | address@hidden |
Subject: | [lwip-devel] Re: [task #7896] Support zero-copy drivers |
Date: | Sat, 22 May 2010 21:25:44 +0200 |
User-agent: | Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; de; rv:1.9.1.9) Gecko/20100317 Thunderbird/3.0.4 |
Mike Kleshov wrote:
That looks strange, indeed. I've had a quick look at the the PDF provided at www.freescale.com and I couldn't find a note about the size having to be a multiple of 16 bytes. Instead, I found that the TX-buffers have to be 4-byte-aligned while the RX-buffers have to be 16-byte aligned. This brings us to the fact that there is at least a different alignment requirement for TX- or RX-buffers than for the rest of the stack.I am wondering how zero-copy transmission could be implemented with Coldfire v2 Ethernet controller. The limitations of its DMA is that transmit buffers must be 32-bit aligned and each buffer's size must be a multiple of 16 bytes. The latter limitation is strange since in the very same microcontroller manual they suggest to allocate one buffer for IP header, another for TCP header and so on, but those headers' sizes are not multiples of 16 bytes...
Zero-copy from the application to the wire would indeed not be practical unless you would write the application to generate data into a given pbuf queue and in your port make sure the pbuf queue is allocated in a way that fits your MAC. However, zero-copy from lwIP's internal TCP buffers to the wire could still be worth to try.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?
Simon
[Prev in Thread] | Current Thread | [Next in Thread] |