diff options
author | 2021-11-15 09:23:03 -0800 | |
---|---|---|
committer | 2021-11-16 19:07:54 -0800 | |
commit | 49ecc2e9c3abd269951972fa8b23a4d081111b80 (patch) | |
tree | a80df702ca11dfc0473c23ed47b6552ce63f2a6a /include/linux/siphash.h | |
parent | net: use .data.once section in netdev_level_once() (diff) | |
download | linux-49ecc2e9c3abd269951972fa8b23a4d081111b80.tar.gz linux-49ecc2e9c3abd269951972fa8b23a4d081111b80.tar.bz2 linux-49ecc2e9c3abd269951972fa8b23a4d081111b80.zip |
net: align static siphash keys
siphash keys use 16 bytes.
Define siphash_aligned_key_t macro so that we can make sure they
are not crossing a cache line boundary.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include/linux/siphash.h')
-rw-r--r-- | include/linux/siphash.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/siphash.h b/include/linux/siphash.h index bf21591a9e5e..3f7427b9e935 100644 --- a/include/linux/siphash.h +++ b/include/linux/siphash.h @@ -21,6 +21,8 @@ typedef struct { u64 key[2]; } siphash_key_t; +#define siphash_aligned_key_t siphash_key_t __aligned(16) + static inline bool siphash_key_is_zero(const siphash_key_t *key) { return !(key->key[0] | key->key[1]); |