aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/netns/core.h
diff options
context:
space:
mode:
authorPavel Emelyanov <xemul@openvz.org>2008-03-31 22:42:16 -0400
committerDavid S. Miller <davem@davemloft.net>2008-03-31 22:42:16 -0400
commit70ee115942be6ce52ff10e5e813fb4da82cdb25a (patch)
treeaa3a22dfece765ead70df8f07974e398766b0104 /include/net/netns/core.h
parentc29a0bc4dfc4d833eb702b1929cec96a3eeb9f7a (diff)
[SOCK][NETNS]: Add the percpu prot_inuse counter in the struct net.
Such an accounting would cost us two more dereferences to get the percpu variable from the struct net, so I make sock_prot_inuse_get and _add calls work differently depending on CONFIG_NET_NS - without it old optimized routines are used. The per-cpu counter for init_net is prepared in core_initcall, so that even af_inet, that starts as fs_initcall, will already have the init_net prepared. Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/netns/core.h')
-rw-r--r--include/net/netns/core.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/net/netns/core.h b/include/net/netns/core.h
index 0e8c0f8435d..24d4be76bbd 100644
--- a/include/net/netns/core.h
+++ b/include/net/netns/core.h
@@ -2,12 +2,15 @@
2#define __NETNS_CORE_H__ 2#define __NETNS_CORE_H__
3 3
4struct ctl_table_header; 4struct ctl_table_header;
5struct prot_inuse;
5 6
6struct netns_core { 7struct netns_core {
7 /* core sysctls */ 8 /* core sysctls */
8 struct ctl_table_header *sysctl_hdr; 9 struct ctl_table_header *sysctl_hdr;
9 10
10 int sysctl_somaxconn; 11 int sysctl_somaxconn;
12
13 struct prot_inuse *inuse;
11}; 14};
12 15
13#endif 16#endif