summaryrefslogtreecommitdiffstats
path: root/include/net/net_namespace.h
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2018-06-13 10:11:56 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-08-24 13:12:26 +0200
commita677cc36431f68c1208bfe288fa5f407c0114094 (patch)
tree34d2943d4ab25a5a22f403c776e10afed91040c0 /include/net/net_namespace.h
parent00fb7e1404725edced5d6f77b0333b94bdd3413e (diff)
downloadlinux-stable-a677cc36431f68c1208bfe288fa5f407c0114094.tar.gz
linux-stable-a677cc36431f68c1208bfe288fa5f407c0114094.tar.bz2
linux-stable-a677cc36431f68c1208bfe288fa5f407c0114094.zip
netfilter: ipv6: nf_defrag: reduce struct net memory waste
[ Upstream commit 9ce7bc036ae4cfe3393232c86e9e1fea2153c237 ] It is a waste of memory to use a full "struct netns_sysctl_ipv6" while only one pointer is really used, considering netns_sysctl_ipv6 keeps growing. Also, since "struct netns_frags" has cache line alignment, it is better to move the frags_hdr pointer outside, otherwise we spend a full cache line for this pointer. This saves 192 bytes of memory per netns. Fixes: c038a767cd69 ("ipv6: add a new namespace for nf_conntrack_reasm") Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> Signed-off-by: Sasha Levin <alexander.levin@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/net/net_namespace.h')
-rw-r--r--include/net/net_namespace.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/net/net_namespace.h b/include/net/net_namespace.h
index 23102da24dd9..c05db6ff2515 100644
--- a/include/net/net_namespace.h
+++ b/include/net/net_namespace.h
@@ -116,6 +116,7 @@ struct net {
#endif
#if IS_ENABLED(CONFIG_NF_DEFRAG_IPV6)
struct netns_nf_frag nf_frag;
+ struct ctl_table_header *nf_frag_frags_hdr;
#endif
struct sock *nfnl;
struct sock *nfnl_stash;