On Tue, Oct 10, 2006 at 04:01:56PM +0000, Alan Lamphier wrote: > What came to mind today was the possibility to call netconn_write() with > NO_COPY, referencing an external memory location instead of pointing to an > internal buffer.
If you can guarantee that the data will still be accessible should TCP need to retransmit the packet some time later it should be fine to call without requesting a copy. The copy is necessary as normally when the write call returns the caller is free to do what it likes with the buffer that it has just passed in. TCP may need to access that memory many times, and so it has to copy it to make sure it's still available. I'm not sure about your hardware but depending on the speed of the external memory compared to RAM, doing the copy may surprisingly help performance. If the external memory was slow, and TCP tried to read from it many times (e.g. checksum, write to network, and retransmit) it might have worked out faster to just read it from the slow external memory into faster RAM once and then TCP can access it from there. Something to consider anyway. Hope that helps, Kieran _______________________________________________ lwip-users mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/lwip-users
