xfrm: make gc_thresh configurable in all namespaces
Subsystems (3)
v2 cover xfrm: make gc_thresh configurable in all namespaces
Changes from original version:
- remove unused xfrm4_fini() to avoid section mismatch
- don't mark xfrm6_net_ops as __net_initdata to avoid section mismatch
Michal Kubecek (2):
xfrm: remove unused xfrm4_policy_fini()
xfrm: make gc_thresh configurable in all namespaces
include/net/netns/ipv4.h | 1 + include/net/netns/ipv6.h | 1 + net/ipv4/xfrm4_policy.c | 58 ++++++++++++++++++++++++++++++++++++---------- net/ipv6/xfrm6_policy.c | 52 +++++++++++++++++++++++++++++++++++++---- 4 files changed, 95 insertions(+), 17 deletions(-)
Signature · 1 line
1.7.10.4
PATCH v2 1/2 xfrm: remove unused xfrm4_policy_fini()
Function xfrm4_policy_fini() is unused since xfrm4_fini() was removed in 2.6.11.
--- net/ipv4/xfrm4_policy.c | 9 --------- 1 file changed, 9 deletions(-)
net/ipv4/xfrm4_policy.c +0 -9
@@ -270,15 +270,6 @@ static void __init xfrm4_policy_init(void)xfrm_policy_register_afinfo (&xfrm4_policy_afinfo); } -static void __exit xfrm4_policy_fini(void) -{ -#ifdef CONFIG_SYSCTL -if (sysctl_hdr) -unregister_net_sysctl_table (sysctl_hdr); -#endif -xfrm_policy_unregister_afinfo (&xfrm4_policy_afinfo); -} -void __init xfrm4_init (void ) {dst_entries_init (&xfrm4_dst_ops);
Signature · 1 line
1.7.10.4
PATCH v2 2/2 xfrm: make gc_thresh configurable in all namespaces
In reply to Michal KubecekThe xfrm gc threshold can be configured via xfrm{4,6}_gc_thresh sysctl but currently only in init_net, other namespaces always use the default value. This can substantially limit the number of IPsec tunnels that can be effectively used.
--- include/net/netns/ipv4.h | 1 + include/net/netns/ipv6.h | 1 + net/ipv4/xfrm4_policy.c | 49 ++++++++++++++++++++++++++++++++++++++++--- net/ipv6/xfrm6_policy.c | 52 +++++++++++++++++++++++++++++++++++++++++----- 4 files changed, 95 insertions(+), 8 deletions(-)
include/net/netns/ipv4.h +1 -0
@@ -22,6 +22,7 @@ struct netns_ipv4 {struct ctl_table_header *frags_hdr;struct ctl_table_header *ipv4_hdr;struct ctl_table_header *route_hdr; +struct ctl_table_header *xfrm4_hdr;#endif struct ipv4_devconf *devconf_all;struct ipv4_devconf *devconf_dflt;
include/net/netns/ipv6.h +1 -0
@@ -16,6 +16,7 @@ struct netns_sysctl_ipv6 {struct ctl_table_header *route_hdr;struct ctl_table_header *icmp_hdr;struct ctl_table_header *frags_hdr; +struct ctl_table_header *xfrm6_hdr;#endif int bindv6only;int flush_delay;
net/ipv4/xfrm4_policy.c +46 -3
61 lines not on this page · raw message
net/ipv6/xfrm6_policy.c +47 -5
70 lines not on this page · raw message
Signature · 1 line
1.7.10.4
Quoted 8 lines · Michal Kubecek
Changes from original version:
- remove unused
xfrm4_fini()to avoid section mismatch
- don't markxfrm6_net_opsas__net_initdatato avoid section mismatchMichal Kubecek (2):
xfrm: remove unusedxfrm4_policy_fini()
xfrm: makegc_threshconfigurable in all namespaces
Applied to ipsec-next, thanks!