summaryrefslogtreecommitdiff
path: root/include/net/hotdata.h
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2024-03-06 19:00:14 +0300
committerJakub Kicinski <kuba@kernel.org>2024-03-08 08:12:41 +0300
commit2658b5a8a4eee5fad378d0bde2f221deacbc58f1 (patch)
tree04ee99ee98634d5fb654c935b21b2fa1351ce589 /include/net/hotdata.h
parentd3423ed9b89d27d0fd8386dbb9bee89728c92b87 (diff)
downloadlinux-2658b5a8a4eee5fad378d0bde2f221deacbc58f1.tar.xz
net: introduce struct net_hotdata
Instead of spreading networking critical fields all over the places, add a custom net_hotdata structure so that we can precisely control its layout. In this first patch, move : - gro_normal_batch used in rx (GRO stack) - offload_base used in rx and tx (GRO and TSO stacks) 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-2-edumazet@google.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include/net/hotdata.h')
-rw-r--r--include/net/hotdata.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/include/net/hotdata.h b/include/net/hotdata.h
new file mode 100644
index 000000000000..6ed32e4e34aa
--- /dev/null
+++ b/include/net/hotdata.h
@@ -0,0 +1,15 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+#ifndef _NET_HOTDATA_H
+#define _NET_HOTDATA_H
+
+#include <linux/types.h>
+
+/* Read mostly data used in network fast paths. */
+struct net_hotdata {
+ struct list_head offload_base;
+ int gro_normal_batch;
+};
+
+extern struct net_hotdata net_hotdata;
+
+#endif /* _NET_HOTDATA_H */