From: Randy Dunlap <randy.dunlap@xxxxxxxxxx>
Date: Tue, 03 Apr 2007 12:09:33 -0700
How does the networking code work across multiple architectures?
This has been discussed before.
The csum_partial() result value is only well defined modulo 0xffff.
The networking does csum_fold() or similar on the results, and so the
right thing always happens there.
The reiserfs case is the worst because even ignoring the differences
in csum_partial() return values, it always feeds this into
cpu_to_le32() which basically means that it is putting a cpu-endian
dependent value onto disk. csum_partial() returns a fixed-endian,
not cpu endian, value. So feeding it into cpu_to_anything() is
quite wrong.