Skip to contentSkip to conversation

xfrm: make gc_thresh configurable in all namespaces

PATCH Applied Michal Kubecek 2 participants 4 messages Feb 6, 2013 – Feb 7, 2013

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

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
#1 lore raw

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
index 3be0ac2..0e28383 100644
@@ -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
#2 lore raw

PATCH v2 2/2 xfrm: make gc_thresh configurable in all namespaces

In reply to Michal Kubecek

The 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
index 9b78862..2ba9de8 100644
@@ -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
index 214cb0a..1242f37 100644
@@ -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
maintainer Applied
#3 lore raw
In reply to Michal Kubecek
Quoted 8 lines · Michal Kubecek

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

Applied to ipsec-next, thanks!