lkml.org 
[lkml]   [2007]   [Apr]   [3]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateTue, 03 Apr 2007 12:31:20 -0700
FromRandy Dunlap <>
SubjectRe: [PATCH] make csum_partial obj-y
David Miller wrote:
> From: Randy Dunlap <randy.dunlap@oracle.com>
> 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.

Thanks David and Andi.  I get it.

-- 
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-04-03 21:35    [from the cache]
©2003-2008