lwip-devel
[Top][All Lists]
Advanced

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

Re: [lwip-devel] Re: [task #7040] Work on tcp_enqueue


From: address@hidden
Subject: Re: [lwip-devel] Re: [task #7040] Work on tcp_enqueue
Date: Tue, 03 Feb 2009 20:23:38 +0100
User-agent: Thunderbird 2.0.0.19 (Macintosh/20081209)

Alain M. wrote:
Yes, and a bit more... The problem gets worse on 32 bit arch like arm7 that only operate in 32 bit aligned chunks. If independent write blocks are not a multiple of 4 bytes, they will have to be concatenated later on. So it might be just as well to do that early. And it is no use atempting zero copy in that case too, for that same reason.

Yes, I had the same problems. But I managed to write my own version of memcpy that showed no significant slowdown when copying to/from unaligned pointers by loading into a register and shifting in order to always have 32-bit accesses. Of course that only works if you have a 1-cycle-shift operation.

As to zero-copy: pbufs should be allocated on a boundary that is OK for DMA on your platform, but of course, if the first pbuf has the wrong length, the target of the second pbuf will be unaligned. That would also be solved with the one-pbuf-per-segment approach.

Simon




reply via email to

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