summaryrefslogtreecommitdiff
path: root/net/core/hotdata.c
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2024-03-06 19:00:15 +0300
committerJakub Kicinski <kuba@kernel.org>2024-03-08 08:12:41 +0300
commitae6e22f7b7f0702015d86cfa036492b94be92f04 (patch)
treec741be416be49dc0015f2d02b5e0f81a6a9cb2aa /net/core/hotdata.c
parent2658b5a8a4eee5fad378d0bde2f221deacbc58f1 (diff)
downloadlinux-ae6e22f7b7f0702015d86cfa036492b94be92f04.tar.xz
net: move netdev_budget and netdev_budget to net_hotdata
netdev_budget and netdev_budget are used in rx path (net_rx_action()) Move them into net_hotdata for better cache locality. 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-3-edumazet@google.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/core/hotdata.c')
-rw-r--r--net/core/hotdata.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/net/core/hotdata.c b/net/core/hotdata.c
index abb8ad19d59a..907d69120397 100644
--- a/net/core/hotdata.c
+++ b/net/core/hotdata.c
@@ -1,9 +1,15 @@
// SPDX-License-Identifier: GPL-2.0-or-later
#include <net/hotdata.h>
#include <linux/cache.h>
+#include <linux/jiffies.h>
#include <linux/list.h>
+
struct net_hotdata net_hotdata __cacheline_aligned = {
.offload_base = LIST_HEAD_INIT(net_hotdata.offload_base),
.gro_normal_batch = 8,
+
+ .netdev_budget = 300,
+ /* Must be at least 2 jiffes to guarantee 1 jiffy timeout */
+ .netdev_budget_usecs = 2 * USEC_PER_SEC / HZ,
};