]> git.ipfire.org Git - thirdparty/linux.git/commit
net: move net_cookie into net_aligned_data
authorEric Dumazet <edumazet@google.com>
Mon, 30 Jun 2025 09:35:38 +0000 (09:35 +0000)
committerJakub Kicinski <kuba@kernel.org>
Wed, 2 Jul 2025 21:22:02 +0000 (14:22 -0700)
commit998642e999d23324c5dbf38149606d09cec2c377
tree193d01be8d1645ffa13c80a50ca3a61281798313
parent3715b5df09b92168a4492b48bb7ea70d89f9d8f3
net: move net_cookie into net_aligned_data

Using per-cpu data for net->net_cookie generation is overkill,
because even busy hosts do not create hundreds of netns per second.

Make sure to put net_cookie in a private cache line to avoid
potential false sharing.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Willem de Bruijn <willemb@google.com>
Link: https://patch.msgid.link/20250630093540.3052835-3-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
include/net/aligned_data.h
net/core/net_namespace.c