summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2010-11-14 20:38:11 +0000
committerdim <dim@FreeBSD.org>2010-11-14 20:38:11 +0000
commitfda4020a881f36122bca03f2d8327da8bc67863d (patch)
tree2576727bd0fe21df869f8fc8bfe76870b2b049aa
parent7dff36caf76f0b4c09712e32d78cf6ee8f2132c1 (diff)
downloadFreeBSD-src-fda4020a881f36122bca03f2d8327da8bc67863d.zip
FreeBSD-src-fda4020a881f36122bca03f2d8327da8bc67863d.tar.gz
Apply the STATIC_VNET_DEFINE and STATIC_DPCPU_DEFINE macros throughout
the tree.
-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/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
57 files changed, 204 insertions, 204 deletions
diff --git a/sys/kern/kern_clock.c b/sys/kern/kern_clock.c
index 1754f7b..feef911 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 ded6d64..dad07d2 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 9face64..6a40392 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 24a12ea..4108441 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 125fe33..d0c3eaf 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 3b83a5c..83ef30b 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 4988670..8728cf3 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 17f01e9..5720294 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 c02737b..d07f517 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 5e5a548..0c48ff1 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 7683839..be71d60 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 910d366..7ccd81f 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 78d2de2..94d51c0 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 5cb06e6..ae4b2ca 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 8fc52b2..3608fce 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/netgraph/ng_base.c b/sys/netgraph/ng_base.c
index dba6e75..a334ccc 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 4239328..348e5f2 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 03ad016..9ea8e13 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 ef59cdb..a6cc4e4 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 b02d30b..fe4f160 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 2ec54e2..a7dcb86 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 be85af4..5153ae0 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 1389873..736a2ea 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 0837d2e..6d01f4f 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 0399393..bf98537 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 480a2c8..575010f 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 6e1153d..109d3e3 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 50a6ce4..bdc55de 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 8736caf..f6fd276 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 43b2d11..53aa5d0 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 c8ea4b7..33ff5b2 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 6f223ed..9fa8602 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 248e4dd..f15a969 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 5f2a692..af77fec 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 d20adb7..3ba295e 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 9efacdc..1d840cd 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 8596e23..e6e7ca4 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");
@@ -1453,10 +1453,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 bf0fd18..6d2cf2b 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 42df4fe..8a712d3 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 adb11c4..511e0a3 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 1523133..59b5d44 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 952b38a..85b88aa 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 2a13646..4ae0d47 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 49bc715..8b1a3fd 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 96b09ef..63e46fe 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 0c1ff78..23d3a28 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 21d9eab..ce5d611 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 c9d9be0..10fae82 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 957e965..8465682 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 19ec989..f19ef92 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 8189d87..0f0cf29 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 71d88d0..baf7f4c 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 e57eb44..869ad74 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 143b600..2fb1c1f 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 6186b59..2ccdb10 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 0bf7cfa..fea9ea8 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 9958160..3df22f1 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 = {
OpenPOWER on IntegriCloud