svn commit: r194629 - head/sys/net
Bjoern A. Zeeb
bz at FreeBSD.org
Mon Jun 22 15:07:13 UTC 2009
Author: bz
Date: Mon Jun 22 15:07:12 2009
New Revision: 194629
URL: http://svn.freebsd.org/changeset/base/194629
Log:
Collect all VIMAGE_GLOBALS variables in one place.
No longer export rt_tables as all lookups go through
rt_tables_get_rnh().
We cannot make rt_tables (and rtstat, rttrash[1]) static as
netstat -r (-rs[1]) would stop working on a stripped
VIMAGE_GLOBALS kernel.
Reviewed by: zec
Presumably broken by: phk 13.5y ago in r12820 [1]
Modified:
head/sys/net/route.c
head/sys/net/route.h
Modified: head/sys/net/route.c
==============================================================================
--- head/sys/net/route.c Mon Jun 22 15:00:15 2009 (r194628)
+++ head/sys/net/route.c Mon Jun 22 15:07:12 2009 (r194629)
@@ -90,10 +90,10 @@ SYSCTL_INT(_net, OID_AUTO, add_addr_allf
TUNABLE_INT("net.add_addr_allfibs", &rt_add_addr_allfibs);
#ifdef VIMAGE_GLOBALS
-static struct rtstat rtstat;
-struct radix_node_head *rt_tables;
-
-static int rttrash; /* routes not in table but not freed */
+struct radix_node_head *rt_tables;
+static uma_zone_t rtzone; /* Routing table UMA zone. */
+int rttrash; /* routes not in table but not freed */
+struct rtstat rtstat;
#endif
static void rt_maskedcopy(struct sockaddr *,
@@ -129,10 +129,6 @@ static const vnet_modinfo_t vnet_rtable_
*/
#define RNTORT(p) ((struct rtentry *)(p))
-#ifdef VIMAGE_GLOBALS
-static uma_zone_t rtzone; /* Routing table UMA zone. */
-#endif
-
#if 0
/* default fib for tunnels to use */
u_int tunnel_fib = 0;
Modified: head/sys/net/route.h
==============================================================================
--- head/sys/net/route.h Mon Jun 22 15:00:15 2009 (r194628)
+++ head/sys/net/route.h Mon Jun 22 15:07:12 2009 (r194629)
@@ -373,7 +373,6 @@ struct rt_addrinfo {
} \
} while (0)
-extern struct radix_node_head *rt_tables;
struct radix_node_head *rt_tables_get_rnh(int, int);
struct ifmultiaddr;
More information about the svn-src-all
mailing list