[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: node types etc.
On Tue, 16 Jan 2001, Philipp Rumpf wrote:
> > email@example.com said:
> > > How can something be cheaper than a single addition ? :)
> > TCP checksums aren't just a simple addition. You have to fold back into 16
> Yes. They're a simple addition of one's-complement 16 bit units (at least
> in the actual loop).
Which, it turns out, is fortunately implementable using the normal 2's
complement add with carry.
The folding into 16-bits is just an extra addition done at the end of the
checksum, nothing expensive compared to the number of other additions
> > bits. I'm told that CRC can be cheaper on 32-bit machines. A straight
> > 32-bit checksum, on the other hand, can quite possibly be cheaper than
> > either.
The 32-bit TCP checksum IS a "straight 32-bit checksum", with an
additional add at the end of the block. It's only difficult to implement
if the machine in question lack the ability to do carry additions.
To unsubscribe from this list: send the line "unsubscribe jffs-dev" in
the body of a message to firstname.lastname@example.org