Re: [PATCH] make csum_partial obj-y
From: David Miller
Date: Tue Apr 03 2007 - 15:27:29 EST
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.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/