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>
This commit is contained in:
Eric Dumazet
2021-11-15 09:23:03 -08:00
committed by Jakub Kicinski
parent 7071732c26
commit 49ecc2e9c3
11 changed files with 14 additions and 12 deletions

View File

@@ -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]);