aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/syncookies.c
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2021-11-15 09:23:03 -0800
committerJakub Kicinski <kuba@kernel.org>2021-11-16 19:07:54 -0800
commit49ecc2e9c3abd269951972fa8b23a4d081111b80 (patch)
treea80df702ca11dfc0473c23ed47b6552ce63f2a6a /net/ipv4/syncookies.c
parentnet: use .data.once section in netdev_level_once() (diff)
downloadlinux-dev-49ecc2e9c3abd269951972fa8b23a4d081111b80.tar.xz
linux-dev-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 'net/ipv4/syncookies.c')
-rw-r--r--net/ipv4/syncookies.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv4/syncookies.c b/net/ipv4/syncookies.c
index 8696dc343ad2..2cb3b852d148 100644
--- a/net/ipv4/syncookies.c
+++ b/net/ipv4/syncookies.c
@@ -14,7 +14,7 @@
#include <net/tcp.h>
#include <net/route.h>
-static siphash_key_t syncookie_secret[2] __read_mostly;
+static siphash_aligned_key_t syncookie_secret[2];
#define COOKIEBITS 24 /* Upper bits store count */
#define COOKIEMASK (((__u32)1 << COOKIEBITS) - 1)