summaryrefslogtreecommitdiff
path: root/include/net
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2024-03-06 16:00:28 +0000
committerJakub Kicinski <kuba@kernel.org>2024-03-07 21:12:43 -0800
commit5af674bb90a030317a02419e04b66ec0dc892dcd (patch)
tree0d2cadaa498beef5328d3e23a788d972595b8b4c /include/net
parent6e0735723ab437793cfab02d50b3ae3539aeb520 (diff)
ipv6: move inet6_ehash_secret and udp6_ehash_secret into net_hotdata
"struct inet6_protocol" has a 32bit hole in 32bit arches. Use it to store the 32bit secret used by UDP and TCP, to increase cache locality in rx path. Signed-off-by: Eric Dumazet <edumazet@google.com> Acked-by: Soheil Hassas Yeganeh <soheil@google.com> Reviewed-by: David Ahern <dsahern@kernel.org> Link: https://lore.kernel.org/r/20240306160031.874438-16-edumazet@google.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include/net')
-rw-r--r--include/net/hotdata.h2
-rw-r--r--include/net/protocol.h1
2 files changed, 3 insertions, 0 deletions
diff --git a/include/net/hotdata.h b/include/net/hotdata.h
index 7a210ea6899c..6d5cd967183a 100644
--- a/include/net/hotdata.h
+++ b/include/net/hotdata.h
@@ -38,6 +38,8 @@ struct net_hotdata {
#define inet_ehash_secret net_hotdata.tcp_protocol.secret
#define udp_ehash_secret net_hotdata.udp_protocol.secret
+#define inet6_ehash_secret net_hotdata.tcpv6_protocol.secret
+#define udp6_ehash_secret net_hotdata.udpv6_protocol.secret
extern struct net_hotdata net_hotdata;
diff --git a/include/net/protocol.h b/include/net/protocol.h
index 3ff26e66735c..213649d2ab09 100644
--- a/include/net/protocol.h
+++ b/include/net/protocol.h
@@ -60,6 +60,7 @@ struct inet6_protocol {
__be32 info);
unsigned int flags; /* INET6_PROTO_xxx */
+ u32 secret;
};
#define INET6_PROTO_NOPOLICY 0x1