summaryrefslogtreecommitdiff
path: root/include/net
diff options
context:
space:
mode:
authorPaolo Abeni <pabeni@redhat.com>2023-02-17 15:28:49 +0300
committerDavid S. Miller <davem@davemloft.net>2023-02-20 14:22:54 +0300
commit50bcfe8df7c73ce51762f65d218b4ef0cc5da3ee (patch)
tree095c3d2d38e056301ab0d59842e38fa85e331d0f /include/net
parente469b6268d8cb7c6cf6b9cd5ce7f403de695627f (diff)
downloadlinux-50bcfe8df7c73ce51762f65d218b4ef0cc5da3ee.tar.xz
net: make default_rps_mask a per netns attribute
That really was meant to be a per netns attribute from the beginning. The idea is that once proper isolation is in place in the main namespace, additional demux in the child namespaces will be redundant. Let's make child netns default rps mask empty by default. To avoid bloating the netns with a possibly large cpumask, allocate it on-demand during the first write operation. Signed-off-by: Paolo Abeni <pabeni@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net')
-rw-r--r--include/net/netns/core.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/net/netns/core.h b/include/net/netns/core.h
index 8249060cf5d0..a91ef9f8de60 100644
--- a/include/net/netns/core.h
+++ b/include/net/netns/core.h
@@ -6,6 +6,7 @@
struct ctl_table_header;
struct prot_inuse;
+struct cpumask;
struct netns_core {
/* core sysctls */
@@ -17,6 +18,10 @@ struct netns_core {
#ifdef CONFIG_PROC_FS
struct prot_inuse __percpu *prot_inuse;
#endif
+
+#if IS_ENABLED(CONFIG_RPS) && IS_ENABLED(CONFIG_SYSCTL)
+ struct cpumask *rps_default_mask;
+#endif
};
#endif