[Top] [All Lists]

Re: TCP/IP checksumming

Subject: Re: TCP/IP checksumming
From: Systemkennung Linux <>
Date: Wed, 13 Nov 1996 13:46:02 +0100 (MET)
In-reply-to: <> from "Kai Harrekilde-Petersen" at Nov 13, 96 09:49:44 am
> There was a thread about optimizing the tcp/ip checksum in comp.arch
> (the ``Plenty of registers'' thread) recently, so I took some time out
> to look at the Linux code.
> After having stared at the i386 code, I wondered what we did for MIPS.
> After musing a bit over it, I have com to the conclusion that at least
> of the following two statements are true for Linux/MIPS:
>  o  Nobody uses TCP/IP.
>  o  All TCP/IP fragments are word aligned.

In general they are.  I've explicitly disabled software fixing of address
errors exception caused by the kernel but so far have only seen very view
unaligned accesses.  That is before 2.1.8 which seems to throw tons of
these exceptions.

> PS: why don't we use the 64bit registers in the R4x00 chips, when
> they are available? yes, we'd need separate 32bit and 64bit versions,
> but I think it would be worth it.

That version was intended to be useable by everyone.  And yes, it *is*
worth optimizing it with every means available.  The checksum routines
account for the lion part of the CPU used during a TCP transfer so when
I've time I'll do it.

> PPS: Ralf, after thinking about csum_partial_copy() I do understand
> why you prefered the easy option (mempcy from address 0x1 to 0x7,
> anyone?).

Take a look at Linus' Alpha version for csum_partial_copy().


PS:  My comment to csum_partial_copy() said it was 2:30am ...

<Prev in Thread] Current Thread [Next in Thread>