aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjoern A. Zeeb <bz@FreeBSD.org>2008-08-18 13:16:19 +0000
committerBjoern A. Zeeb <bz@FreeBSD.org>2008-08-18 13:16:19 +0000
commitf125044552cbee139afb51aaba1041d79b06e9d4 (patch)
treeb9d7f78961d7cc008ba5a49b87928181be48d6da
parent59e6665b4fd8a32d7a56fc4a4fd5fb3e17ab1b18 (diff)
downloadsrc-f125044552cbee139afb51aaba1041d79b06e9d4.tar.gz
src-f125044552cbee139afb51aaba1041d79b06e9d4.zip
As part of step 1.5 of the vimage framework resolve conflicts with
file local static globals which would be folded onto the same name with the V_ macros. Reviewed by: kris, brooks, simon
Notes
Notes: svn path=/head/; revision=181832
-rw-r--r--sys/netinet6/in6_rmx.c38
-rw-r--r--sys/sys/vimage.h3
2 files changed, 22 insertions, 19 deletions
diff --git a/sys/netinet6/in6_rmx.c b/sys/netinet6/in6_rmx.c
index 88c4dec72596..6a719ca3777f 100644
--- a/sys/netinet6/in6_rmx.c
+++ b/sys/netinet6/in6_rmx.c
@@ -219,20 +219,20 @@ in6_matroute(void *v_arg, struct radix_node_head *head)
SYSCTL_DECL(_net_inet6_ip6);
-static int rtq_reallyold = 60*60;
+static int rtq_reallyold6 = 60*60;
/* one hour is ``really old'' */
SYSCTL_INT(_net_inet6_ip6, IPV6CTL_RTEXPIRE, rtexpire,
- CTLFLAG_RW, &rtq_reallyold , 0, "");
+ CTLFLAG_RW, &rtq_reallyold6 , 0, "");
-static int rtq_minreallyold = 10;
+static int rtq_minreallyold6 = 10;
/* never automatically crank down to less */
SYSCTL_INT(_net_inet6_ip6, IPV6CTL_RTMINEXPIRE, rtminexpire,
- CTLFLAG_RW, &rtq_minreallyold , 0, "");
+ CTLFLAG_RW, &rtq_minreallyold6 , 0, "");
-static int rtq_toomany = 128;
+static int rtq_toomany6 = 128;
/* 128 cached routes is ``too many'' */
SYSCTL_INT(_net_inet6_ip6, IPV6CTL_RTMAXCACHE, rtmaxcache,
- CTLFLAG_RW, &rtq_toomany , 0, "");
+ CTLFLAG_RW, &rtq_toomany6 , 0, "");
/*
@@ -257,12 +257,12 @@ in6_clsroute(struct radix_node *rn, struct radix_node_head *head)
/*
* As requested by David Greenman:
- * If rtq_reallyold is 0, just delete the route without
+ * If rtq_reallyold6 is 0, just delete the route without
* waiting for a timeout cycle to kill it.
*/
- if (V_rtq_reallyold != 0) {
+ if (V_rtq_reallyold6 != 0) {
rt->rt_flags |= RTPRF_OURS;
- rt->rt_rmx.rmx_expire = time_uptime + V_rtq_reallyold;
+ rt->rt_rmx.rmx_expire = time_uptime + V_rtq_reallyold6;
} else {
rtexpunge(rt);
}
@@ -281,7 +281,7 @@ struct rtqk_arg {
/*
* Get rid of old routes. When draining, this deletes everything, even when
* the timeout is not expired yet. When updating, this makes sure that
- * nothing has a timeout longer than the current value of rtq_reallyold.
+ * nothing has a timeout longer than the current value of rtq_reallyold6.
*/
static int
in6_rtqkill(struct radix_node *rn, void *rock)
@@ -309,9 +309,9 @@ in6_rtqkill(struct radix_node *rn, void *rock)
} else {
if (ap->updating
&& (rt->rt_rmx.rmx_expire - time_uptime
- > V_rtq_reallyold)) {
+ > V_rtq_reallyold6)) {
rt->rt_rmx.rmx_expire = time_uptime
- + V_rtq_reallyold;
+ + V_rtq_reallyold6;
}
ap->nextstop = lmin(ap->nextstop,
rt->rt_rmx.rmx_expire);
@@ -349,18 +349,18 @@ in6_rtqtimo(void *rock)
* than once in rtq_timeout6 seconds, to keep from cranking down too
* hard.
*/
- if ((arg.found - arg.killed > V_rtq_toomany)
+ if ((arg.found - arg.killed > V_rtq_toomany6)
&& (time_uptime - last_adjusted_timeout >= V_rtq_timeout6)
- && V_rtq_reallyold > V_rtq_minreallyold) {
- V_rtq_reallyold = 2*V_rtq_reallyold / 3;
- if (V_rtq_reallyold < V_rtq_minreallyold) {
- V_rtq_reallyold = V_rtq_minreallyold;
+ && V_rtq_reallyold6 > V_rtq_minreallyold6) {
+ V_rtq_reallyold6 = 2*V_rtq_reallyold6 / 3;
+ if (V_rtq_reallyold6 < V_rtq_minreallyold6) {
+ V_rtq_reallyold6 = V_rtq_minreallyold6;
}
last_adjusted_timeout = time_uptime;
#ifdef DIAGNOSTIC
- log(LOG_DEBUG, "in6_rtqtimo: adjusted rtq_reallyold to %d",
- V_rtq_reallyold);
+ log(LOG_DEBUG, "in6_rtqtimo: adjusted rtq_reallyold6 to %d",
+ V_rtq_reallyold6);
#endif
arg.found = arg.killed = 0;
arg.updating = 1;
diff --git a/sys/sys/vimage.h b/sys/sys/vimage.h
index e7bf23fc9018..864d5aaab4af 100644
--- a/sys/sys/vimage.h
+++ b/sys/sys/vimage.h
@@ -271,13 +271,16 @@
#define V_rsvp_on rsvp_on
#define V_rt_tables rt_tables
#define V_rtq_minreallyold rtq_minreallyold
+#define V_rtq_minreallyold6 rtq_minreallyold6
#define V_rtq_mtutimer rtq_mtutimer
#define V_rtq_reallyold rtq_reallyold
+#define V_rtq_reallyold6 rtq_reallyold6
#define V_rtq_timeout rtq_timeout
#define V_rtq_timeout6 rtq_timeout6
#define V_rtq_timer rtq_timer
#define V_rtq_timer6 rtq_timer6
#define V_rtq_toomany rtq_toomany
+#define V_rtq_toomany6 rtq_toomany6
#define V_rtstat rtstat
#define V_rttrash rttrash
#define V_sahtree sahtree