Author: dim
Date: Mon Nov 22 19:32:54 2010
New Revision: 215701
URL: http://svn.freebsd.org/changeset/base/215701

Log:
  After some off-list discussion, revert a number of changes to the
  DPCPU_DEFINE and VNET_DEFINE macros, as these cause problems for various
  people working on the affected files.  A better long-term solution is
  still being considered.  This reversal may give some modules empty
  set_pcpu or set_vnet sections, but these are harmless.
  
  Changes reverted:
  
  ------------------------------------------------------------------------
  r215318 | dim | 2010-11-14 21:40:55 +0100 (Sun, 14 Nov 2010) | 4 lines
  
  Instead of unconditionally emitting .globl's for the __start_set_xxx and
  __stop_set_xxx symbols, only emit them when the set_vnet or set_pcpu
  sections are actually defined.
  
  ------------------------------------------------------------------------
  r215317 | dim | 2010-11-14 21:38:11 +0100 (Sun, 14 Nov 2010) | 3 lines
  
  Apply the STATIC_VNET_DEFINE and STATIC_DPCPU_DEFINE macros throughout
  the tree.
  
  ------------------------------------------------------------------------
  r215316 | dim | 2010-11-14 21:23:02 +0100 (Sun, 14 Nov 2010) | 2 lines
  
  Add macros to define static instances of VNET_DEFINE and DPCPU_DEFINE.

Modified:
  head/sys/kern/kern_clock.c
  head/sys/kern/kern_clocksource.c
  head/sys/kern/sched_4bsd.c
  head/sys/kern/subr_pcpu.c
  head/sys/mips/mips/tick.c
  head/sys/mips/rmi/tick.c
  head/sys/net/flowtable.c
  head/sys/net/if.c
  head/sys/net/if_clone.c
  head/sys/net/if_ethersubr.c
  head/sys/net/if_gif.c
  head/sys/net/if_llatbl.c
  head/sys/net/if_loop.c
  head/sys/net/route.c
  head/sys/net/vnet.c
  head/sys/net/vnet.h
  head/sys/netgraph/ng_base.c
  head/sys/netgraph/ng_eiface.c
  head/sys/netgraph/ng_iface.c
  head/sys/netinet/if_ether.c
  head/sys/netinet/igmp.c
  head/sys/netinet/in.c
  head/sys/netinet/in_pcb.c
  head/sys/netinet/in_rmx.c
  head/sys/netinet/ip_divert.c
  head/sys/netinet/ip_fastfwd.c
  head/sys/netinet/ip_icmp.c
  head/sys/netinet/ip_input.c
  head/sys/netinet/ip_ipsec.c
  head/sys/netinet/ip_mroute.c
  head/sys/netinet/ipfw/ip_fw2.c
  head/sys/netinet/ipfw/ip_fw_dynamic.c
  head/sys/netinet/ipfw/ip_fw_nat.c
  head/sys/netinet/ipfw/ip_fw_pfil.c
  head/sys/netinet/siftr.c
  head/sys/netinet/tcp_hostcache.c
  head/sys/netinet/tcp_reass.c
  head/sys/netinet/tcp_subr.c
  head/sys/netinet/tcp_syncache.c
  head/sys/netinet/tcp_timewait.c
  head/sys/netinet/udp_usrreq.c
  head/sys/netinet6/frag6.c
  head/sys/netinet6/icmp6.c
  head/sys/netinet6/in6_rmx.c
  head/sys/netinet6/in6_src.c
  head/sys/netinet6/ip6_ipsec.c
  head/sys/netinet6/ip6_mroute.c
  head/sys/netinet6/mld6.c
  head/sys/netinet6/nd6.c
  head/sys/netinet6/nd6_nbr.c
  head/sys/netinet6/nd6_rtr.c
  head/sys/netinet6/scope6.c
  head/sys/netinet6/send.c
  head/sys/netipsec/key.c
  head/sys/netipsec/keysock.c
  head/sys/netipsec/xform_esp.c
  head/sys/powerpc/aim/clock.c
  head/sys/powerpc/booke/clock.c
  head/sys/sys/cdefs.h
  head/sys/sys/linker_set.h
  head/sys/sys/pcpu.h

Modified: head/sys/kern/kern_clock.c
==============================================================================
--- head/sys/kern/kern_clock.c  Mon Nov 22 19:02:30 2010        (r215700)
+++ head/sys/kern/kern_clock.c  Mon Nov 22 19:32:54 2010        (r215701)
@@ -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;
 
 /*

Modified: head/sys/kern/kern_clocksource.c
==============================================================================
--- head/sys/kern/kern_clocksource.c    Mon Nov 22 19:02:30 2010        
(r215700)
+++ head/sys/kern/kern_clocksource.c    Mon Nov 22 19:32:54 2010        
(r215701)
@@ -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)                                              \
 {                                                                      \

Modified: head/sys/kern/sched_4bsd.c
==============================================================================
--- head/sys/kern/sched_4bsd.c  Mon Nov 22 19:02:30 2010        (r215700)
+++ head/sys/kern/sched_4bsd.c  Mon Nov 22 19:32:54 2010        (r215701)
@@ -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)

Modified: head/sys/kern/subr_pcpu.c
==============================================================================
--- head/sys/kern/subr_pcpu.c   Mon Nov 22 19:02:30 2010        (r215700)
+++ head/sys/kern/subr_pcpu.c   Mon Nov 22 19:32:54 2010        (r215701)
@@ -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];

Modified: head/sys/mips/mips/tick.c
==============================================================================
--- head/sys/mips/mips/tick.c   Mon Nov 22 19:02:30 2010        (r215700)
+++ head/sys/mips/mips/tick.c   Mon Nov 22 19:32:54 2010        (r215701)
@@ -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;

Modified: head/sys/mips/rmi/tick.c
==============================================================================
--- head/sys/mips/rmi/tick.c    Mon Nov 22 19:02:30 2010        (r215700)
+++ head/sys/mips/rmi/tick.c    Mon Nov 22 19:32:54 2010        (r215701)
@@ -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;

Modified: head/sys/net/flowtable.c
==============================================================================
--- head/sys/net/flowtable.c    Mon Nov 22 19:02:30 2010        (r215700)
+++ head/sys/net/flowtable.c    Mon Nov 22 19:32:54 2010        (r215701)
@@ -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)

Modified: head/sys/net/if.c
==============================================================================
--- head/sys/net/if.c   Mon Nov 22 19:02:30 2010        (r215700)
+++ head/sys/net/if.c   Mon Nov 22 19:32:54 2010        (r215701)
@@ -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);

Modified: head/sys/net/if_clone.c
==============================================================================
--- head/sys/net/if_clone.c     Mon Nov 22 19:02:30 2010        (r215700)
+++ head/sys/net/if_clone.c     Mon Nov 22 19:32:54 2010        (r215701)
@@ -56,7 +56,7 @@ static int    if_clone_createif(struct if_c
                    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)

Modified: head/sys/net/if_ethersubr.c
==============================================================================
--- head/sys/net/if_ethersubr.c Mon Nov 22 19:02:30 2010        (r215700)
+++ head/sys/net/if_ethersubr.c Mon Nov 22 19:32:54 2010        (r215701)
@@ -144,7 +144,7 @@ MALLOC_DEFINE(M_ARPCOM, "arpcom", "802.*
 #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
 

Modified: head/sys/net/if_gif.c
==============================================================================
--- head/sys/net/if_gif.c       Mon Nov 22 19:02:30 2010        (r215700)
+++ head/sys/net/if_gif.c       Mon Nov 22 19:32:54 2010        (r215701)
@@ -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, CTL
  */
 #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,
  * 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,

Modified: head/sys/net/if_llatbl.c
==============================================================================
--- head/sys/net/if_llatbl.c    Mon Nov 22 19:02:30 2010        (r215700)
+++ head/sys/net/if_llatbl.c    Mon Nov 22 19:32:54 2010        (r215701)
@@ -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 *,

Modified: head/sys/net/if_loop.c
==============================================================================
--- head/sys/net/if_loop.c      Mon Nov 22 19:02:30 2010        (r215700)
+++ head/sys/net/if_loop.c      Mon Nov 22 19:32:54 2010        (r215701)
@@ -106,8 +106,8 @@ static void lo_clone_destroy(struct ifne
 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

Modified: head/sys/net/route.c
==============================================================================
--- head/sys/net/route.c        Mon Nov 22 19:02:30 2010        (r215700)
+++ head/sys/net/route.c        Mon Nov 22 19:32:54 2010        (r215701)
@@ -113,7 +113,7 @@ VNET_DEFINE(int, rttrash);          /* routes no
  */
 #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

Modified: head/sys/net/vnet.c
==============================================================================
--- head/sys/net/vnet.c Mon Nov 22 19:02:30 2010        (r215700)
+++ head/sys/net/vnet.c Mon Nov 22 19:32:54 2010        (r215701)
@@ -177,7 +177,7 @@ MALLOC_DEFINE(M_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

Modified: head/sys/net/vnet.h
==============================================================================
--- head/sys/net/vnet.h Mon Nov 22 19:02:30 2010        (r215700)
+++ head/sys/net/vnet.h Mon Nov 22 19:32:54 2010        (r215701)
@@ -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.

Modified: head/sys/netgraph/ng_base.c
==============================================================================
--- head/sys/netgraph/ng_base.c Mon Nov 22 19:02:30 2010        (r215700)
+++ head/sys/netgraph/ng_base.c Mon Nov 22 19:32:54 2010        (r215701)
@@ -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

Modified: head/sys/netgraph/ng_eiface.c
==============================================================================
--- head/sys/netgraph/ng_eiface.c       Mon Nov 22 19:02:30 2010        
(r215700)
+++ head/sys/netgraph/ng_eiface.c       Mon Nov 22 19:32:54 2010        
(r215701)
@@ -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)
 
 /************************************************************************

Modified: head/sys/netgraph/ng_iface.c
==============================================================================
--- head/sys/netgraph/ng_iface.c        Mon Nov 22 19:02:30 2010        
(r215700)
+++ head/sys/netgraph/ng_iface.c        Mon Nov 22 19:32:54 2010        
(r215701)
@@ -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)
 
 /************************************************************************

Modified: head/sys/netinet/if_ether.c
==============================================================================
--- head/sys/netinet/if_ether.c Mon Nov 22 19:02:30 2010        (r215700)
+++ head/sys/netinet/if_ether.c Mon Nov 22 19:32:54 2010        (r215701)
@@ -81,17 +81,17 @@ SYSCTL_NODE(_net_link_ether, PF_INET, in
 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)

Modified: head/sys/netinet/igmp.c
==============================================================================
--- head/sys/netinet/igmp.c     Mon Nov 22 19:02:30 2010        (r215700)
+++ head/sys/netinet/igmp.c     Mon Nov 22 19:32:54 2010        (r215701)
@@ -206,11 +206,11 @@ MALLOC_DEFINE(M_IGMP, "igmp", "igmp stat
  * 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_ti
 #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)

Modified: head/sys/netinet/in.c
==============================================================================
--- head/sys/netinet/in.c       Mon Nov 22 19:02:30 2010        (r215700)
+++ head/sys/netinet/in.c       Mon Nov 22 19:32:54 2010        (r215701)
@@ -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,

Modified: head/sys/netinet/in_pcb.c
==============================================================================
--- head/sys/netinet/in_pcb.c   Mon Nov 22 19:02:30 2010        (r215700)
+++ head/sys/netinet/in_pcb.c   Mon Nov 22 19:32:54 2010        (r215701)
@@ -108,7 +108,7 @@ VNET_DEFINE(int, ipport_randomcps) = 10;
 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)
 

Modified: head/sys/netinet/in_rmx.c
==============================================================================
--- head/sys/netinet/in_rmx.c   Mon Nov 22 19:02:30 2010        (r215700)
+++ head/sys/netinet/in_rmx.c   Mon Nov 22 19:32:54 2010        (r215701)
@@ -132,21 +132,21 @@ in_matroute(void *v_arg, struct radix_no
        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 *
 }
 
 #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)

Modified: head/sys/netinet/ip_divert.c
==============================================================================
--- head/sys/netinet/ip_divert.c        Mon Nov 22 19:02:30 2010        
(r215700)
+++ head/sys/netinet/ip_divert.c        Mon Nov 22 19:32:54 2010        
(r215701)
@@ -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)

Modified: head/sys/netinet/ip_fastfwd.c
==============================================================================
--- head/sys/netinet/ip_fastfwd.c       Mon Nov 22 19:02:30 2010        
(r215700)
+++ head/sys/netinet/ip_fastfwd.c       Mon Nov 22 19:32:54 2010        
(r215701)
@@ -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,

Modified: head/sys/netinet/ip_icmp.c
==============================================================================
--- head/sys/netinet/ip_icmp.c  Mon Nov 22 19:02:30 2010        (r215700)
+++ head/sys/netinet/ip_icmp.c  Mon Nov 22 19:32:54 2010        (r215701)
@@ -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
 /*
  * 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,

Modified: head/sys/netinet/ip_input.c
==============================================================================
--- head/sys/netinet/ip_input.c Mon Nov 22 19:02:30 2010        (r215700)
+++ head/sys/netinet/ip_input.c Mon Nov 22 19:32:54 2010        (r215701)
@@ -96,7 +96,7 @@ SYSCTL_VNET_INT(_net_inet_ip, IPCTL_FORW
     &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_DEFT
     &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, 
  * 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_S
     &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, 
 #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)

Modified: head/sys/netinet/ip_ipsec.c
==============================================================================
--- head/sys/netinet/ip_ipsec.c Mon Nov 22 19:02:30 2010        (r215700)
+++ head/sys/netinet/ip_ipsec.c Mon Nov 22 19:32:54 2010        (r215701)
@@ -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)
 

Modified: head/sys/netinet/ip_mroute.c
==============================================================================
--- head/sys/netinet/ip_mroute.c        Mon Nov 22 19:02:30 2010        
(r215700)
+++ head/sys/netinet/ip_mroute.c        Mon Nov 22 19:32:54 2010        
(r215701)
@@ -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
  * 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_me
  * 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
     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_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 */
 

Modified: head/sys/netinet/ipfw/ip_fw2.c
==============================================================================
--- head/sys/netinet/ipfw/ip_fw2.c      Mon Nov 22 19:02:30 2010        
(r215700)
+++ head/sys/netinet/ipfw/ip_fw2.c      Mon Nov 22 19:32:54 2010        
(r215701)
@@ -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

Modified: head/sys/netinet/ipfw/ip_fw_dynamic.c
==============================================================================
--- head/sys/netinet/ipfw/ip_fw_dynamic.c       Mon Nov 22 19:02:30 2010        
(r215700)
+++ head/sys/netinet/ipfw/ip_fw_dynamic.c       Mon Nov 22 19:32:54 2010        
(r215701)
@@ -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_
  * 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)

Modified: head/sys/netinet/ipfw/ip_fw_nat.c
==============================================================================
--- head/sys/netinet/ipfw/ip_fw_nat.c   Mon Nov 22 19:02:30 2010        
(r215700)
+++ head/sys/netinet/ipfw/ip_fw_nat.c   Mon Nov 22 19:32:54 2010        
(r215701)
@@ -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

Modified: head/sys/netinet/ipfw/ip_fw_pfil.c
==============================================================================
--- head/sys/netinet/ipfw/ip_fw_pfil.c  Mon Nov 22 19:02:30 2010        
(r215700)
+++ head/sys/netinet/ipfw/ip_fw_pfil.c  Mon Nov 22 19:32:54 2010        
(r215701)
@@ -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
 

Modified: head/sys/netinet/siftr.c
==============================================================================
--- head/sys/netinet/siftr.c    Mon Nov 22 19:02:30 2010        (r215700)
+++ head/sys/netinet/siftr.c    Mon Nov 22 19:32:54 2010        (r215701)
@@ -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;

Modified: head/sys/netinet/tcp_hostcache.c
==============================================================================
--- head/sys/netinet/tcp_hostcache.c    Mon Nov 22 19:02:30 2010        
(r215700)
+++ head/sys/netinet/tcp_hostcache.c    Mon Nov 22 19:32:54 2010        
(r215701)
@@ -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 *);

Modified: head/sys/netinet/tcp_reass.c
==============================================================================
--- head/sys/netinet/tcp_reass.c        Mon Nov 22 19:02:30 2010        
(r215700)
+++ head/sys/netinet/tcp_reass.c        Mon Nov 22 19:32:54 2010        
(r215701)
@@ -80,25 +80,25 @@ static int tcp_reass_sysctl_qsize(SYSCTL
 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 */

Modified: head/sys/netinet/tcp_subr.c
==============================================================================
--- head/sys/netinet/tcp_subr.c Mon Nov 22 19:02:30 2010        (r215700)
+++ head/sys/netinet/tcp_subr.c Mon Nov 22 19:32:54 2010        (r215701)
@@ -193,13 +193,13 @@ SYSCTL_INT(_net_inet_tcp, OID_AUTO, do_t
 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 *
 #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)

Modified: head/sys/netinet/tcp_syncache.c
==============================================================================
--- head/sys/netinet/tcp_syncache.c     Mon Nov 22 19:02:30 2010        
(r215700)
+++ head/sys/netinet/tcp_syncache.c     Mon Nov 22 19:32:54 2010        
(r215701)
@@ -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)

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to