Re: IP Checksumming

Alan Cox (alan@lxorguk.ukuu.org.uk)
Sat, 23 Nov 1996 00:47:30 +0000 (GMT)


> > You mean the lodsw and loop instructions? Those have been losers
> > since the 386.
>
> Not true. These built-in macros are responsible for much of the performance
> improvements over chips such as the 68k providing the developer took the
> time to use them.

Actually the 68000 happens to have MOVEM which is ideal for copy/checksum,
and both the 68K and intel chips can copy/checksum at effectively memcpy
speed as can the sparc. See things like Van Jacobson's slides.

> I think there is a problem with testing the speed of the checksum
> routines because changes in execution speed are way down in the
> noise level when you test "networking" results.

My numbers agree with Tom May's give or take 5%. His code craps all
over yours both with the data in the cache, in the L2 cache or in
main memory (generally its in L1 cache, but with DMA devices its in main
memory).

Alan