diff options
author | rwatson <rwatson@FreeBSD.org> | 2009-07-19 17:40:45 +0000 |
---|---|---|
committer | rwatson <rwatson@FreeBSD.org> | 2009-07-19 17:40:45 +0000 |
commit | 80ed051e0ce8db1d25fa18e69fb262d52af7d891 (patch) | |
tree | 48ce534e30a27b209b5ff7350830046539440903 /sys/kern | |
parent | afad68b5dc9dd7ac9e87c87a272c5dad1a689597 (diff) | |
download | FreeBSD-src-80ed051e0ce8db1d25fa18e69fb262d52af7d891.zip FreeBSD-src-80ed051e0ce8db1d25fa18e69fb262d52af7d891.tar.gz |
Normalize field naming for struct vnet, fix two debugging printfs that
print them.
Reviewed by: bz
Approved by: re (kensmith, kib)
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/kern_vimage.c | 12 | ||||
-rw-r--r-- | sys/kern/uipc_socket.c | 4 |
2 files changed, 8 insertions, 8 deletions
diff --git a/sys/kern/kern_vimage.c b/sys/kern/kern_vimage.c index f3d4a86..b5742df 100644 --- a/sys/kern/kern_vimage.c +++ b/sys/kern/kern_vimage.c @@ -333,7 +333,8 @@ vnet_destroy(struct vnet *vnet) 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); @@ -426,14 +427,13 @@ DB_SHOW_COMMAND(vnets, db_show_vnets) VNET_ITERATOR_DECL(vnet_iter); #if SIZE_MAX == UINT32_MAX /* 32-bit arch */ - db_printf(" vnet ifs socks"); + db_printf(" vnet ifs socks\n"); #else /* 64-bit arch, most probaly... */ - db_printf(" vnet ifs socks"); + db_printf(" vnet ifs socks\n"); #endif VNET_FOREACH(vnet_iter) { - db_printf("%p %3d %5d", - vnet_iter, vnet_iter->ifcnt, vnet_iter->sockcnt); - db_printf("\n"); + db_printf("%p %3d %5d\n", vnet_iter, vnet_iter->vnet_ifcnt, + vnet_iter->vnet_sockcnt); } } #endif diff --git a/sys/kern/uipc_socket.c b/sys/kern/uipc_socket.c index 62550b2..3db3e2c 100644 --- a/sys/kern/uipc_socket.c +++ b/sys/kern/uipc_socket.c @@ -285,7 +285,7 @@ soalloc(struct vnet *vnet) 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 @@ sodealloc(struct socket *so) 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) |