summaryrefslogtreecommitdiff
path: root/net/core/net-procfs.c
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2024-03-06 16:00:17 +0000
committerJakub Kicinski <kuba@kernel.org>2024-03-07 21:12:41 -0800
commit0b91fa4bfb1caedd01cb6eb3b733cbc77c9edb0e (patch)
treee5f372f14503a19d33a34fdcb90c3a3a862a7af8 /net/core/net-procfs.c
parentf59b5416c396ac4910dd7a0cdf26cbb0e1faf529 (diff)
net: move ptype_all into net_hotdata
ptype_all is used in rx/tx fast paths. Move it to 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-5-edumazet@google.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/core/net-procfs.c')
-rw-r--r--net/core/net-procfs.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/net/core/net-procfs.c b/net/core/net-procfs.c
index 2e4e96d30ee1..a97eceb84e61 100644
--- a/net/core/net-procfs.c
+++ b/net/core/net-procfs.c
@@ -3,6 +3,7 @@
#include <linux/proc_fs.h>
#include <linux/seq_file.h>
#include <net/wext.h>
+#include <net/hotdata.h>
#include "dev.h"
@@ -183,7 +184,7 @@ static void *ptype_get_idx(struct seq_file *seq, loff_t pos)
}
}
- list_for_each_entry_rcu(pt, &ptype_all, list) {
+ list_for_each_entry_rcu(pt, &net_hotdata.ptype_all, list) {
if (i == pos)
return pt;
++i;
@@ -231,13 +232,13 @@ static void *ptype_seq_next(struct seq_file *seq, void *v, loff_t *pos)
}
}
- nxt = ptype_all.next;
+ nxt = net_hotdata.ptype_all.next;
goto ptype_all;
}
if (pt->type == htons(ETH_P_ALL)) {
ptype_all:
- if (nxt != &ptype_all)
+ if (nxt != &net_hotdata.ptype_all)
goto found;
hash = 0;
nxt = ptype_base[0].next;