summaryrefslogtreecommitdiff
path: root/include/net/aligned_data.h
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2025-06-30 09:35:40 +0000
committerJakub Kicinski <kuba@kernel.org>2025-07-02 14:22:02 -0700
commite3d4825124bce0d1f72187fabcf972b7c0b6cb9b (patch)
tree7d57f406a870c95a827b3934c61a4d159d6d495a /include/net/aligned_data.h
parent83081337419cb692eca4ee475d936b1fdcfd49f6 (diff)
udp: move udp_memory_allocated into net_aligned_data
____cacheline_aligned_in_smp attribute only makes sure to align a field to a cache line. It does not prevent the linker to use the remaining of the cache line for other variables, causing 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-5-edumazet@google.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include/net/aligned_data.h')
-rw-r--r--include/net/aligned_data.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/net/aligned_data.h b/include/net/aligned_data.h
index bedb4f86b0fe..e1a1c8aedc79 100644
--- a/include/net/aligned_data.h
+++ b/include/net/aligned_data.h
@@ -13,6 +13,7 @@ struct net_aligned_data {
atomic64_t net_cookie ____cacheline_aligned_in_smp;
#if defined(CONFIG_INET)
atomic_long_t tcp_memory_allocated ____cacheline_aligned_in_smp;
+ atomic_long_t udp_memory_allocated ____cacheline_aligned_in_smp;
#endif
};