summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2010-11-22 19:32:54 +0000
committerDimitry Andric <dim@FreeBSD.org>2010-11-22 19:32:54 +0000
commit3e288e623846fab91d923dd651b263d4696fd814 (patch)
treeddc86814ee8f35466e619bb63b8f15b41185074e /sys
parent42298a2e4a7825de8a516c970761ac6e6562b0d9 (diff)
downloadsrc-test2-3e288e623846fab91d923dd651b263d4696fd814.tar.gz
src-test2-3e288e623846fab91d923dd651b263d4696fd814.zip
Notes
Diffstat (limited to 'sys')
-rw-r--r--sys/kern/kern_clock.c2
-rw-r--r--sys/kern/kern_clocksource.c2
-rw-r--r--sys/kern/sched_4bsd.c2
-rw-r--r--sys/kern/subr_pcpu.c2
-rw-r--r--sys/mips/mips/tick.c10
-rw-r--r--sys/mips/rmi/tick.c10
-rw-r--r--sys/net/flowtable.c22
-rw-r--r--sys/net/if.c2
-rw-r--r--sys/net/if_clone.c2
-rw-r--r--sys/net/if_ethersubr.c2
-rw-r--r--sys/net/if_gif.c8
-rw-r--r--sys/net/if_llatbl.c2
-rw-r--r--sys/net/if_loop.c4
-rw-r--r--sys/net/route.c2
-rw-r--r--sys/net/vnet.c2
-rw-r--r--sys/net/vnet.h22
-rw-r--r--sys/netgraph/ng_base.c6
-rw-r--r--sys/netgraph/ng_eiface.c2
-rw-r--r--sys/netgraph/ng_iface.c2
-rw-r--r--sys/netinet/if_ether.c10
-rw-r--r--sys/netinet/igmp.c26
-rw-r--r--sys/netinet/in.c4
-rw-r--r--sys/netinet/in_pcb.c2
-rw-r--r--sys/netinet/in_rmx.c10
-rw-r--r--sys/netinet/ip_divert.c4
-rw-r--r--sys/netinet/ip_fastfwd.c2
-rw-r--r--sys/netinet/ip_icmp.c20
-rw-r--r--sys/netinet/ip_input.c22
-rw-r--r--sys/netinet/ip_ipsec.c4
-rw-r--r--sys/netinet/ip_mroute.c36
-rw-r--r--sys/netinet/ipfw/ip_fw2.c4
-rw-r--r--sys/netinet/ipfw/ip_fw_dynamic.c30
-rw-r--r--sys/netinet/ipfw/ip_fw_nat.c2
-rw-r--r--sys/netinet/ipfw/ip_fw_pfil.c4
-rw-r--r--sys/netinet/siftr.c2
-rw-r--r--sys/netinet/tcp_hostcache.c4
-rw-r--r--sys/netinet/tcp_reass.c8
-rw-r--r--sys/netinet/tcp_subr.c14
-rw-r--r--sys/netinet/tcp_syncache.c6
-rw-r--r--sys/netinet/tcp_timewait.c4
-rw-r--r--sys/netinet/udp_usrreq.c2
-rw-r--r--sys/netinet6/frag6.c6
-rw-r--r--sys/netinet6/icmp6.c4
-rw-r--r--sys/netinet6/in6_rmx.c12
-rw-r--r--sys/netinet6/in6_src.c4
-rw-r--r--sys/netinet6/ip6_ipsec.c4
-rw-r--r--sys/netinet6/ip6_mroute.c6
-rw-r--r--sys/netinet6/mld6.c10
-rw-r--r--sys/netinet6/nd6.c6
-rw-r--r--sys/netinet6/nd6_nbr.c2
-rw-r--r--sys/netinet6/nd6_rtr.c2
-rw-r--r--sys/netinet6/scope6.c2
-rw-r--r--sys/netinet6/send.c2
-rw-r--r--sys/netipsec/key.c36
-rw-r--r--sys/netipsec/keysock.c2
-rw-r--r--sys/netipsec/xform_esp.c2
-rw-r--r--sys/powerpc/aim/clock.c2
-rw-r--r--sys/powerpc/booke/clock.c2
-rw-r--r--sys/sys/cdefs.h3
-rw-r--r--sys/sys/linker_set.h4
-rw-r--r--sys/sys/pcpu.h9
61 files changed, 220 insertions, 226 deletions
diff --git a/sys/kern/kern_clock.c b/sys/kern/kern_clock.c
index feef911dd8a4..1754f7bab0e0 100644
--- a/sys/kern/kern_clock.c
+++ b/sys/kern/kern_clock.c
@@ -373,7 +373,7 @@ int profprocs;
int ticks;
int psratio;
-STATIC_DPCPU_DEFINE(int, pcputicks); /* Per-CPU version of ticks. */
+static DPCPU_DEFINE(int, pcputicks); /* Per-CPU version of ticks. */
static int global_hardclock_run = 0;
/*
diff --git a/sys/kern/kern_clocksource.c b/sys/kern/kern_clocksource.c
index dad07d2ec7e4..ded6d642c1b6 100644
--- a/sys/kern/kern_clocksource.c
+++ b/sys/kern/kern_clocksource.c
@@ -135,7 +135,7 @@ struct pcpu_state {
int idle; /* This CPU is in idle mode. */
};
-STATIC_DPCPU_DEFINE(struct pcpu_state, timerstate);
+static DPCPU_DEFINE(struct pcpu_state, timerstate);
#define FREQ2BT(freq, bt) \
{ \
diff --git a/sys/kern/sched_4bsd.c b/sys/kern/sched_4bsd.c
index 6a403921d14e..9face648de93 100644
--- a/sys/kern/sched_4bsd.c
+++ b/sys/kern/sched_4bsd.c
@@ -161,7 +161,7 @@ struct pcpuidlestat {
u_int idlecalls;
u_int oldidlecalls;
};
-STATIC_DPCPU_DEFINE(struct pcpuidlestat, idlestat);
+static DPCPU_DEFINE(struct pcpuidlestat, idlestat);
static void
setup_runqs(void)
diff --git a/sys/kern/subr_pcpu.c b/sys/kern/subr_pcpu.c
index 4108441372c7..24a12ea67159 100644
--- a/sys/kern/subr_pcpu.c
+++ b/sys/kern/subr_pcpu.c
@@ -70,7 +70,7 @@ struct dpcpu_free {
TAILQ_ENTRY(dpcpu_free) df_link;
};
-STATIC_DPCPU_DEFINE(char, modspace[DPCPU_MODMIN]);
+static DPCPU_DEFINE(char, modspace[DPCPU_MODMIN]);
static TAILQ_HEAD(, dpcpu_free) dpcpu_head = TAILQ_HEAD_INITIALIZER(dpcpu_head);
static struct sx dpcpu_lock;
uintptr_t dpcpu_off[MAXCPU];
diff --git a/sys/mips/mips/tick.c b/sys/mips/mips/tick.c
index d0c3eaf743ac..125fe336c791 100644
--- a/sys/mips/mips/tick.c
+++ b/sys/mips/mips/tick.c
@@ -57,13 +57,13 @@ uint64_t counter_freq;
struct timecounter *platform_timecounter;
-STATIC_DPCPU_DEFINE(uint32_t, cycles_per_tick);
+static DPCPU_DEFINE(uint32_t, cycles_per_tick);
static uint32_t cycles_per_usec;
-STATIC_DPCPU_DEFINE(volatile uint32_t, counter_upper);
-STATIC_DPCPU_DEFINE(volatile uint32_t, counter_lower_last);
-STATIC_DPCPU_DEFINE(uint32_t, compare_ticks);
-STATIC_DPCPU_DEFINE(uint32_t, lost_ticks);
+static DPCPU_DEFINE(volatile uint32_t, counter_upper);
+static DPCPU_DEFINE(volatile uint32_t, counter_lower_last);
+static DPCPU_DEFINE(uint32_t, compare_ticks);
+static DPCPU_DEFINE(uint32_t, lost_ticks);
struct clock_softc {
int intr_rid;
diff --git a/sys/mips/rmi/tick.c b/sys/mips/rmi/tick.c
index 83ef30b7a818..3b83a5c78d63 100644
--- a/sys/mips/rmi/tick.c
+++ b/sys/mips/rmi/tick.c
@@ -59,13 +59,13 @@ uint64_t counter_freq;
struct timecounter *platform_timecounter;
-STATIC_DPCPU_DEFINE(uint32_t, cycles_per_tick);
+static DPCPU_DEFINE(uint32_t, cycles_per_tick);
static uint32_t cycles_per_usec;
-STATIC_DPCPU_DEFINE(volatile uint32_t, counter_upper);
-STATIC_DPCPU_DEFINE(volatile uint32_t, counter_lower_last);
-STATIC_DPCPU_DEFINE(uint32_t, compare_ticks);
-STATIC_DPCPU_DEFINE(uint32_t, lost_ticks);
+static DPCPU_DEFINE(volatile uint32_t, counter_upper);
+static DPCPU_DEFINE(volatile uint32_t, counter_lower_last);
+static DPCPU_DEFINE(uint32_t, compare_ticks);
+static DPCPU_DEFINE(uint32_t, lost_ticks);
struct clock_softc {
int intr_rid;
diff --git a/sys/net/flowtable.c b/sys/net/flowtable.c
index 8728cf3339da..49886709efb3 100644
--- a/sys/net/flowtable.c
+++ b/sys/net/flowtable.c
@@ -184,10 +184,10 @@ struct flowtable {
} __aligned(CACHE_LINE_SIZE);
static struct proc *flowcleanerproc;
-STATIC_VNET_DEFINE(struct flowtable *, flow_list_head);
-STATIC_VNET_DEFINE(uint32_t, flow_hashjitter);
-STATIC_VNET_DEFINE(uma_zone_t, flow_ipv4_zone);
-STATIC_VNET_DEFINE(uma_zone_t, flow_ipv6_zone);
+static VNET_DEFINE(struct flowtable *, flow_list_head);
+static VNET_DEFINE(uint32_t, flow_hashjitter);
+static VNET_DEFINE(uma_zone_t, flow_ipv4_zone);
+static VNET_DEFINE(uma_zone_t, flow_ipv6_zone);
#define V_flow_list_head VNET(flow_list_head)
#define V_flow_hashjitter VNET(flow_hashjitter)
@@ -230,13 +230,13 @@ do { \
* - idetach() cleanup for options VIMAGE builds.
*/
VNET_DEFINE(int, flowtable_enable) = 1;
-STATIC_VNET_DEFINE(int, flowtable_debug);
-STATIC_VNET_DEFINE(int, flowtable_syn_expire) = SYN_IDLE;
-STATIC_VNET_DEFINE(int, flowtable_udp_expire) = UDP_IDLE;
-STATIC_VNET_DEFINE(int, flowtable_fin_wait_expire) = FIN_WAIT_IDLE;
-STATIC_VNET_DEFINE(int, flowtable_tcp_expire) = TCP_IDLE;
-STATIC_VNET_DEFINE(int, flowtable_nmbflows);
-STATIC_VNET_DEFINE(int, flowtable_ready) = 0;
+static VNET_DEFINE(int, flowtable_debug);
+static VNET_DEFINE(int, flowtable_syn_expire) = SYN_IDLE;
+static VNET_DEFINE(int, flowtable_udp_expire) = UDP_IDLE;
+static VNET_DEFINE(int, flowtable_fin_wait_expire) = FIN_WAIT_IDLE;
+static VNET_DEFINE(int, flowtable_tcp_expire) = TCP_IDLE;
+static VNET_DEFINE(int, flowtable_nmbflows);
+static VNET_DEFINE(int, flowtable_ready) = 0;
#define V_flowtable_enable VNET(flowtable_enable)
#define V_flowtable_debug VNET(flowtable_debug)
diff --git a/sys/net/if.c b/sys/net/if.c
index 5720294acb6d..17f01e94bf9b 100644
--- a/sys/net/if.c
+++ b/sys/net/if.c
@@ -183,7 +183,7 @@ int ifqmaxlen = IFQ_MAXLEN;
VNET_DEFINE(struct ifnethead, ifnet); /* depend on static init XXX */
VNET_DEFINE(struct ifgrouphead, ifg_head);
-STATIC_VNET_DEFINE(int, if_indexlim) = 8;
+static VNET_DEFINE(int, if_indexlim) = 8;
/* Table of ifnet by index. */
VNET_DEFINE(struct ifindex_entry *, ifindex_table);
diff --git a/sys/net/if_clone.c b/sys/net/if_clone.c
index d07f517142e6..c02737bd4637 100644
--- a/sys/net/if_clone.c
+++ b/sys/net/if_clone.c
@@ -56,7 +56,7 @@ static int if_clone_createif(struct if_clone *ifc, char *name, size_t len,
caddr_t params);
static struct mtx if_cloners_mtx;
-STATIC_VNET_DEFINE(int, if_cloners_count);
+static VNET_DEFINE(int, if_cloners_count);
VNET_DEFINE(LIST_HEAD(, if_clone), if_cloners);
#define V_if_cloners_count VNET(if_cloners_count)
diff --git a/sys/net/if_ethersubr.c b/sys/net/if_ethersubr.c
index 0c48ff158463..5e5a548fb6d6 100644
--- a/sys/net/if_ethersubr.c
+++ b/sys/net/if_ethersubr.c
@@ -144,7 +144,7 @@ MALLOC_DEFINE(M_ARPCOM, "arpcom", "802.* interface internals");
#if defined(INET) || defined(INET6)
int
ether_ipfw_chk(struct mbuf **m0, struct ifnet *dst, int shared);
-STATIC_VNET_DEFINE(int, ether_ipfw);
+static VNET_DEFINE(int, ether_ipfw);
#define V_ether_ipfw VNET(ether_ipfw)
#endif
diff --git a/sys/net/if_gif.c b/sys/net/if_gif.c
index be71d600aef6..76838396bc44 100644
--- a/sys/net/if_gif.c
+++ b/sys/net/if_gif.c
@@ -94,7 +94,7 @@
*/
static struct mtx gif_mtx;
static MALLOC_DEFINE(M_GIF, "gif", "Generic Tunnel Interface");
-STATIC_VNET_DEFINE(LIST_HEAD(, gif_softc), gif_softc_list);
+static VNET_DEFINE(LIST_HEAD(, gif_softc), gif_softc_list);
#define V_gif_softc_list VNET(gif_softc_list)
void (*ng_gif_input_p)(struct ifnet *ifp, struct mbuf **mp, int af);
@@ -124,7 +124,7 @@ SYSCTL_NODE(_net_link, IFT_GIF, gif, CTLFLAG_RW, 0,
*/
#define MAX_GIF_NEST 1
#endif
-STATIC_VNET_DEFINE(int, max_gif_nesting) = MAX_GIF_NEST;
+static VNET_DEFINE(int, max_gif_nesting) = MAX_GIF_NEST;
#define V_max_gif_nesting VNET(max_gif_nesting)
SYSCTL_VNET_INT(_net_link_gif, OID_AUTO, max_nesting, CTLFLAG_RW,
&VNET_NAME(max_gif_nesting), 0, "Max nested tunnels");
@@ -135,9 +135,9 @@ SYSCTL_VNET_INT(_net_link_gif, OID_AUTO, max_nesting, CTLFLAG_RW,
* we allow control over this check here.
*/
#ifdef XBONEHACK
-STATIC_VNET_DEFINE(int, parallel_tunnels) = 1;
+static VNET_DEFINE(int, parallel_tunnels) = 1;
#else
-STATIC_VNET_DEFINE(int, parallel_tunnels) = 0;
+static VNET_DEFINE(int, parallel_tunnels) = 0;
#endif
#define V_parallel_tunnels VNET(parallel_tunnels)
SYSCTL_VNET_INT(_net_link_gif, OID_AUTO, parallel_tunnels, CTLFLAG_RW,
diff --git a/sys/net/if_llatbl.c b/sys/net/if_llatbl.c
index 7ccd81fd32c3..910d366059dc 100644
--- a/sys/net/if_llatbl.c
+++ b/sys/net/if_llatbl.c
@@ -62,7 +62,7 @@ __FBSDID("$FreeBSD$");
MALLOC_DEFINE(M_LLTABLE, "lltable", "link level address tables");
-STATIC_VNET_DEFINE(SLIST_HEAD(, lltable), lltables);
+static VNET_DEFINE(SLIST_HEAD(, lltable), lltables);
#define V_lltables VNET(lltables)
extern void arprequest(struct ifnet *, struct in_addr *, struct in_addr *,
diff --git a/sys/net/if_loop.c b/sys/net/if_loop.c
index 94d51c06942d..78d2de21e523 100644
--- a/sys/net/if_loop.c
+++ b/sys/net/if_loop.c
@@ -106,8 +106,8 @@ static void lo_clone_destroy(struct ifnet *);
VNET_DEFINE(struct ifnet *, loif); /* Used externally */
#ifdef VIMAGE
-STATIC_VNET_DEFINE(struct ifc_simple_data, lo_cloner_data);
-STATIC_VNET_DEFINE(struct if_clone, lo_cloner);
+static VNET_DEFINE(struct ifc_simple_data, lo_cloner_data);
+static VNET_DEFINE(struct if_clone, lo_cloner);
#define V_lo_cloner_data VNET(lo_cloner_data)
#define V_lo_cloner VNET(lo_cloner)
#endif
diff --git a/sys/net/route.c b/sys/net/route.c
index ae4b2ca2a741..5cb06e681b39 100644
--- a/sys/net/route.c
+++ b/sys/net/route.c
@@ -113,7 +113,7 @@ VNET_DEFINE(int, rttrash); /* routes not in table but not freed */
*/
#define RNTORT(p) ((struct rtentry *)(p))
-STATIC_VNET_DEFINE(uma_zone_t, rtzone); /* Routing table UMA zone. */
+static VNET_DEFINE(uma_zone_t, rtzone); /* Routing table UMA zone. */
#define V_rtzone VNET(rtzone)
#if 0
diff --git a/sys/net/vnet.c b/sys/net/vnet.c
index 3608fce72630..8fc52b227983 100644
--- a/sys/net/vnet.c
+++ b/sys/net/vnet.c
@@ -177,7 +177,7 @@ MALLOC_DEFINE(M_VNET_DATA, "vnet_data", "VNET data");
* Space to store virtualized global variables from loadable kernel modules,
* and the free list to manage it.
*/
-STATIC_VNET_DEFINE(char, modspace[VNET_MODMIN]);
+static VNET_DEFINE(char, modspace[VNET_MODMIN]);
/*
* Global lists of subsystem constructor and destructors for vnets. They are
diff --git a/sys/net/vnet.h b/sys/net/vnet.h
index beecd436d037..76123c7e4b88 100644
--- a/sys/net/vnet.h
+++ b/sys/net/vnet.h
@@ -95,7 +95,9 @@ struct vnet {
* Location of the kernel's 'set_vnet' linker set.
*/
extern uintptr_t *__start_set_vnet;
+__GLOBL(__start_set_vnet);
extern uintptr_t *__stop_set_vnet;
+__GLOBL(__stop_set_vnet);
#define VNET_START (uintptr_t)&__start_set_vnet
#define VNET_STOP (uintptr_t)&__stop_set_vnet
@@ -193,14 +195,9 @@ extern struct sx vnet_sxlock;
*/
#define VNET_NAME(n) vnet_entry_##n
#define VNET_DECLARE(t, n) extern t VNET_NAME(n)
-#define VNET_DEFINE(t, n) \
- __GLOBL("__start_" VNET_SETNAME); \
- __GLOBL("__stop_" VNET_SETNAME); \
- t VNET_NAME(n) __section(VNET_SETNAME) __used
-#define STATIC_VNET_DEFINE(t, n) \
- VNET_DEFINE(static t, n)
-#define _VNET_PTR(b, n) \
- (__typeof(VNET_NAME(n))*)((b) + (uintptr_t)&VNET_NAME(n))
+#define VNET_DEFINE(t, n) t VNET_NAME(n) __section(VNET_SETNAME) __used
+#define _VNET_PTR(b, n) (__typeof(VNET_NAME(n))*) \
+ ((b) + (uintptr_t)&VNET_NAME(n))
#define _VNET(b, n) (*_VNET_PTR(b, n))
@@ -374,11 +371,10 @@ do { \
* Versions of the VNET macros that compile to normal global variables and
* standard sysctl definitions.
*/
-#define VNET_NAME(n) n
-#define VNET_DECLARE(t, n) extern t n
-#define VNET_DEFINE(t, n) t n
-#define STATIC_VNET_DEFINE(t, n) static t n
-#define _VNET_PTR(b, n) &VNET_NAME(n)
+#define VNET_NAME(n) n
+#define VNET_DECLARE(t, n) extern t n
+#define VNET_DEFINE(t, n) t n
+#define _VNET_PTR(b, n) &VNET_NAME(n)
/*
* Virtualized global variable accessor macros.
diff --git a/sys/netgraph/ng_base.c b/sys/netgraph/ng_base.c
index a334ccc84b2b..dba6e75aa737 100644
--- a/sys/netgraph/ng_base.c
+++ b/sys/netgraph/ng_base.c
@@ -171,7 +171,7 @@ static struct mtx ng_typelist_mtx;
/* Hash related definitions */
/* XXX Don't need to initialise them because it's a LIST */
-STATIC_VNET_DEFINE(LIST_HEAD(, ng_node), ng_ID_hash[NG_ID_HASH_SIZE]);
+static VNET_DEFINE(LIST_HEAD(, ng_node), ng_ID_hash[NG_ID_HASH_SIZE]);
#define V_ng_ID_hash VNET(ng_ID_hash)
static struct mtx ng_idhash_mtx;
@@ -189,7 +189,7 @@ static struct mtx ng_idhash_mtx;
} \
} while (0)
-STATIC_VNET_DEFINE(LIST_HEAD(, ng_node), ng_name_hash[NG_NAME_HASH_SIZE]);
+static VNET_DEFINE(LIST_HEAD(, ng_node), ng_name_hash[NG_NAME_HASH_SIZE]);
#define V_ng_name_hash VNET(ng_name_hash)
static struct mtx ng_namehash_mtx;
@@ -359,7 +359,7 @@ ng_alloc_node(void)
#define TRAP_ERROR()
#endif
-STATIC_VNET_DEFINE(ng_ID_t, nextID) = 1;
+static VNET_DEFINE(ng_ID_t, nextID) = 1;
#define V_nextID VNET(nextID)
#ifdef INVARIANTS
diff --git a/sys/netgraph/ng_eiface.c b/sys/netgraph/ng_eiface.c
index 263ffc504710..58d3e5d3a4ce 100644
--- a/sys/netgraph/ng_eiface.c
+++ b/sys/netgraph/ng_eiface.c
@@ -114,7 +114,7 @@ static struct ng_type typestruct = {
};
NETGRAPH_INIT(eiface, &typestruct);
-STATIC_VNET_DEFINE(struct unrhdr *, ng_eiface_unit);
+static VNET_DEFINE(struct unrhdr *, ng_eiface_unit);
#define V_ng_eiface_unit VNET(ng_eiface_unit)
/************************************************************************
diff --git a/sys/netgraph/ng_iface.c b/sys/netgraph/ng_iface.c
index 9ea8e1323087..03ad016c2ab2 100644
--- a/sys/netgraph/ng_iface.c
+++ b/sys/netgraph/ng_iface.c
@@ -210,7 +210,7 @@ static struct ng_type typestruct = {
};
NETGRAPH_INIT(iface, &typestruct);
-STATIC_VNET_DEFINE(struct unrhdr *, ng_iface_unit);
+static VNET_DEFINE(struct unrhdr *, ng_iface_unit);
#define V_ng_iface_unit VNET(ng_iface_unit)
/************************************************************************
diff --git a/sys/netinet/if_ether.c b/sys/netinet/if_ether.c
index e8a03ef26087..ee5d8e05fb54 100644
--- a/sys/netinet/if_ether.c
+++ b/sys/netinet/if_ether.c
@@ -81,17 +81,17 @@ SYSCTL_NODE(_net_link_ether, PF_INET, inet, CTLFLAG_RW, 0, "");
SYSCTL_NODE(_net_link_ether, PF_ARP, arp, CTLFLAG_RW, 0, "");
/* timer values */
-STATIC_VNET_DEFINE(int, arpt_keep) = (20*60); /* once resolved, good for 20
+static VNET_DEFINE(int, arpt_keep) = (20*60); /* once resolved, good for 20
* minutes */
-STATIC_VNET_DEFINE(int, arp_maxtries) = 5;
+static VNET_DEFINE(int, arp_maxtries) = 5;
VNET_DEFINE(int, useloopback) = 1; /* use loopback interface for
* local traffic */
-STATIC_VNET_DEFINE(int, arp_proxyall) = 0;
-STATIC_VNET_DEFINE(int, arpt_down) = 20; /* keep incomplete entries for
+static VNET_DEFINE(int, arp_proxyall) = 0;
+static VNET_DEFINE(int, arpt_down) = 20; /* keep incomplete entries for
* 20 seconds */
VNET_DEFINE(struct arpstat, arpstat); /* ARP statistics, see if_arp.h */
-STATIC_VNET_DEFINE(int, arp_maxhold) = 1;
+static VNET_DEFINE(int, arp_maxhold) = 1;
#define V_arpt_keep VNET(arpt_keep)
#define V_arpt_down VNET(arpt_down)
diff --git a/sys/netinet/igmp.c b/sys/netinet/igmp.c
index fe4f160cac55..b02d30beb638 100644
--- a/sys/netinet/igmp.c
+++ b/sys/netinet/igmp.c
@@ -206,11 +206,11 @@ MALLOC_DEFINE(M_IGMP, "igmp", "igmp state");
* FUTURE: Stop using IFP_TO_IA/INADDR_ANY, and use source address selection
* policy to control the address used by IGMP on the link.
*/
-STATIC_VNET_DEFINE(int, interface_timers_running); /* IGMPv3 general
+static VNET_DEFINE(int, interface_timers_running); /* IGMPv3 general
* query response */
-STATIC_VNET_DEFINE(int, state_change_timers_running); /* IGMPv3 state-change
+static VNET_DEFINE(int, state_change_timers_running); /* IGMPv3 state-change
* retransmit */
-STATIC_VNET_DEFINE(int, current_state_timers_running); /* IGMPv1/v2 host
+static VNET_DEFINE(int, current_state_timers_running); /* IGMPv1/v2 host
* report; IGMPv3 g/sg
* query response */
@@ -218,24 +218,24 @@ STATIC_VNET_DEFINE(int, current_state_timers_running); /* IGMPv1/v2 host
#define V_state_change_timers_running VNET(state_change_timers_running)
#define V_current_state_timers_running VNET(current_state_timers_running)
-STATIC_VNET_DEFINE(LIST_HEAD(, igmp_ifinfo), igi_head);
-STATIC_VNET_DEFINE(struct igmpstat, igmpstat) = {
+static VNET_DEFINE(LIST_HEAD(, igmp_ifinfo), igi_head);
+static VNET_DEFINE(struct igmpstat, igmpstat) = {
.igps_version = IGPS_VERSION_3,
.igps_len = sizeof(struct igmpstat),
};
-STATIC_VNET_DEFINE(struct timeval, igmp_gsrdelay) = {10, 0};
+static VNET_DEFINE(struct timeval, igmp_gsrdelay) = {10, 0};
#define V_igi_head VNET(igi_head)
#define V_igmpstat VNET(igmpstat)
#define V_igmp_gsrdelay VNET(igmp_gsrdelay)
-STATIC_VNET_DEFINE(int, igmp_recvifkludge) = 1;
-STATIC_VNET_DEFINE(int, igmp_sendra) = 1;
-STATIC_VNET_DEFINE(int, igmp_sendlocal) = 1;
-STATIC_VNET_DEFINE(int, igmp_v1enable) = 1;
-STATIC_VNET_DEFINE(int, igmp_v2enable) = 1;
-STATIC_VNET_DEFINE(int, igmp_legacysupp);
-STATIC_VNET_DEFINE(int, igmp_default_version) = IGMP_VERSION_3;
+static VNET_DEFINE(int, igmp_recvifkludge) = 1;
+static VNET_DEFINE(int, igmp_sendra) = 1;
+static VNET_DEFINE(int, igmp_sendlocal) = 1;
+static VNET_DEFINE(int, igmp_v1enable) = 1;
+static VNET_DEFINE(int, igmp_v2enable) = 1;
+static VNET_DEFINE(int, igmp_legacysupp);
+static VNET_DEFINE(int, igmp_default_version) = IGMP_VERSION_3;
#define V_igmp_recvifkludge VNET(igmp_recvifkludge)
#define V_igmp_sendra VNET(igmp_sendra)
diff --git a/sys/netinet/in.c b/sys/netinet/in.c
index a7dcb86b7263..2ec54e29ede2 100644
--- a/sys/netinet/in.c
+++ b/sys/netinet/in.c
@@ -76,12 +76,12 @@ static int in_ifinit(struct ifnet *,
struct in_ifaddr *, struct sockaddr_in *, int);
static void in_purgemaddrs(struct ifnet *);
-STATIC_VNET_DEFINE(int, subnetsarelocal);
+static VNET_DEFINE(int, subnetsarelocal);
#define V_subnetsarelocal VNET(subnetsarelocal)
SYSCTL_VNET_INT(_net_inet_ip, OID_AUTO, subnets_are_local, CTLFLAG_RW,
&VNET_NAME(subnetsarelocal), 0,
"Treat all subnets as directly connected");
-STATIC_VNET_DEFINE(int, sameprefixcarponly);
+static VNET_DEFINE(int, sameprefixcarponly);
#define V_sameprefixcarponly VNET(sameprefixcarponly)
SYSCTL_VNET_INT(_net_inet_ip, OID_AUTO, same_prefix_carp_only, CTLFLAG_RW,
&VNET_NAME(sameprefixcarponly), 0,
diff --git a/sys/netinet/in_pcb.c b/sys/netinet/in_pcb.c
index 5153ae0e3bd7..be85af4b8c7d 100644
--- a/sys/netinet/in_pcb.c
+++ b/sys/netinet/in_pcb.c
@@ -108,7 +108,7 @@ VNET_DEFINE(int, ipport_randomcps) = 10; /* user controlled via sysctl */
VNET_DEFINE(int, ipport_randomtime) = 45; /* user controlled via sysctl */
VNET_DEFINE(int, ipport_stoprandom); /* toggled by ipport_tick */
VNET_DEFINE(int, ipport_tcpallocs);
-STATIC_VNET_DEFINE(int, ipport_tcplastcount);
+static VNET_DEFINE(int, ipport_tcplastcount);
#define V_ipport_tcplastcount VNET(ipport_tcplastcount)
diff --git a/sys/netinet/in_rmx.c b/sys/netinet/in_rmx.c
index 736a2ead8283..1389873eb802 100644
--- a/sys/netinet/in_rmx.c
+++ b/sys/netinet/in_rmx.c
@@ -132,21 +132,21 @@ in_matroute(void *v_arg, struct radix_node_head *head)
return rn;
}
-STATIC_VNET_DEFINE(int, rtq_reallyold) = 60*60; /* one hour is "really old" */
+static VNET_DEFINE(int, rtq_reallyold) = 60*60; /* one hour is "really old" */
#define V_rtq_reallyold VNET(rtq_reallyold)
SYSCTL_VNET_INT(_net_inet_ip, IPCTL_RTEXPIRE, rtexpire, CTLFLAG_RW,
&VNET_NAME(rtq_reallyold), 0,
"Default expiration time on dynamically learned routes");
/* never automatically crank down to less */
-STATIC_VNET_DEFINE(int, rtq_minreallyold) = 10;
+static VNET_DEFINE(int, rtq_minreallyold) = 10;
#define V_rtq_minreallyold VNET(rtq_minreallyold)
SYSCTL_VNET_INT(_net_inet_ip, IPCTL_RTMINEXPIRE, rtminexpire, CTLFLAG_RW,
&VNET_NAME(rtq_minreallyold), 0,
"Minimum time to attempt to hold onto dynamically learned routes");
/* 128 cached routes is "too many" */
-STATIC_VNET_DEFINE(int, rtq_toomany) = 128;
+static VNET_DEFINE(int, rtq_toomany) = 128;
#define V_rtq_toomany VNET(rtq_toomany)
SYSCTL_VNET_INT(_net_inet_ip, IPCTL_RTMAXCACHE, rtmaxcache, CTLFLAG_RW,
&VNET_NAME(rtq_toomany), 0,
@@ -240,8 +240,8 @@ in_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_timeout) = RTQ_TIMEOUT;
-STATIC_VNET_DEFINE(struct callout, rtq_timer);
+static VNET_DEFINE(int, rtq_timeout) = RTQ_TIMEOUT;
+static VNET_DEFINE(struct callout, rtq_timer);
#define V_rtq_timeout VNET(rtq_timeout)
#define V_rtq_timer VNET(rtq_timer)
diff --git a/sys/netinet/ip_divert.c b/sys/netinet/ip_divert.c
index 6d01f4fd408b..0837d2e25299 100644
--- a/sys/netinet/ip_divert.c
+++ b/sys/netinet/ip_divert.c
@@ -105,8 +105,8 @@ __FBSDID("$FreeBSD$");
*/
/* Internal variables. */
-STATIC_VNET_DEFINE(struct inpcbhead, divcb);
-STATIC_VNET_DEFINE(struct inpcbinfo, divcbinfo);
+static VNET_DEFINE(struct inpcbhead, divcb);
+static VNET_DEFINE(struct inpcbinfo, divcbinfo);
#define V_divcb VNET(divcb)
#define V_divcbinfo VNET(divcbinfo)
diff --git a/sys/netinet/ip_fastfwd.c b/sys/netinet/ip_fastfwd.c
index bf98537e6c95..03993930f033 100644
--- a/sys/netinet/ip_fastfwd.c
+++ b/sys/netinet/ip_fastfwd.c
@@ -106,7 +106,7 @@ __FBSDID("$FreeBSD$");
#include <machine/in_cksum.h>
-STATIC_VNET_DEFINE(int, ipfastforward_active);
+static VNET_DEFINE(int, ipfastforward_active);
#define V_ipfastforward_active VNET(ipfastforward_active)
SYSCTL_VNET_INT(_net_inet_ip, OID_AUTO, fastforwarding, CTLFLAG_RW,
diff --git a/sys/netinet/ip_icmp.c b/sys/netinet/ip_icmp.c
index 575010f3dde5..480a2c80db55 100644
--- a/sys/netinet/ip_icmp.c
+++ b/sys/netinet/ip_icmp.c
@@ -80,55 +80,55 @@ VNET_DEFINE(struct icmpstat, icmpstat);
SYSCTL_VNET_STRUCT(_net_inet_icmp, ICMPCTL_STATS, stats, CTLFLAG_RW,
&VNET_NAME(icmpstat), icmpstat, "");
-STATIC_VNET_DEFINE(int, icmpmaskrepl) = 0;
+static VNET_DEFINE(int, icmpmaskrepl) = 0;
#define V_icmpmaskrepl VNET(icmpmaskrepl)
SYSCTL_VNET_INT(_net_inet_icmp, ICMPCTL_MASKREPL, maskrepl, CTLFLAG_RW,
&VNET_NAME(icmpmaskrepl), 0,
"Reply to ICMP Address Mask Request packets.");
-STATIC_VNET_DEFINE(u_int, icmpmaskfake) = 0;
+static VNET_DEFINE(u_int, icmpmaskfake) = 0;
#define V_icmpmaskfake VNET(icmpmaskfake)
SYSCTL_VNET_UINT(_net_inet_icmp, OID_AUTO, maskfake, CTLFLAG_RW,
&VNET_NAME(icmpmaskfake), 0,
"Fake reply to ICMP Address Mask Request packets.");
-STATIC_VNET_DEFINE(int, drop_redirect) = 0;
+static VNET_DEFINE(int, drop_redirect) = 0;
#define V_drop_redirect VNET(drop_redirect)
SYSCTL_VNET_INT(_net_inet_icmp, OID_AUTO, drop_redirect, CTLFLAG_RW,
&VNET_NAME(drop_redirect), 0,
"Ignore ICMP redirects");
-STATIC_VNET_DEFINE(int, log_redirect) = 0;
+static VNET_DEFINE(int, log_redirect) = 0;
#define V_log_redirect VNET(log_redirect)
SYSCTL_VNET_INT(_net_inet_icmp, OID_AUTO, log_redirect, CTLFLAG_RW,
&VNET_NAME(log_redirect), 0,
"Log ICMP redirects to the console");
-STATIC_VNET_DEFINE(int, icmplim) = 200;
+static VNET_DEFINE(int, icmplim) = 200;
#define V_icmplim VNET(icmplim)
SYSCTL_VNET_INT(_net_inet_icmp, ICMPCTL_ICMPLIM, icmplim, CTLFLAG_RW,
&VNET_NAME(icmplim), 0,
"Maximum number of ICMP responses per second");
-STATIC_VNET_DEFINE(int, icmplim_output) = 1;
+static VNET_DEFINE(int, icmplim_output) = 1;
#define V_icmplim_output VNET(icmplim_output)
SYSCTL_VNET_INT(_net_inet_icmp, OID_AUTO, icmplim_output, CTLFLAG_RW,
&VNET_NAME(icmplim_output), 0,
"Enable rate limiting of ICMP responses");
-STATIC_VNET_DEFINE(char, reply_src[IFNAMSIZ]);
+static VNET_DEFINE(char, reply_src[IFNAMSIZ]);
#define V_reply_src VNET(reply_src)
SYSCTL_VNET_STRING(_net_inet_icmp, OID_AUTO, reply_src, CTLFLAG_RW,
&VNET_NAME(reply_src), IFNAMSIZ,
"icmp reply source for non-local packets.");
-STATIC_VNET_DEFINE(int, icmp_rfi) = 0;
+static VNET_DEFINE(int, icmp_rfi) = 0;
#define V_icmp_rfi VNET(icmp_rfi)
SYSCTL_VNET_INT(_net_inet_icmp, OID_AUTO, reply_from_interface, CTLFLAG_RW,
&VNET_NAME(icmp_rfi), 0,
"ICMP reply from incoming interface for non-local packets");
-STATIC_VNET_DEFINE(int, icmp_quotelen) = 8;
+static VNET_DEFINE(int, icmp_quotelen) = 8;
#define V_icmp_quotelen VNET(icmp_quotelen)
SYSCTL_VNET_INT(_net_inet_icmp, OID_AUTO, quotelen, CTLFLAG_RW,
&VNET_NAME(icmp_quotelen), 0,
@@ -137,7 +137,7 @@ SYSCTL_VNET_INT(_net_inet_icmp, OID_AUTO, quotelen, CTLFLAG_RW,
/*
* ICMP broadcast echo sysctl
*/
-STATIC_VNET_DEFINE(int, icmpbmcastecho) = 0;
+static VNET_DEFINE(int, icmpbmcastecho) = 0;
#define V_icmpbmcastecho VNET(icmpbmcastecho)
SYSCTL_VNET_INT(_net_inet_icmp, OID_AUTO, bmcastecho, CTLFLAG_RW,
&VNET_NAME(icmpbmcastecho), 0,
diff --git a/sys/netinet/ip_input.c b/sys/netinet/ip_input.c
index 109d3e3a6e35..6e1153d0b739 100644
--- a/sys/netinet/ip_input.c
+++ b/sys/netinet/ip_input.c
@@ -96,7 +96,7 @@ SYSCTL_VNET_INT(_net_inet_ip, IPCTL_FORWARDING, forwarding, CTLFLAG_RW,
&VNET_NAME(ipforwarding), 0,
"Enable IP forwarding between interfaces");
-STATIC_VNET_DEFINE(int, ipsendredirects) = 1; /* XXX */
+static VNET_DEFINE(int, ipsendredirects) = 1; /* XXX */
#define V_ipsendredirects VNET(ipsendredirects)
SYSCTL_VNET_INT(_net_inet_ip, IPCTL_SENDREDIRECTS, redirect, CTLFLAG_RW,
&VNET_NAME(ipsendredirects), 0,
@@ -107,13 +107,13 @@ SYSCTL_VNET_INT(_net_inet_ip, IPCTL_DEFTTL, ttl, CTLFLAG_RW,
&VNET_NAME(ip_defttl), 0,
"Maximum TTL on IP packets");
-STATIC_VNET_DEFINE(int, ip_keepfaith);
+static VNET_DEFINE(int, ip_keepfaith);
#define V_ip_keepfaith VNET(ip_keepfaith)
SYSCTL_VNET_INT(_net_inet_ip, IPCTL_KEEPFAITH, keepfaith, CTLFLAG_RW,
&VNET_NAME(ip_keepfaith), 0,
"Enable packet capture for FAITH IPv4->IPv6 translater daemon");
-STATIC_VNET_DEFINE(int, ip_sendsourcequench);
+static VNET_DEFINE(int, ip_sendsourcequench);
#define V_ip_sendsourcequench VNET(ip_sendsourcequench)
SYSCTL_VNET_INT(_net_inet_ip, OID_AUTO, sendsourcequench, CTLFLAG_RW,
&VNET_NAME(ip_sendsourcequench), 0,
@@ -137,7 +137,7 @@ SYSCTL_VNET_INT(_net_inet_ip, OID_AUTO, random_id, CTLFLAG_RW,
* to the loopback interface instead of the interface where the
* packets for those addresses are received.
*/
-STATIC_VNET_DEFINE(int, ip_checkinterface);
+static VNET_DEFINE(int, ip_checkinterface);
#define V_ip_checkinterface VNET(ip_checkinterface)
SYSCTL_VNET_INT(_net_inet_ip, OID_AUTO, check_interface, CTLFLAG_RW,
&VNET_NAME(ip_checkinterface), 0,
@@ -164,8 +164,8 @@ SYSCTL_VNET_STRUCT(_net_inet_ip, IPCTL_STATS, stats, CTLFLAG_RW,
&VNET_NAME(ipstat), ipstat,
"IP statistics (struct ipstat, netinet/ip_var.h)");
-STATIC_VNET_DEFINE(uma_zone_t, ipq_zone);
-STATIC_VNET_DEFINE(TAILQ_HEAD(ipqhead, ipq), ipq[IPREASS_NHASH]);
+static VNET_DEFINE(uma_zone_t, ipq_zone);
+static VNET_DEFINE(TAILQ_HEAD(ipqhead, ipq), ipq[IPREASS_NHASH]);
static struct mtx ipqlock;
#define V_ipq_zone VNET(ipq_zone)
@@ -180,15 +180,15 @@ static void maxnipq_update(void);
static void ipq_zone_change(void *);
static void ip_drain_locked(void);
-STATIC_VNET_DEFINE(int, maxnipq); /* Administrative limit on # reass queues. */
-STATIC_VNET_DEFINE(int, nipq); /* Total # of reass queues */
+static VNET_DEFINE(int, maxnipq); /* Administrative limit on # reass queues. */
+static VNET_DEFINE(int, nipq); /* Total # of reass queues */
#define V_maxnipq VNET(maxnipq)
#define V_nipq VNET(nipq)
SYSCTL_VNET_INT(_net_inet_ip, OID_AUTO, fragpackets, CTLFLAG_RD,
&VNET_NAME(nipq), 0,
"Current number of IPv4 fragment reassembly queue entries");
-STATIC_VNET_DEFINE(int, maxfragsperpacket);
+static VNET_DEFINE(int, maxfragsperpacket);
#define V_maxfragsperpacket VNET(maxfragsperpacket)
SYSCTL_VNET_INT(_net_inet_ip, OID_AUTO, maxfragsperpacket, CTLFLAG_RW,
&VNET_NAME(maxfragsperpacket), 0,
@@ -209,7 +209,7 @@ SYSCTL_VNET_INT(_net_inet_ip, OID_AUTO, stealth, CTLFLAG_RW,
#endif
#ifdef FLOWTABLE
-STATIC_VNET_DEFINE(int, ip_output_flowtable_size) = 2048;
+static VNET_DEFINE(int, ip_output_flowtable_size) = 2048;
VNET_DEFINE(struct flowtable *, ip_ft);
#define V_ip_output_flowtable_size VNET(ip_output_flowtable_size)
@@ -1719,7 +1719,7 @@ makedummy:
* locking. This code remains in ip_input.c as ip_mroute.c is optionally
* compiled.
*/
-STATIC_VNET_DEFINE(int, ip_rsvp_on);
+static VNET_DEFINE(int, ip_rsvp_on);
VNET_DEFINE(struct socket *, ip_rsvpd);
#define V_ip_rsvp_on VNET(ip_rsvp_on)
diff --git a/sys/netinet/ip_ipsec.c b/sys/netinet/ip_ipsec.c
index bdc55de185ff..50a6ce44a490 100644
--- a/sys/netinet/ip_ipsec.c
+++ b/sys/netinet/ip_ipsec.c
@@ -72,9 +72,9 @@ extern struct protosw inetsw[];
#ifdef IPSEC
#ifdef IPSEC_FILTERTUNNEL
-STATIC_VNET_DEFINE(int, ip4_ipsec_filtertunnel) = 1;
+static VNET_DEFINE(int, ip4_ipsec_filtertunnel) = 1;
#else
-STATIC_VNET_DEFINE(int, ip4_ipsec_filtertunnel) = 0;
+static VNET_DEFINE(int, ip4_ipsec_filtertunnel) = 0;
#endif
#define V_ip4_ipsec_filtertunnel VNET(ip4_ipsec_filtertunnel)
diff --git a/sys/netinet/ip_mroute.c b/sys/netinet/ip_mroute.c
index f6fd276c4eb1..8736caff811b 100644
--- a/sys/netinet/ip_mroute.c
+++ b/sys/netinet/ip_mroute.c
@@ -121,7 +121,7 @@ __FBSDID("$FreeBSD$");
#define VIFI_INVALID ((vifi_t) -1)
#define M_HASCL(m) ((m)->m_flags & M_EXT)
-STATIC_VNET_DEFINE(uint32_t, last_tv_sec); /* last time we processed this */
+static VNET_DEFINE(uint32_t, last_tv_sec); /* last time we processed this */
#define V_last_tv_sec VNET(last_tv_sec)
static MALLOC_DEFINE(M_MRTABLE, "mroutetbl", "multicast forwarding cache");
@@ -145,14 +145,14 @@ static struct mtx mrouter_mtx;
static int ip_mrouter_cnt; /* # of vnets with active mrouters */
static int ip_mrouter_unloading; /* Allow no more V_ip_mrouter sockets */
-STATIC_VNET_DEFINE(struct mrtstat, mrtstat);
+static VNET_DEFINE(struct mrtstat, mrtstat);
#define V_mrtstat VNET(mrtstat)
SYSCTL_VNET_STRUCT(_net_inet_ip, OID_AUTO, mrtstat, CTLFLAG_RW,
&VNET_NAME(mrtstat), mrtstat,
"IPv4 Multicast Forwarding Statistics (struct mrtstat, "
"netinet/ip_mroute.h)");
-STATIC_VNET_DEFINE(u_long, mfchash);
+static VNET_DEFINE(u_long, mfchash);
#define V_mfchash VNET(mfchash)
#define MFCHASH(a, g) \
((((a).s_addr >> 20) ^ ((a).s_addr >> 10) ^ (a).s_addr ^ \
@@ -160,9 +160,9 @@ STATIC_VNET_DEFINE(u_long, mfchash);
#define MFCHASHSIZE 256
static u_long mfchashsize; /* Hash size */
-STATIC_VNET_DEFINE(u_char *, nexpire); /* 0..mfchashsize-1 */
+static VNET_DEFINE(u_char *, nexpire); /* 0..mfchashsize-1 */
#define V_nexpire VNET(nexpire)
-STATIC_VNET_DEFINE(LIST_HEAD(mfchashhdr, mfc)*, mfchashtbl);
+static VNET_DEFINE(LIST_HEAD(mfchashhdr, mfc)*, mfchashtbl);
#define V_mfchashtbl VNET(mfchashtbl)
static struct mtx mfc_mtx;
@@ -173,9 +173,9 @@ static struct mtx mfc_mtx;
mtx_init(&mfc_mtx, "IPv4 multicast forwarding cache", NULL, MTX_DEF)
#define MFC_LOCK_DESTROY() mtx_destroy(&mfc_mtx)
-STATIC_VNET_DEFINE(vifi_t, numvifs);
+static VNET_DEFINE(vifi_t, numvifs);
#define V_numvifs VNET(numvifs)
-STATIC_VNET_DEFINE(struct vif, viftable[MAXVIFS]);
+static VNET_DEFINE(struct vif, viftable[MAXVIFS]);
#define V_viftable VNET(viftable)
SYSCTL_VNET_OPAQUE(_net_inet_ip, OID_AUTO, viftable, CTLFLAG_RD,
&VNET_NAME(viftable), sizeof(V_viftable), "S,vif[MAXVIFS]",
@@ -191,7 +191,7 @@ static struct mtx vif_mtx;
static eventhandler_tag if_detach_event_tag = NULL;
-STATIC_VNET_DEFINE(struct callout, expire_upcalls_ch);
+static VNET_DEFINE(struct callout, expire_upcalls_ch);
#define V_expire_upcalls_ch VNET(expire_upcalls_ch)
#define EXPIRE_TIMEOUT (hz / 4) /* 4x / second */
@@ -206,9 +206,9 @@ static MALLOC_DEFINE(M_BWMETER, "bwmeter", "multicast upcall bw meters");
* expiration time. Periodically, the entries are analysed and processed.
*/
#define BW_METER_BUCKETS 1024
-STATIC_VNET_DEFINE(struct bw_meter*, bw_meter_timers[BW_METER_BUCKETS]);
+static VNET_DEFINE(struct bw_meter*, bw_meter_timers[BW_METER_BUCKETS]);
#define V_bw_meter_timers VNET(bw_meter_timers)
-STATIC_VNET_DEFINE(struct callout, bw_meter_ch);
+static VNET_DEFINE(struct callout, bw_meter_ch);
#define V_bw_meter_ch VNET(bw_meter_ch)
#define BW_METER_PERIOD (hz) /* periodical handling of bw meters */
@@ -216,16 +216,16 @@ STATIC_VNET_DEFINE(struct callout, bw_meter_ch);
* Pending upcalls are stored in a vector which is flushed when
* full, or periodically
*/
-STATIC_VNET_DEFINE(struct bw_upcall, bw_upcalls[BW_UPCALLS_MAX]);
+static VNET_DEFINE(struct bw_upcall, bw_upcalls[BW_UPCALLS_MAX]);
#define V_bw_upcalls VNET(bw_upcalls)
-STATIC_VNET_DEFINE(u_int, bw_upcalls_n); /* # of pending upcalls */
+static VNET_DEFINE(u_int, bw_upcalls_n); /* # of pending upcalls */
#define V_bw_upcalls_n VNET(bw_upcalls_n)
-STATIC_VNET_DEFINE(struct callout, bw_upcalls_ch);
+static VNET_DEFINE(struct callout, bw_upcalls_ch);
#define V_bw_upcalls_ch VNET(bw_upcalls_ch)
#define BW_UPCALLS_PERIOD (hz) /* periodical flush of bw upcalls */
-STATIC_VNET_DEFINE(struct pimstat, pimstat);
+static VNET_DEFINE(struct pimstat, pimstat);
#define V_pimstat VNET(pimstat)
SYSCTL_NODE(_net_inet, IPPROTO_PIM, pim, CTLFLAG_RW, 0, "PIM");
@@ -296,9 +296,9 @@ static struct pim_encap_pimhdr pim_encap_pimhdr = {
0 /* flags */
};
-STATIC_VNET_DEFINE(vifi_t, reg_vif_num) = VIFI_INVALID;
+static VNET_DEFINE(vifi_t, reg_vif_num) = VIFI_INVALID;
#define V_reg_vif_num VNET(reg_vif_num)
-STATIC_VNET_DEFINE(struct ifnet, multicast_register_if);
+static VNET_DEFINE(struct ifnet, multicast_register_if);
#define V_multicast_register_if VNET(multicast_register_if)
/*
@@ -367,9 +367,9 @@ static const uint32_t mrt_api_support = (MRT_MFC_FLAGS_DISABLE_WRONGVIF |
MRT_MFC_FLAGS_BORDER_VIF |
MRT_MFC_RP |
MRT_MFC_BW_UPCALL);
-STATIC_VNET_DEFINE(uint32_t, mrt_api_config);
+static VNET_DEFINE(uint32_t, mrt_api_config);
#define V_mrt_api_config VNET(mrt_api_config)
-STATIC_VNET_DEFINE(int, pim_assert_enabled);
+static VNET_DEFINE(int, pim_assert_enabled);
#define V_pim_assert_enabled VNET(pim_assert_enabled)
static struct timeval pim_assert_interval = { 3, 0 }; /* Rate limit */
diff --git a/sys/netinet/ipfw/ip_fw2.c b/sys/netinet/ipfw/ip_fw2.c
index 53aa5d015d39..43b2d1114295 100644
--- a/sys/netinet/ipfw/ip_fw2.c
+++ b/sys/netinet/ipfw/ip_fw2.c
@@ -100,10 +100,10 @@ __FBSDID("$FreeBSD$");
*/
/* ipfw_vnet_ready controls when we are open for business */
-STATIC_VNET_DEFINE(int, ipfw_vnet_ready) = 0;
+static VNET_DEFINE(int, ipfw_vnet_ready) = 0;
#define V_ipfw_vnet_ready VNET(ipfw_vnet_ready)
-STATIC_VNET_DEFINE(int, fw_deny_unknown_exthdrs);
+static VNET_DEFINE(int, fw_deny_unknown_exthdrs);
#define V_fw_deny_unknown_exthdrs VNET(fw_deny_unknown_exthdrs)
#ifdef IPFIREWALL_DEFAULT_TO_ACCEPT
diff --git a/sys/netinet/ipfw/ip_fw_dynamic.c b/sys/netinet/ipfw/ip_fw_dynamic.c
index 33ff5b28807f..c8ea4b756cf5 100644
--- a/sys/netinet/ipfw/ip_fw_dynamic.c
+++ b/sys/netinet/ipfw/ip_fw_dynamic.c
@@ -118,10 +118,10 @@ __FBSDID("$FreeBSD$");
/*
* Static variables followed by global ones
*/
-STATIC_VNET_DEFINE(ipfw_dyn_rule **, ipfw_dyn_v);
-STATIC_VNET_DEFINE(u_int32_t, dyn_buckets);
-STATIC_VNET_DEFINE(u_int32_t, curr_dyn_buckets);
-STATIC_VNET_DEFINE(struct callout, ipfw_timeout);
+static VNET_DEFINE(ipfw_dyn_rule **, ipfw_dyn_v);
+static VNET_DEFINE(u_int32_t, dyn_buckets);
+static VNET_DEFINE(u_int32_t, curr_dyn_buckets);
+static VNET_DEFINE(struct callout, ipfw_timeout);
#define V_ipfw_dyn_v VNET(ipfw_dyn_v)
#define V_dyn_buckets VNET(dyn_buckets)
#define V_curr_dyn_buckets VNET(curr_dyn_buckets)
@@ -150,12 +150,12 @@ ipfw_dyn_unlock(void)
/*
* Timeouts for various events in handing dynamic rules.
*/
-STATIC_VNET_DEFINE(u_int32_t, dyn_ack_lifetime);
-STATIC_VNET_DEFINE(u_int32_t, dyn_syn_lifetime);
-STATIC_VNET_DEFINE(u_int32_t, dyn_fin_lifetime);
-STATIC_VNET_DEFINE(u_int32_t, dyn_rst_lifetime);
-STATIC_VNET_DEFINE(u_int32_t, dyn_udp_lifetime);
-STATIC_VNET_DEFINE(u_int32_t, dyn_short_lifetime);
+static VNET_DEFINE(u_int32_t, dyn_ack_lifetime);
+static VNET_DEFINE(u_int32_t, dyn_syn_lifetime);
+static VNET_DEFINE(u_int32_t, dyn_fin_lifetime);
+static VNET_DEFINE(u_int32_t, dyn_rst_lifetime);
+static VNET_DEFINE(u_int32_t, dyn_udp_lifetime);
+static VNET_DEFINE(u_int32_t, dyn_short_lifetime);
#define V_dyn_ack_lifetime VNET(dyn_ack_lifetime)
#define V_dyn_syn_lifetime VNET(dyn_syn_lifetime)
@@ -172,16 +172,16 @@ STATIC_VNET_DEFINE(u_int32_t, dyn_short_lifetime);
* than dyn_keepalive_period.
*/
-STATIC_VNET_DEFINE(u_int32_t, dyn_keepalive_interval);
-STATIC_VNET_DEFINE(u_int32_t, dyn_keepalive_period);
-STATIC_VNET_DEFINE(u_int32_t, dyn_keepalive);
+static VNET_DEFINE(u_int32_t, dyn_keepalive_interval);
+static VNET_DEFINE(u_int32_t, dyn_keepalive_period);
+static VNET_DEFINE(u_int32_t, dyn_keepalive);
#define V_dyn_keepalive_interval VNET(dyn_keepalive_interval)
#define V_dyn_keepalive_period VNET(dyn_keepalive_period)
#define V_dyn_keepalive VNET(dyn_keepalive)
-STATIC_VNET_DEFINE(u_int32_t, dyn_count); /* # of dynamic rules */
-STATIC_VNET_DEFINE(u_int32_t, dyn_max); /* max # of dynamic rules */
+static VNET_DEFINE(u_int32_t, dyn_count); /* # of dynamic rules */
+static VNET_DEFINE(u_int32_t, dyn_max); /* max # of dynamic rules */
#define V_dyn_count VNET(dyn_count)
#define V_dyn_max VNET(dyn_max)
diff --git a/sys/netinet/ipfw/ip_fw_nat.c b/sys/netinet/ipfw/ip_fw_nat.c
index 9fa860253ab1..6f223ed0de6f 100644
--- a/sys/netinet/ipfw/ip_fw_nat.c
+++ b/sys/netinet/ipfw/ip_fw_nat.c
@@ -52,7 +52,7 @@ __FBSDID("$FreeBSD$");
#include <machine/in_cksum.h> /* XXX for in_cksum */
-STATIC_VNET_DEFINE(eventhandler_tag, ifaddr_event_tag);
+static VNET_DEFINE(eventhandler_tag, ifaddr_event_tag);
#define V_ifaddr_event_tag VNET(ifaddr_event_tag)
static void
diff --git a/sys/netinet/ipfw/ip_fw_pfil.c b/sys/netinet/ipfw/ip_fw_pfil.c
index f15a9699a808..248e4dd8a754 100644
--- a/sys/netinet/ipfw/ip_fw_pfil.c
+++ b/sys/netinet/ipfw/ip_fw_pfil.c
@@ -63,11 +63,11 @@ __FBSDID("$FreeBSD$");
#include <machine/in_cksum.h>
-STATIC_VNET_DEFINE(int, fw_enable) = 1;
+static VNET_DEFINE(int, fw_enable) = 1;
#define V_fw_enable VNET(fw_enable)
#ifdef INET6
-STATIC_VNET_DEFINE(int, fw6_enable) = 1;
+static VNET_DEFINE(int, fw6_enable) = 1;
#define V_fw6_enable VNET(fw6_enable)
#endif
diff --git a/sys/netinet/siftr.c b/sys/netinet/siftr.c
index 79af9dc783fc..b5db11816e05 100644
--- a/sys/netinet/siftr.c
+++ b/sys/netinet/siftr.c
@@ -260,7 +260,7 @@ struct siftr_stats
uint32_t nskip_out_dejavu;
};
-STATIC_DPCPU_DEFINE(struct siftr_stats, ss);
+static DPCPU_DEFINE(struct siftr_stats, ss);
static volatile unsigned int siftr_exit_pkt_manager_thread = 0;
static unsigned int siftr_enabled = 0;
diff --git a/sys/netinet/tcp_hostcache.c b/sys/netinet/tcp_hostcache.c
index 3ba295e2b62b..d20adb7567d2 100644
--- a/sys/netinet/tcp_hostcache.c
+++ b/sys/netinet/tcp_hostcache.c
@@ -106,10 +106,10 @@ __FBSDID("$FreeBSD$");
#define TCP_HOSTCACHE_EXPIRE 60*60 /* one hour */
#define TCP_HOSTCACHE_PRUNE 5*60 /* every 5 minutes */
-STATIC_VNET_DEFINE(struct tcp_hostcache, tcp_hostcache);
+static VNET_DEFINE(struct tcp_hostcache, tcp_hostcache);
#define V_tcp_hostcache VNET(tcp_hostcache)
-STATIC_VNET_DEFINE(struct callout, tcp_hc_callout);
+static VNET_DEFINE(struct callout, tcp_hc_callout);
#define V_tcp_hc_callout VNET(tcp_hc_callout)
static struct hc_metrics *tcp_hc_lookup(struct in_conninfo *);
diff --git a/sys/netinet/tcp_reass.c b/sys/netinet/tcp_reass.c
index d430991fc2f8..442e3ca42505 100644
--- a/sys/netinet/tcp_reass.c
+++ b/sys/netinet/tcp_reass.c
@@ -80,25 +80,25 @@ static int tcp_reass_sysctl_qsize(SYSCTL_HANDLER_ARGS);
SYSCTL_NODE(_net_inet_tcp, OID_AUTO, reass, CTLFLAG_RW, 0,
"TCP Segment Reassembly Queue");
-STATIC_VNET_DEFINE(int, tcp_reass_maxseg) = 0;
+static VNET_DEFINE(int, tcp_reass_maxseg) = 0;
#define V_tcp_reass_maxseg VNET(tcp_reass_maxseg)
SYSCTL_VNET_PROC(_net_inet_tcp_reass, OID_AUTO, maxsegments, CTLFLAG_RDTUN,
&VNET_NAME(tcp_reass_maxseg), 0, &tcp_reass_sysctl_maxseg, "I",
"Global maximum number of TCP Segments in Reassembly Queue");
-STATIC_VNET_DEFINE(int, tcp_reass_qsize) = 0;
+static VNET_DEFINE(int, tcp_reass_qsize) = 0;
#define V_tcp_reass_qsize VNET(tcp_reass_qsize)
SYSCTL_VNET_PROC(_net_inet_tcp_reass, OID_AUTO, cursegments, CTLFLAG_RD,
&VNET_NAME(tcp_reass_qsize), 0, &tcp_reass_sysctl_qsize, "I",
"Global number of TCP Segments currently in Reassembly Queue");
-STATIC_VNET_DEFINE(int, tcp_reass_overflows) = 0;
+static VNET_DEFINE(int, tcp_reass_overflows) = 0;
#define V_tcp_reass_overflows VNET(tcp_reass_overflows)
SYSCTL_VNET_INT(_net_inet_tcp_reass, OID_AUTO, overflows, CTLFLAG_RD,
&VNET_NAME(tcp_reass_overflows), 0,
"Global number of TCP Segment Reassembly Queue Overflows");
-STATIC_VNET_DEFINE(uma_zone_t, tcp_reass_zone);
+static VNET_DEFINE(uma_zone_t, tcp_reass_zone);
#define V_tcp_reass_zone VNET(tcp_reass_zone)
/* Initialize TCP reassembly queue */
diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c
index eebc0232d01f..1407f14cc4c8 100644
--- a/sys/netinet/tcp_subr.c
+++ b/sys/netinet/tcp_subr.c
@@ -193,13 +193,13 @@ SYSCTL_INT(_net_inet_tcp, OID_AUTO, do_tcpdrain, CTLFLAG_RW, &do_tcpdrain, 0,
SYSCTL_VNET_INT(_net_inet_tcp, OID_AUTO, pcbcount, CTLFLAG_RD,
&VNET_NAME(tcbinfo.ipi_count), 0, "Number of active PCBs");
-STATIC_VNET_DEFINE(int, icmp_may_rst) = 1;
+static VNET_DEFINE(int, icmp_may_rst) = 1;
#define V_icmp_may_rst VNET(icmp_may_rst)
SYSCTL_VNET_INT(_net_inet_tcp, OID_AUTO, icmp_may_rst, CTLFLAG_RW,
&VNET_NAME(icmp_may_rst), 0,
"Certain ICMP unreachable messages may abort connections in SYN_SENT");
-STATIC_VNET_DEFINE(int, tcp_isn_reseed_interval) = 0;
+static VNET_DEFINE(int, tcp_isn_reseed_interval) = 0;
#define V_tcp_isn_reseed_interval VNET(tcp_isn_reseed_interval)
SYSCTL_VNET_INT(_net_inet_tcp, OID_AUTO, isn_reseed_interval, CTLFLAG_RW,
&VNET_NAME(tcp_isn_reseed_interval), 0,
@@ -241,7 +241,7 @@ struct tcpcb_mem {
struct cc_var ccv;
};
-STATIC_VNET_DEFINE(uma_zone_t, tcpcb_zone);
+static VNET_DEFINE(uma_zone_t, tcpcb_zone);
#define V_tcpcb_zone VNET(tcpcb_zone)
MALLOC_DEFINE(M_TCPLOG, "tcplog", "TCP address and flags print buffers");
@@ -1514,10 +1514,10 @@ tcp6_ctlinput(int cmd, struct sockaddr *sa, void *d)
#define ISN_STATIC_INCREMENT 4096
#define ISN_RANDOM_INCREMENT (4096 - 1)
-STATIC_VNET_DEFINE(u_char, isn_secret[32]);
-STATIC_VNET_DEFINE(int, isn_last_reseed);
-STATIC_VNET_DEFINE(u_int32_t, isn_offset);
-STATIC_VNET_DEFINE(u_int32_t, isn_offset_old);
+static VNET_DEFINE(u_char, isn_secret[32]);
+static VNET_DEFINE(int, isn_last_reseed);
+static VNET_DEFINE(u_int32_t, isn_offset);
+static VNET_DEFINE(u_int32_t, isn_offset_old);
#define V_isn_secret VNET(isn_secret)
#define V_isn_last_reseed VNET(isn_last_reseed)
diff --git a/sys/netinet/tcp_syncache.c b/sys/netinet/tcp_syncache.c
index 6d2cf2b25312..bf0fd18acba6 100644
--- a/sys/netinet/tcp_syncache.c
+++ b/sys/netinet/tcp_syncache.c
@@ -97,13 +97,13 @@ __FBSDID("$FreeBSD$");
#include <security/mac/mac_framework.h>
-STATIC_VNET_DEFINE(int, tcp_syncookies) = 1;
+static VNET_DEFINE(int, tcp_syncookies) = 1;
#define V_tcp_syncookies VNET(tcp_syncookies)
SYSCTL_VNET_INT(_net_inet_tcp, OID_AUTO, syncookies, CTLFLAG_RW,
&VNET_NAME(tcp_syncookies), 0,
"Use TCP SYN cookies if the syncache overflows");
-STATIC_VNET_DEFINE(int, tcp_syncookiesonly) = 0;
+static VNET_DEFINE(int, tcp_syncookiesonly) = 0;
#define V_tcp_syncookiesonly VNET(tcp_syncookiesonly)
SYSCTL_VNET_INT(_net_inet_tcp, OID_AUTO, syncookies_only, CTLFLAG_RW,
&VNET_NAME(tcp_syncookiesonly), 0,
@@ -143,7 +143,7 @@ static struct syncache
#define TCP_SYNCACHE_HASHSIZE 512
#define TCP_SYNCACHE_BUCKETLIMIT 30
-STATIC_VNET_DEFINE(struct tcp_syncache, tcp_syncache);
+static VNET_DEFINE(struct tcp_syncache, tcp_syncache);
#define V_tcp_syncache VNET(tcp_syncache)
SYSCTL_NODE(_net_inet_tcp, OID_AUTO, syncache, CTLFLAG_RW, 0, "TCP SYN cache");
diff --git a/sys/netinet/tcp_timewait.c b/sys/netinet/tcp_timewait.c
index 8a712d324cba..42df4fe94634 100644
--- a/sys/netinet/tcp_timewait.c
+++ b/sys/netinet/tcp_timewait.c
@@ -92,7 +92,7 @@ __FBSDID("$FreeBSD$");
#include <security/mac/mac_framework.h>
-STATIC_VNET_DEFINE(uma_zone_t, tcptw_zone);
+static VNET_DEFINE(uma_zone_t, tcptw_zone);
#define V_tcptw_zone VNET(tcptw_zone)
static int maxtcptw;
@@ -102,7 +102,7 @@ static int maxtcptw;
* queue pointers in each tcptw structure, are protected using the global
* tcbinfo lock, which must be held over queue iteration and modification.
*/
-STATIC_VNET_DEFINE(TAILQ_HEAD(, tcptw), twq_2msl);
+static VNET_DEFINE(TAILQ_HEAD(, tcptw), twq_2msl);
#define V_twq_2msl VNET(twq_2msl)
static void tcp_tw_2msl_reset(struct tcptw *, int);
diff --git a/sys/netinet/udp_usrreq.c b/sys/netinet/udp_usrreq.c
index 511e0a36f025..adb11c4ea804 100644
--- a/sys/netinet/udp_usrreq.c
+++ b/sys/netinet/udp_usrreq.c
@@ -131,7 +131,7 @@ SYSCTL_ULONG(_net_inet_udp, UDPCTL_RECVSPACE, recvspace, CTLFLAG_RW,
VNET_DEFINE(struct inpcbhead, udb); /* from udp_var.h */
VNET_DEFINE(struct inpcbinfo, udbinfo);
-STATIC_VNET_DEFINE(uma_zone_t, udpcb_zone);
+static VNET_DEFINE(uma_zone_t, udpcb_zone);
#define V_udpcb_zone VNET(udpcb_zone)
#ifndef UDBHASHSIZE
diff --git a/sys/netinet6/frag6.c b/sys/netinet6/frag6.c
index 59b5d44af1e8..1523133d3db7 100644
--- a/sys/netinet6/frag6.c
+++ b/sys/netinet6/frag6.c
@@ -75,9 +75,9 @@ static struct mtx ip6qlock;
/*
* These fields all protected by ip6qlock.
*/
-STATIC_VNET_DEFINE(u_int, frag6_nfragpackets);
-STATIC_VNET_DEFINE(u_int, frag6_nfrags);
-STATIC_VNET_DEFINE(struct ip6q, ip6q); /* ip6 reassemble queue */
+static VNET_DEFINE(u_int, frag6_nfragpackets);
+static VNET_DEFINE(u_int, frag6_nfrags);
+static VNET_DEFINE(struct ip6q, ip6q); /* ip6 reassemble queue */
#define V_frag6_nfragpackets VNET(frag6_nfragpackets)
#define V_frag6_nfrags VNET(frag6_nfrags)
diff --git a/sys/netinet6/icmp6.c b/sys/netinet6/icmp6.c
index 85b88aa824a2..952b38acf856 100644
--- a/sys/netinet6/icmp6.c
+++ b/sys/netinet6/icmp6.c
@@ -119,8 +119,8 @@ VNET_DEFINE(struct icmp6stat, icmp6stat);
VNET_DECLARE(struct inpcbinfo, ripcbinfo);
VNET_DECLARE(struct inpcbhead, ripcb);
VNET_DECLARE(int, icmp6errppslim);
-STATIC_VNET_DEFINE(int, icmp6errpps_count) = 0;
-STATIC_VNET_DEFINE(struct timeval, icmp6errppslim_last);
+static VNET_DEFINE(int, icmp6errpps_count) = 0;
+static VNET_DEFINE(struct timeval, icmp6errppslim_last);
VNET_DECLARE(int, icmp6_nodeinfo);
#define V_ripcbinfo VNET(ripcbinfo)
diff --git a/sys/netinet6/in6_rmx.c b/sys/netinet6/in6_rmx.c
index 4ae0d475dc24..2a1364673b31 100644
--- a/sys/netinet6/in6_rmx.c
+++ b/sys/netinet6/in6_rmx.c
@@ -206,19 +206,19 @@ in6_matroute(void *v_arg, struct radix_node_head *head)
SYSCTL_DECL(_net_inet6_ip6);
-STATIC_VNET_DEFINE(int, rtq_reallyold6) = 60*60;
+static VNET_DEFINE(int, rtq_reallyold6) = 60*60;
/* one hour is ``really old'' */
#define V_rtq_reallyold6 VNET(rtq_reallyold6)
SYSCTL_VNET_INT(_net_inet6_ip6, IPV6CTL_RTEXPIRE, rtexpire, CTLFLAG_RW,
&VNET_NAME(rtq_reallyold6) , 0, "");
-STATIC_VNET_DEFINE(int, rtq_minreallyold6) = 10;
+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;
+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,
@@ -280,8 +280,8 @@ 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) = RTQ_TIMEOUT;
-STATIC_VNET_DEFINE(struct callout, rtq_timer6);
+static VNET_DEFINE(int, rtq_timeout6) = RTQ_TIMEOUT;
+static VNET_DEFINE(struct callout, rtq_timer6);
#define V_rtq_timeout6 VNET(rtq_timeout6)
#define V_rtq_timer6 VNET(rtq_timer6)
@@ -349,7 +349,7 @@ struct mtuex_arg {
struct radix_node_head *rnh;
time_t nextstop;
};
-STATIC_VNET_DEFINE(struct callout, rtq_mtutimer);
+static VNET_DEFINE(struct callout, rtq_mtutimer);
#define V_rtq_mtutimer VNET(rtq_mtutimer)
static int
diff --git a/sys/netinet6/in6_src.c b/sys/netinet6/in6_src.c
index 8b1a3fdc3d4e..49bc715452a9 100644
--- a/sys/netinet6/in6_src.c
+++ b/sys/netinet6/in6_src.c
@@ -122,7 +122,7 @@ static struct sx addrsel_sxlock;
#define ADDRSEL_XUNLOCK() sx_xunlock(&addrsel_sxlock)
#define ADDR_LABEL_NOTAPP (-1)
-STATIC_VNET_DEFINE(struct in6_addrpolicy, defaultaddrpolicy);
+static VNET_DEFINE(struct in6_addrpolicy, defaultaddrpolicy);
#define V_defaultaddrpolicy VNET(defaultaddrpolicy)
VNET_DEFINE(int, ip6_prefer_tempaddr) = 0;
@@ -1053,7 +1053,7 @@ struct addrsel_policyent {
TAILQ_HEAD(addrsel_policyhead, addrsel_policyent);
-STATIC_VNET_DEFINE(struct addrsel_policyhead, addrsel_policytab);
+static VNET_DEFINE(struct addrsel_policyhead, addrsel_policytab);
#define V_addrsel_policytab VNET(addrsel_policytab)
static void
diff --git a/sys/netinet6/ip6_ipsec.c b/sys/netinet6/ip6_ipsec.c
index 63e46fe34494..96b09ef8b4c9 100644
--- a/sys/netinet6/ip6_ipsec.c
+++ b/sys/netinet6/ip6_ipsec.c
@@ -80,9 +80,9 @@ extern struct protosw inet6sw[];
#ifdef INET6
#ifdef IPSEC
#ifdef IPSEC_FILTERTUNNEL
-STATIC_VNET_DEFINE(int, ip6_ipsec6_filtertunnel) = 1;
+static VNET_DEFINE(int, ip6_ipsec6_filtertunnel) = 1;
#else
-STATIC_VNET_DEFINE(int, ip6_ipsec6_filtertunnel) = 0;
+static VNET_DEFINE(int, ip6_ipsec6_filtertunnel) = 0;
#endif
#define V_ip6_ipsec6_filtertunnel VNET(ip6_ipsec6_filtertunnel)
diff --git a/sys/netinet6/ip6_mroute.c b/sys/netinet6/ip6_mroute.c
index 23d3a281fc22..0c1ff78bbdaf 100644
--- a/sys/netinet6/ip6_mroute.c
+++ b/sys/netinet6/ip6_mroute.c
@@ -151,7 +151,7 @@ static const struct ip6protosw in6_pim_protosw = {
};
static int pim6_encapcheck(const struct mbuf *, int, int, void *);
-STATIC_VNET_DEFINE(int, ip6_mrouter_ver) = 0;
+static VNET_DEFINE(int, ip6_mrouter_ver) = 0;
#define V_ip6_mrouter_ver VNET(ip6_mrouter_ver)
SYSCTL_DECL(_net_inet6);
@@ -210,7 +210,7 @@ static struct mtx mif6_mtx;
#define MIF6_LOCK_DESTROY() mtx_destroy(&mif6_mtx)
#ifdef MRT6DEBUG
-STATIC_VNET_DEFINE(u_int, mrt6debug) = 0; /* debug level */
+static VNET_DEFINE(u_int, mrt6debug) = 0; /* debug level */
#define V_mrt6debug VNET(mrt6debug)
#define DEBUG_MFC 0x02
#define DEBUG_FORWARD 0x04
@@ -254,7 +254,7 @@ SYSCTL_STRUCT(_net_inet6_pim, PIM6CTL_STATS, stats, CTLFLAG_RD,
&pim6stat, pim6stat,
"PIM Statistics (struct pim6stat, netinet6/pim_var.h)");
-STATIC_VNET_DEFINE(int, pim6);
+static VNET_DEFINE(int, pim6);
#define V_pim6 VNET(pim6)
/*
diff --git a/sys/netinet6/mld6.c b/sys/netinet6/mld6.c
index ce5d6118749f..21d9eabe363b 100644
--- a/sys/netinet6/mld6.c
+++ b/sys/netinet6/mld6.c
@@ -203,11 +203,11 @@ MALLOC_DEFINE(M_MLD, "mld", "mld state");
/*
* VIMAGE-wide globals.
*/
-STATIC_VNET_DEFINE(struct timeval, mld_gsrdelay) = {10, 0};
-STATIC_VNET_DEFINE(LIST_HEAD(, mld_ifinfo), mli_head);
-STATIC_VNET_DEFINE(int, interface_timers_running6);
-STATIC_VNET_DEFINE(int, state_change_timers_running6);
-STATIC_VNET_DEFINE(int, current_state_timers_running6);
+static VNET_DEFINE(struct timeval, mld_gsrdelay) = {10, 0};
+static VNET_DEFINE(LIST_HEAD(, mld_ifinfo), mli_head);
+static VNET_DEFINE(int, interface_timers_running6);
+static VNET_DEFINE(int, state_change_timers_running6);
+static VNET_DEFINE(int, current_state_timers_running6);
#define V_mld_gsrdelay VNET(mld_gsrdelay)
#define V_mli_head VNET(mli_head)
diff --git a/sys/netinet6/nd6.c b/sys/netinet6/nd6.c
index f07e47f3f345..b22a3730d05d 100644
--- a/sys/netinet6/nd6.c
+++ b/sys/netinet6/nd6.c
@@ -94,11 +94,11 @@ VNET_DEFINE(int, nd6_gctimer) = (60 * 60 * 24); /* 1 day: garbage
* collection timer */
/* preventing too many loops in ND option parsing */
-STATIC_VNET_DEFINE(int, nd6_maxndopt) = 10; /* max # of ND options allowed */
+static VNET_DEFINE(int, nd6_maxndopt) = 10; /* max # of ND options allowed */
VNET_DEFINE(int, nd6_maxnudhint) = 0; /* max # of subsequent upper
* layer hints */
-STATIC_VNET_DEFINE(int, nd6_maxqueuelen) = 1; /* max pkts cached in unresolved
+static VNET_DEFINE(int, nd6_maxqueuelen) = 1; /* max pkts cached in unresolved
* ND entries */
#define V_nd6_maxndopt VNET(nd6_maxndopt)
#define V_nd6_maxqueuelen VNET(nd6_maxqueuelen)
@@ -133,7 +133,7 @@ static struct llentry *nd6_free(struct llentry *, int);
static void nd6_llinfo_timer(void *);
static void clear_llinfo_pqueue(struct llentry *);
-STATIC_VNET_DEFINE(struct callout, nd6_slowtimo_ch);
+static VNET_DEFINE(struct callout, nd6_slowtimo_ch);
#define V_nd6_slowtimo_ch VNET(nd6_slowtimo_ch)
VNET_DEFINE(struct callout, nd6_timer_ch);
diff --git a/sys/netinet6/nd6_nbr.c b/sys/netinet6/nd6_nbr.c
index 538185418d6e..548cc8c153dd 100644
--- a/sys/netinet6/nd6_nbr.c
+++ b/sys/netinet6/nd6_nbr.c
@@ -1141,7 +1141,7 @@ struct dadq {
struct vnet *dad_vnet;
};
-STATIC_VNET_DEFINE(TAILQ_HEAD(, dadq), dadq);
+static VNET_DEFINE(TAILQ_HEAD(, dadq), dadq);
VNET_DEFINE(int, dad_init) = 0;
#define V_dadq VNET(dadq)
#define V_dad_init VNET(dad_init)
diff --git a/sys/netinet6/nd6_rtr.c b/sys/netinet6/nd6_rtr.c
index f19ef927291f..19ec989fb22d 100644
--- a/sys/netinet6/nd6_rtr.c
+++ b/sys/netinet6/nd6_rtr.c
@@ -89,7 +89,7 @@ static int rt6_deleteroute(struct radix_node *, void *);
VNET_DECLARE(int, nd6_recalc_reachtm_interval);
#define V_nd6_recalc_reachtm_interval VNET(nd6_recalc_reachtm_interval)
-STATIC_VNET_DEFINE(struct ifnet *, nd6_defifp);
+static VNET_DEFINE(struct ifnet *, nd6_defifp);
VNET_DEFINE(int, nd6_defifindex);
#define V_nd6_defifp VNET(nd6_defifp)
diff --git a/sys/netinet6/scope6.c b/sys/netinet6/scope6.c
index 0f0cf29174b9..8189d87c5bcd 100644
--- a/sys/netinet6/scope6.c
+++ b/sys/netinet6/scope6.c
@@ -66,7 +66,7 @@ static struct mtx scope6_lock;
#define SCOPE6_UNLOCK() mtx_unlock(&scope6_lock)
#define SCOPE6_LOCK_ASSERT() mtx_assert(&scope6_lock, MA_OWNED)
-STATIC_VNET_DEFINE(struct scope6_id, sid_default);
+static VNET_DEFINE(struct scope6_id, sid_default);
#define V_sid_default VNET(sid_default)
#define SID(ifp) \
diff --git a/sys/netinet6/send.c b/sys/netinet6/send.c
index baf7f4c54c26..71d88d07a8a8 100644
--- a/sys/netinet6/send.c
+++ b/sys/netinet6/send.c
@@ -60,7 +60,7 @@ MALLOC_DEFINE(M_SEND, "send", "Secure Neighbour Discovery");
/*
* The socket used to communicate with the SeND daemon.
*/
-STATIC_VNET_DEFINE(struct socket *, send_so);
+static VNET_DEFINE(struct socket *, send_so);
#define V_send_so VNET(send_so)
u_long send_sendspace = 8 * (1024 + sizeof(struct sockaddr_send));
diff --git a/sys/netipsec/key.c b/sys/netipsec/key.c
index 869ad7444ad2..e57eb4432bbc 100644
--- a/sys/netipsec/key.c
+++ b/sys/netipsec/key.c
@@ -113,20 +113,20 @@
*/
VNET_DEFINE(u_int32_t, key_debug_level) = 0;
-STATIC_VNET_DEFINE(u_int, key_spi_trycnt) = 1000;
-STATIC_VNET_DEFINE(u_int32_t, key_spi_minval) = 0x100;
-STATIC_VNET_DEFINE(u_int32_t, key_spi_maxval) = 0x0fffffff; /* XXX */
-STATIC_VNET_DEFINE(u_int32_t, policy_id) = 0;
+static VNET_DEFINE(u_int, key_spi_trycnt) = 1000;
+static VNET_DEFINE(u_int32_t, key_spi_minval) = 0x100;
+static VNET_DEFINE(u_int32_t, key_spi_maxval) = 0x0fffffff; /* XXX */
+static VNET_DEFINE(u_int32_t, policy_id) = 0;
/*interval to initialize randseed,1(m)*/
-STATIC_VNET_DEFINE(u_int, key_int_random) = 60;
+static VNET_DEFINE(u_int, key_int_random) = 60;
/* interval to expire acquiring, 30(s)*/
-STATIC_VNET_DEFINE(u_int, key_larval_lifetime) = 30;
+static VNET_DEFINE(u_int, key_larval_lifetime) = 30;
/* counter for blocking SADB_ACQUIRE.*/
-STATIC_VNET_DEFINE(int, key_blockacq_count) = 10;
+static VNET_DEFINE(int, key_blockacq_count) = 10;
/* lifetime for blocking SADB_ACQUIRE.*/
-STATIC_VNET_DEFINE(int, key_blockacq_lifetime) = 20;
+static VNET_DEFINE(int, key_blockacq_lifetime) = 20;
/* preferred old sa rather than new sa.*/
-STATIC_VNET_DEFINE(int, key_preferred_oldsa) = 1;
+static VNET_DEFINE(int, key_preferred_oldsa) = 1;
#define V_key_spi_trycnt VNET(key_spi_trycnt)
#define V_key_spi_minval VNET(key_spi_minval)
#define V_key_spi_maxval VNET(key_spi_maxval)
@@ -137,11 +137,11 @@ STATIC_VNET_DEFINE(int, key_preferred_oldsa) = 1;
#define V_key_blockacq_lifetime VNET(key_blockacq_lifetime)
#define V_key_preferred_oldsa VNET(key_preferred_oldsa)
-STATIC_VNET_DEFINE(u_int32_t, acq_seq) = 0;
+static VNET_DEFINE(u_int32_t, acq_seq) = 0;
#define V_acq_seq VNET(acq_seq)
/* SPD */
-STATIC_VNET_DEFINE(LIST_HEAD(_sptree, secpolicy), sptree[IPSEC_DIR_MAX]);
+static VNET_DEFINE(LIST_HEAD(_sptree, secpolicy), sptree[IPSEC_DIR_MAX]);
#define V_sptree VNET(sptree)
static struct mtx sptree_lock;
#define SPTREE_LOCK_INIT() \
@@ -152,7 +152,7 @@ static struct mtx sptree_lock;
#define SPTREE_UNLOCK() mtx_unlock(&sptree_lock)
#define SPTREE_LOCK_ASSERT() mtx_assert(&sptree_lock, MA_OWNED)
-STATIC_VNET_DEFINE(LIST_HEAD(_sahtree, secashead), sahtree); /* SAD */
+static VNET_DEFINE(LIST_HEAD(_sahtree, secashead), sahtree); /* SAD */
#define V_sahtree VNET(sahtree)
static struct mtx sahtree_lock;
#define SAHTREE_LOCK_INIT() \
@@ -164,7 +164,7 @@ static struct mtx sahtree_lock;
#define SAHTREE_LOCK_ASSERT() mtx_assert(&sahtree_lock, MA_OWNED)
/* registed list */
-STATIC_VNET_DEFINE(LIST_HEAD(_regtree, secreg), regtree[SADB_SATYPE_MAX + 1]);
+static VNET_DEFINE(LIST_HEAD(_regtree, secreg), regtree[SADB_SATYPE_MAX + 1]);
#define V_regtree VNET(regtree)
static struct mtx regtree_lock;
#define REGTREE_LOCK_INIT() \
@@ -174,7 +174,7 @@ static struct mtx regtree_lock;
#define REGTREE_UNLOCK() mtx_unlock(&regtree_lock)
#define REGTREE_LOCK_ASSERT() mtx_assert(&regtree_lock, MA_OWNED)
-STATIC_VNET_DEFINE(LIST_HEAD(_acqtree, secacq), acqtree); /* acquiring list */
+static VNET_DEFINE(LIST_HEAD(_acqtree, secacq), acqtree); /* acquiring list */
#define V_acqtree VNET(acqtree)
static struct mtx acq_lock;
#define ACQ_LOCK_INIT() \
@@ -185,7 +185,7 @@ static struct mtx acq_lock;
#define ACQ_LOCK_ASSERT() mtx_assert(&acq_lock, MA_OWNED)
/* SP acquiring list */
-STATIC_VNET_DEFINE(LIST_HEAD(_spacqtree, secspacq), spacqtree);
+static VNET_DEFINE(LIST_HEAD(_spacqtree, secspacq), spacqtree);
#define V_spacqtree VNET(spacqtree)
static struct mtx spacq_lock;
#define SPACQ_LOCK_INIT() \
@@ -269,9 +269,9 @@ static const int maxsize[] = {
sizeof(struct sadb_x_nat_t_frag),/* SADB_X_EXT_NAT_T_FRAG */
};
-STATIC_VNET_DEFINE(int, ipsec_esp_keymin) = 256;
-STATIC_VNET_DEFINE(int, ipsec_esp_auth) = 0;
-STATIC_VNET_DEFINE(int, ipsec_ah_keymin) = 128;
+static VNET_DEFINE(int, ipsec_esp_keymin) = 256;
+static VNET_DEFINE(int, ipsec_esp_auth) = 0;
+static VNET_DEFINE(int, ipsec_ah_keymin) = 128;
#define V_ipsec_esp_keymin VNET(ipsec_esp_keymin)
#define V_ipsec_esp_auth VNET(ipsec_esp_auth)
diff --git a/sys/netipsec/keysock.c b/sys/netipsec/keysock.c
index 2fb1c1fe150f..143b600bb4f7 100644
--- a/sys/netipsec/keysock.c
+++ b/sys/netipsec/keysock.c
@@ -70,7 +70,7 @@ struct key_cb {
int key_count;
int any_count;
};
-STATIC_VNET_DEFINE(struct key_cb, key_cb);
+static VNET_DEFINE(struct key_cb, key_cb);
#define V_key_cb VNET(key_cb)
static struct sockaddr key_src = { 2, PF_KEY, };
diff --git a/sys/netipsec/xform_esp.c b/sys/netipsec/xform_esp.c
index 2ccdb1005d28..6186b5961a5d 100644
--- a/sys/netipsec/xform_esp.c
+++ b/sys/netipsec/xform_esp.c
@@ -85,7 +85,7 @@ SYSCTL_VNET_INT(_net_inet_esp, OID_AUTO,
SYSCTL_VNET_STRUCT(_net_inet_esp, IPSECCTL_STATS,
stats, CTLFLAG_RD, &VNET_NAME(espstat), espstat, "");
-STATIC_VNET_DEFINE(int, esp_max_ivlen); /* max iv length over all algorithms */
+static VNET_DEFINE(int, esp_max_ivlen); /* max iv length over all algorithms */
#define V_esp_max_ivlen VNET(esp_max_ivlen)
static int esp_input_cb(struct cryptop *op);
diff --git a/sys/powerpc/aim/clock.c b/sys/powerpc/aim/clock.c
index fea9ea88480c..0bf7cfa11698 100644
--- a/sys/powerpc/aim/clock.c
+++ b/sys/powerpc/aim/clock.c
@@ -93,7 +93,7 @@ struct decr_state {
int mode; /* 0 - off, 1 - periodic, 2 - one-shot. */
int32_t div; /* Periodic divisor. */
};
-STATIC_DPCPU_DEFINE(struct decr_state, decr_state);
+static DPCPU_DEFINE(struct decr_state, decr_state);
static struct eventtimer decr_et;
static struct timecounter decr_tc = {
diff --git a/sys/powerpc/booke/clock.c b/sys/powerpc/booke/clock.c
index 3df22f15dc9f..9958160a1af4 100644
--- a/sys/powerpc/booke/clock.c
+++ b/sys/powerpc/booke/clock.c
@@ -96,7 +96,7 @@ struct decr_state {
int mode; /* 0 - off, 1 - periodic, 2 - one-shot. */
int32_t div; /* Periodic divisor. */
};
-STATIC_DPCPU_DEFINE(struct decr_state, decr_state);
+static DPCPU_DEFINE(struct decr_state, decr_state);
static struct eventtimer decr_et;
static struct timecounter decr_timecounter = {
diff --git a/sys/sys/cdefs.h b/sys/sys/cdefs.h
index b5803a05dab2..958c74d5ff6a 100644
--- a/sys/sys/cdefs.h
+++ b/sys/sys/cdefs.h
@@ -401,7 +401,8 @@
#endif /* __STDC__ */
#endif /* __GNUC__ || __INTEL_COMPILER */
-#define __GLOBL(sym) __asm__(".globl " sym)
+#define __GLOBL1(sym) __asm__(".globl " #sym)
+#define __GLOBL(sym) __GLOBL1(sym)
#if defined(__GNUC__) || defined(__INTEL_COMPILER)
#define __IDSTRING(name,string) __asm__(".ident\t\"" string "\"")
diff --git a/sys/sys/linker_set.h b/sys/sys/linker_set.h
index 11c6b1dc63af..2edb55b24f8f 100644
--- a/sys/sys/linker_set.h
+++ b/sys/sys/linker_set.h
@@ -45,8 +45,8 @@
*/
#ifdef __GNUCLIKE___SECTION
#define __MAKE_SET(set, sym) \
- __GLOBL("__start_set_" #set); \
- __GLOBL("__stop_set_" #set); \
+ __GLOBL(__CONCAT(__start_set_,set)); \
+ __GLOBL(__CONCAT(__stop_set_,set)); \
static void const * const __set_##set##_sym_##sym \
__section("set_" #set) __used = &sym
#else /* !__GNUCLIKE___SECTION */
diff --git a/sys/sys/pcpu.h b/sys/sys/pcpu.h
index 81fd7833a5b3..ad1cf33e05b2 100644
--- a/sys/sys/pcpu.h
+++ b/sys/sys/pcpu.h
@@ -51,7 +51,9 @@
* Define a set for pcpu data.
*/
extern uintptr_t *__start_set_pcpu;
+__GLOBL(__start_set_pcpu);
extern uintptr_t *__stop_set_pcpu;
+__GLOBL(__stop_set_pcpu);
/*
* Array of dynamic pcpu base offsets. Indexed by id.
@@ -73,12 +75,7 @@ extern uintptr_t dpcpu_off[];
*/
#define DPCPU_NAME(n) pcpu_entry_##n
#define DPCPU_DECLARE(t, n) extern t DPCPU_NAME(n)
-#define DPCPU_DEFINE(t, n) \
- __GLOBL("__start_" DPCPU_SETNAME); \
- __GLOBL("__stop_" DPCPU_SETNAME); \
- t DPCPU_NAME(n) __section(DPCPU_SETNAME) __used
-#define STATIC_DPCPU_DEFINE(t, n) \
- DPCPU_DEFINE(static t, n)
+#define DPCPU_DEFINE(t, n) t DPCPU_NAME(n) __section(DPCPU_SETNAME) __used
/*
* Accessors with a given base.