* [PATCH] netfilter: ebtables: allocate chainstack on CPU local nodes
@ 2021-10-10 18:24 Davidlohr Bueso
2021-10-17 22:23 ` Pablo Neira Ayuso
0 siblings, 1 reply; 2+ messages in thread
From: Davidlohr Bueso @ 2021-10-10 18:24 UTC (permalink / raw)
To: pablo; +Cc: kadlec, fw, netfilter-devel, netdev, dave, Davidlohr Bueso
Keep the per-CPU memory allocated for chainstacks local.
Signed-off-by: Davidlohr Bueso <dbueso@suse.de>
---
net/bridge/netfilter/ebtables.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/net/bridge/netfilter/ebtables.c b/net/bridge/netfilter/ebtables.c
index 83d1798dfbb4..ba045f35114d 100644
--- a/net/bridge/netfilter/ebtables.c
+++ b/net/bridge/netfilter/ebtables.c
@@ -926,7 +926,9 @@ static int translate_table(struct net *net, const char *name,
return -ENOMEM;
for_each_possible_cpu(i) {
newinfo->chainstack[i] =
- vmalloc(array_size(udc_cnt, sizeof(*(newinfo->chainstack[0]))));
+ vmalloc_node(array_size(udc_cnt,
+ sizeof(*(newinfo->chainstack[0]))),
+ cpu_to_node(i));
if (!newinfo->chainstack[i]) {
while (i)
vfree(newinfo->chainstack[--i]);
--
2.26.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-10-17 22:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-10-10 18:24 [PATCH] netfilter: ebtables: allocate chainstack on CPU local nodes Davidlohr Bueso
2021-10-17 22:23 ` Pablo Neira Ayuso
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).