|
From: | Jim Gibbons |
Subject: | Re: [lwip-users] lwIP Checksum routine |
Date: | Mon, 14 Nov 2005 15:22:12 -0800 |
User-agent: | Mozilla Thunderbird 1.0.2 (Windows/20050317) |
We did an optimization for one port (NiosII). This is very CPU
dependent. In our particular case, we did better with 16-bit accesses
owing to a slow shifter. We did the best by handling 8 half-words in
one pass of an outer loop. This allowed us to use small constant
offsets that could be encoded in the load instructions, e.g., acc +=
data[0]; acc += data[1]; etc. The loop overheads and the pointer
update (data += 8) became a much smaller fraction of the CPU time taken. But, as I said, this stuff is very CPU dependent. Considering that, I think that the core code is as it should be. It's a simple thing to change for your particular CPU, so I would urge you to do so. I would also urge you to try a couple of different things and measure your results. We were surprised when we found that full word accesses weren't good for us, and you may find some surprising things with your CPU. You might also want to check your ethernet chip. Some of the newer ones can assist you at the time of transmission. Good luck! Sathya Thammanur wrote: Hi all, --
|
[Prev in Thread] | Current Thread | [Next in Thread] |