inet: switch IP ID generator to siphash
[GitHub/LineageOS/android_kernel_motorola_exynos9610.git] / include / linux / siphash.h
index fa7a6b9cedbffeac141a157790115288132f43e9..bf21591a9e5e653585c26cb3f3f0857256c0eb89 100644 (file)
@@ -21,6 +21,11 @@ typedef struct {
        u64 key[2];
 } siphash_key_t;
 
+static inline bool siphash_key_is_zero(const siphash_key_t *key)
+{
+       return !(key->key[0] | key->key[1]);
+}
+
 u64 __siphash_aligned(const void *data, size_t len, const siphash_key_t *key);
 #ifndef CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS
 u64 __siphash_unaligned(const void *data, size_t len, const siphash_key_t *key);