mirror of
https://github.com/FEX-Emu/linux.git
synced 2024-12-18 06:50:08 +00:00
70ee115942
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>
17 lines
237 B
C
17 lines
237 B
C
#ifndef __NETNS_CORE_H__
|
|
#define __NETNS_CORE_H__
|
|
|
|
struct ctl_table_header;
|
|
struct prot_inuse;
|
|
|
|
struct netns_core {
|
|
/* core sysctls */
|
|
struct ctl_table_header *sysctl_hdr;
|
|
|
|
int sysctl_somaxconn;
|
|
|
|
struct prot_inuse *inuse;
|
|
};
|
|
|
|
#endif
|