1 #ifndef _LINUX_HASH_WRAPPER_H
2 #define _LINUX_HASH_WRAPPER_H
4 #include_next <linux/hash.h>
7 #ifndef HAVE_FAST_HASH_OPS
10 u32 (*hash)(const void *data, u32 len, u32 seed);
11 u32 (*hash2)(const u32 *data, u32 len, u32 seed);
15 * arch_fast_hash - Caclulates a hash over a given buffer that can have
16 * arbitrary size. This function will eventually use an
17 * architecture-optimized hashing implementation if
18 * available, and trades off distribution for speed.
20 * @data: buffer to hash
21 * @len: length of buffer in bytes
26 extern u32 arch_fast_hash(const void *data, u32 len, u32 seed);
29 * arch_fast_hash2 - Caclulates a hash over a given buffer that has a
30 * size that is of a multiple of 32bit words. This
31 * function will eventually use an architecture-
32 * optimized hashing implementation if available,
33 * and trades off distribution for speed.
35 * @data: buffer to hash (must be 32bit padded)
36 * @len: number of 32bit words
41 extern u32 arch_fast_hash2(const u32 *data, u32 len, u32 seed);
42 #endif /* !HASH_FAST_HASH_OPS */
44 #endif /* _LINUX_HASH_WRAPPER_H */