2 * Temporal C versions of the checksum functions until optimized assembler versions
6 #include <net/checksum.h>
9 * Copy from userspace and compute checksum. If we catch an exception
10 * then zero the rest of the buffer.
12 unsigned int csum_partial_copy_from_user (const char *src
, char *dst
,
13 int len
, unsigned int sum
,
18 missing
= copy_from_user(dst
, src
, len
);
20 memset(dst
+ len
- missing
, 0, missing
);
24 return csum_partial(dst
, len
, sum
);
27 unsigned int csum_partial_copy_nocheck(const char *src
, char *dst
, int len
, unsigned int sum
)
30 return csum_partial(dst
,len
,sum
);
33 /* Fallback for csum_and_copy_to_user is currently in include/net/checksum.h */