kernel-ark/net/ipv6
Neil Horman a33bc5c151 xfrm: select sane defaults for xfrm[4|6] gc_thresh
Choose saner defaults for xfrm[4|6] gc_thresh values on init

Currently, the xfrm[4|6] code has hard-coded initial gc_thresh values
(set to 1024).  Given that the ipv4 and ipv6 routing caches are sized
dynamically at boot time, the static selections can be non-sensical.
This patch dynamically selects an appropriate gc threshold based on
the corresponding main routing table size, using the assumption that
we should in the worst case be able to handle as many connections as
the routing table can.

For ipv4, the maximum route cache size is 16 * the number of hash
buckets in the route cache.  Given that xfrm4 starts garbage
collection at the gc_thresh and prevents new allocations at 2 *
gc_thresh, we set gc_thresh to half the maximum route cache size.

For ipv6, its a bit trickier.  there is no maximum route cache size,
but the ipv6 dst_ops gc_thresh is statically set to 1024.  It seems
sane to select a simmilar gc_thresh for the xfrm6 code that is half
the number of hash buckets in the v6 route cache times 16 (like the v4
code does).

Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-07-30 18:52:15 -07:00
..
netfilter Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6 2009-06-11 16:00:49 +02:00
addrconf_core.c
addrconf.c IPv6: preferred lifetime of address not getting updated 2009-07-03 19:10:13 -07:00
addrlabel.c
af_inet6.c udpv6: Handle large incoming UDP/IPv6 packets and support software UFO 2009-07-12 14:29:29 -07:00
ah6.c ipv6: Use correct data types for ICMPv6 type and code 2009-06-23 04:31:07 -07:00
anycast.c
datagram.c
esp6.c ipv6: Use correct data types for ICMPv6 type and code 2009-06-23 04:31:07 -07:00
exthdrs_core.c
exthdrs.c net: skb->dst accessors 2009-06-03 02:51:04 -07:00
fib6_rules.c net: Remove unused parameter from fill method in fib_rules_ops. 2009-05-20 17:26:23 -07:00
icmp.c ipv6: Use correct data types for ICMPv6 type and code 2009-06-23 04:31:07 -07:00
inet6_connection_sock.c net: skb->dst accessors 2009-06-03 02:51:04 -07:00
inet6_hashtables.c ipv6: don't use tw net when accounting for recycled tw 2009-02-26 03:35:13 -08:00
ip6_fib.c xfrm: select sane defaults for xfrm[4|6] gc_thresh 2009-07-30 18:52:15 -07:00
ip6_flowlabel.c ipv6: Disallow rediculious flowlabel option sizes. 2009-02-06 00:49:55 -08:00
ip6_input.c ipv6: correct return on ipv6_rcv() packet drop 2009-07-06 18:07:55 -07:00
ip6_output.c Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2009-07-16 20:21:24 -07:00
ip6_tunnel.c net: use NETDEV_TX_OK instead of 0 in ndo_start_xmit() functions 2009-07-05 19:16:04 -07:00
ip6mr.c net: use NETDEV_TX_OK instead of 0 in ndo_start_xmit() functions 2009-07-05 19:16:04 -07:00
ipcomp6.c ipv6: Use correct data types for ICMPv6 type and code 2009-06-23 04:31:07 -07:00
ipv6_sockglue.c ipv6:remove useless check 2009-04-14 02:21:41 -07:00
Kconfig trivial: Kconfig: .ko is normally not included in module names 2009-06-12 18:01:50 +02:00
Makefile
mcast.c mcastv6: Local variable shadows function argument 2009-07-21 11:13:25 -07:00
mip6.c ipv6: Use correct data types for ICMPv6 type and code 2009-06-23 04:31:07 -07:00
ndisc.c net: skb->dst accessors 2009-06-03 02:51:04 -07:00
netfilter.c net: skb->dst accessors 2009-06-03 02:51:04 -07:00
proc.c snmp: add missing counters for RFC 4293 2009-04-27 02:45:02 -07:00
protocol.c
raw.c ipv6: Use correct data types for ICMPv6 type and code 2009-06-23 04:31:07 -07:00
reassembly.c ipv6: Use frag list abstraction interfaces. 2009-06-09 00:20:05 -07:00
route.c ipv6: Use correct data types for ICMPv6 type and code 2009-06-23 04:31:07 -07:00
sit.c Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2009-07-16 20:21:24 -07:00
syncookies.c syncookies: remove last_synq_overflow from struct tcp_sock 2009-04-20 02:25:26 -07:00
sysctl_net_ipv6.c remove lots of double-semicolons 2009-01-08 08:31:14 -08:00
tcp_ipv6.c tcp: Use correct peer adr when copying MD5 keys 2009-07-20 07:49:08 -07:00
tunnel6.c ipv6: Use correct data types for ICMPv6 type and code 2009-06-23 04:31:07 -07:00
udp_impl.h ipv6: Use correct data types for ICMPv6 type and code 2009-06-23 04:31:07 -07:00
udp.c udpv6: Handle large incoming UDP/IPv6 packets and support software UFO 2009-07-12 14:29:29 -07:00
udplite.c ipv6: Use correct data types for ICMPv6 type and code 2009-06-23 04:31:07 -07:00
xfrm6_input.c
xfrm6_mode_beet.c
xfrm6_mode_ro.c
xfrm6_mode_transport.c
xfrm6_mode_tunnel.c net: skb->dst accessors 2009-06-03 02:51:04 -07:00
xfrm6_output.c net: skb->dst accessors 2009-06-03 02:51:04 -07:00
xfrm6_policy.c xfrm: select sane defaults for xfrm[4|6] gc_thresh 2009-07-30 18:52:15 -07:00
xfrm6_state.c ipv6: fix sparse warning: Using plain integer as NULL pointer 2009-02-21 23:37:10 -08:00
xfrm6_tunnel.c ipv6: Use correct data types for ICMPv6 type and code 2009-06-23 04:31:07 -07:00