diff options
author | bz <bz@FreeBSD.org> | 2010-05-06 06:44:19 +0000 |
---|---|---|
committer | bz <bz@FreeBSD.org> | 2010-05-06 06:44:19 +0000 |
commit | 70e6f14e44387c54e20403484badf917d9b74589 (patch) | |
tree | 5305eacadb412df61b0d8de24da9051c2210f495 /sys/netinet6/in6_rmx.c | |
parent | 3e52c1f894aa8fc2b8031ef275b1fb830a25bb6f (diff) | |
download | FreeBSD-src-70e6f14e44387c54e20403484badf917d9b74589.zip FreeBSD-src-70e6f14e44387c54e20403484badf917d9b74589.tar.gz |
MFC r207369:
MFP4: @176978-176982, 176984, 176990-176994, 177441
"Whitspace" churn after the VIMAGE/VNET whirls.
Remove the need for some "init" functions within the network
stack, like pim6_init(), icmp_init() or significantly shorten
others like ip6_init() and nd6_init(), using static initialization
again where possible and formerly missed.
Move (most) variables back to the place they used to be before the
container structs and VIMAGE_GLOABLS (before r185088) and try to
reduce the diff to stable/7 and earlier as good as possible,
to help out-of-tree consumers to update from 6.x or 7.x to 8 or 9.
This also removes some header file pollution for putatively
static global variables.
Revert VIMAGE specific changes in ipfilter::ip_auth.c, that are
no longer needed.
Reviewed by: jhb
Discussed with: rwatson
Sponsored by: The FreeBSD Foundation
Sponsored by: CK Software GmbH
Diffstat (limited to 'sys/netinet6/in6_rmx.c')
-rw-r--r-- | sys/netinet6/in6_rmx.c | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/sys/netinet6/in6_rmx.c b/sys/netinet6/in6_rmx.c index 1ae04c3..8927a17 100644 --- a/sys/netinet6/in6_rmx.c +++ b/sys/netinet6/in6_rmx.c @@ -204,20 +204,21 @@ in6_matroute(void *v_arg, struct radix_node_head *head) SYSCTL_DECL(_net_inet6_ip6); -static VNET_DEFINE(int, rtq_reallyold6); -static VNET_DEFINE(int, rtq_minreallyold6); -static VNET_DEFINE(int, rtq_toomany6); - +static VNET_DEFINE(int, rtq_reallyold6) = 60*60; + /* one hour is ``really old'' */ #define V_rtq_reallyold6 VNET(rtq_reallyold6) -#define V_rtq_minreallyold6 VNET(rtq_minreallyold6) -#define V_rtq_toomany6 VNET(rtq_toomany6) - SYSCTL_VNET_INT(_net_inet6_ip6, IPV6CTL_RTEXPIRE, rtexpire, CTLFLAG_RW, &VNET_NAME(rtq_reallyold6) , 0, ""); +static VNET_DEFINE(int, rtq_minreallyold6) = 10; + /* never automatically crank down to less */ +#define V_rtq_minreallyold6 VNET(rtq_minreallyold6) SYSCTL_VNET_INT(_net_inet6_ip6, IPV6CTL_RTMINEXPIRE, rtminexpire, CTLFLAG_RW, &VNET_NAME(rtq_minreallyold6) , 0, ""); +static VNET_DEFINE(int, rtq_toomany6) = 128; + /* 128 cached routes is ``too many'' */ +#define V_rtq_toomany6 VNET(rtq_toomany6) SYSCTL_VNET_INT(_net_inet6_ip6, IPV6CTL_RTMAXCACHE, rtmaxcache, CTLFLAG_RW, &VNET_NAME(rtq_toomany6) , 0, ""); @@ -277,7 +278,7 @@ in6_rtqkill(struct radix_node *rn, void *rock) } #define RTQ_TIMEOUT 60*10 /* run no less than once every ten minutes */ -static VNET_DEFINE(int, rtq_timeout6); +static VNET_DEFINE(int, rtq_timeout6) = RTQ_TIMEOUT; static VNET_DEFINE(struct callout, rtq_timer6); #define V_rtq_timeout6 VNET(rtq_timeout6) @@ -346,7 +347,6 @@ struct mtuex_arg { struct radix_node_head *rnh; time_t nextstop; }; - static VNET_DEFINE(struct callout, rtq_mtutimer); #define V_rtq_mtutimer VNET(rtq_mtutimer) @@ -422,11 +422,6 @@ in6_inithead(void **head, int off) if (off == 0) /* See above */ return 1; /* only do the rest for the real thing */ - V_rtq_reallyold6 = 60*60; /* one hour is ``really old'' */ - V_rtq_minreallyold6 = 10; /* never automatically crank down to less */ - V_rtq_toomany6 = 128; /* 128 cached routes is ``too many'' */ - V_rtq_timeout6 = RTQ_TIMEOUT; - rnh = *head; KASSERT(rnh == rt_tables_get_rnh(0, AF_INET6), ("rnh?")); rnh->rnh_addaddr = in6_addroute; |