Index: kern/uipc_socket.c =================================================================== --- kern/uipc_socket.c (revision 195741) +++ kern/uipc_socket.c (working copy) @@ -285,7 +285,7 @@ so->so_gencnt = ++so_gencnt; ++numopensockets; #ifdef VIMAGE - ++vnet->sockcnt; /* Locked with so_global_mtx. */ + vnet->vnet_sockcnt++; so->so_vnet = vnet; #endif mtx_unlock(&so_global_mtx); @@ -308,7 +308,7 @@ so->so_gencnt = ++so_gencnt; --numopensockets; /* Could be below, but faster here. */ #ifdef VIMAGE - --so->so_vnet->sockcnt; + so->so_vnet->vnet_sockcnt--; #endif mtx_unlock(&so_global_mtx); if (so->so_rcv.sb_hiwat) Index: kern/kern_vimage.c =================================================================== --- kern/kern_vimage.c (revision 195760) +++ kern/kern_vimage.c (working copy) @@ -333,7 +333,8 @@ struct ifnet *ifp, *nifp; struct vnet_modlink *vml; - KASSERT(vnet->sockcnt == 0, ("%s: vnet still has sockets", __func__)); + KASSERT(vnet->vnet_sockcnt == 0, + ("%s: vnet still has sockets", __func__)); VNET_LIST_WLOCK(); LIST_REMOVE(vnet, vnet_le); @@ -431,8 +432,8 @@ db_printf(" vnet ifs socks"); #endif VNET_FOREACH(vnet_iter) { - db_printf("%p %3d %5d", - vnet_iter, vnet_iter->ifcnt, vnet_iter->sockcnt); + db_printf("%p %3d %5d", vnet_iter, vnet_iter->vnet_ifcnt, + vnet_iter->vnet_sockcnt); db_printf("\n"); } } Index: net/if.c =================================================================== --- net/if.c (revision 195760) +++ net/if.c (working copy) @@ -593,7 +593,7 @@ IFNET_WLOCK(); TAILQ_INSERT_TAIL(&V_ifnet, ifp, if_link); #ifdef VIMAGE - curvnet->ifcnt++; + curvnet->vnet_ifcnt++; #endif IFNET_WUNLOCK(); @@ -758,7 +758,7 @@ } #ifdef VIMAGE if (found) - curvnet->ifcnt--; + curvnet->vnet_ifcnt--; #endif IFNET_WUNLOCK(); if (!found) { Index: sys/vimage.h =================================================================== --- sys/vimage.h (revision 195761) +++ sys/vimage.h (working copy) @@ -44,8 +44,8 @@ struct vnet { LIST_ENTRY(vnet) vnet_le; /* all vnets list */ u_int vnet_magic_n; - u_int ifcnt; - u_int sockcnt; + u_int vnet_ifcnt; + u_int vnet_sockcnt; void *vnet_data_mem; uintptr_t vnet_data_base; };