From owner-p4-projects@FreeBSD.ORG Thu May 7 14:57:40 2009 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id F31581065673; Thu, 7 May 2009 14:57:39 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 98AA91065672 for ; Thu, 7 May 2009 14:57:39 +0000 (UTC) (envelope-from zec@fer.hr) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 877DC8FC1A for ; Thu, 7 May 2009 14:57:39 +0000 (UTC) (envelope-from zec@fer.hr) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id n47EvdTv021888 for ; Thu, 7 May 2009 14:57:39 GMT (envelope-from zec@fer.hr) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id n47Evc6W021886 for perforce@freebsd.org; Thu, 7 May 2009 14:57:38 GMT (envelope-from zec@fer.hr) Date: Thu, 7 May 2009 14:57:38 GMT Message-Id: <200905071457.n47Evc6W021886@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to zec@fer.hr using -f From: Marko Zec To: Perforce Change Reviews Cc: Subject: PERFORCE change 161724 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 May 2009 14:57:40 -0000 http://perforce.freebsd.org/chv.cgi?CH=161724 Change 161724 by zec@zec_tpx32 on 2009/05/07 14:57:32 Fix several mostly style related problems that I introduced with r191816 in svn. Pointed out by: bz Affected files ... .. //depot/projects/vimage-commit2/src/sys/kern/kern_linker.c#13 edit .. //depot/projects/vimage-commit2/src/sys/kern/kern_vimage.c#29 edit .. //depot/projects/vimage-commit2/src/sys/kern/uipc_socket.c#19 edit .. //depot/projects/vimage-commit2/src/sys/kern/uipc_syscalls.c#6 edit .. //depot/projects/vimage-commit2/src/sys/net/if.c#53 edit .. //depot/projects/vimage-commit2/src/sys/netinet/igmp.c#35 edit .. //depot/projects/vimage-commit2/src/sys/netinet/tcp_hostcache.c#22 edit .. //depot/projects/vimage-commit2/src/sys/sys/proc.h#15 edit .. //depot/projects/vimage-commit2/src/sys/sys/vimage.h#54 edit Differences ... ==== //depot/projects/vimage-commit2/src/sys/kern/kern_linker.c#13 (text+ko) ==== @@ -999,7 +999,7 @@ #endif /* - * It's possible that kldloaded module will attach a new ifnet, + * It is possible that kldloaded module will attach a new ifnet, * so vnet context must be set when this ocurs. */ CURVNET_SET(TD_TO_VNET(td)); ==== //depot/projects/vimage-commit2/src/sys/kern/kern_vimage.c#29 (text+ko) ==== @@ -332,7 +332,11 @@ vnet->vnet_magic_n = VNET_MAGIC_N; vip->v_net = vnet; - /* We MUST clear curvnet in vi_init_done before going SMP. */ + /* + * We MUST clear curvnet in vi_init_done before going SMP, + * otherwise CURVNET_SET() macros would scream about unnecessary + * curvnet recursions. + */ curvnet = LIST_FIRST(&vnet_head); #endif } @@ -391,7 +395,7 @@ #endif VNET_FOREACH(vnet_iter) { db_printf("%p %3d %5d", - vnet_iter, vnet_iter->ifccnt, vnet_iter->sockcnt); + vnet_iter, vnet_iter->ifcnt, vnet_iter->sockcnt); db_vnet_ptr(vnet_iter->mod_data[VNET_MOD_NET]); db_vnet_ptr(vnet_iter->mod_data[VNET_MOD_INET]); db_vnet_ptr(vnet_iter->mod_data[VNET_MOD_INET6]); ==== //depot/projects/vimage-commit2/src/sys/kern/uipc_socket.c#19 (text+ko) ==== @@ -286,7 +286,7 @@ so->so_gencnt = ++so_gencnt; ++numopensockets; #ifdef VIMAGE - ++vnet->sockcnt; /* locked with so_global_mtx */ + ++vnet->sockcnt; /* Locked with so_global_mtx. */ so->so_vnet = vnet; #endif mtx_unlock(&so_global_mtx); @@ -1306,7 +1306,7 @@ CURVNET_SET(so->so_vnet); error = so->so_proto->pr_usrreqs->pru_sosend(so, addr, uio, top, - control, flags, td); + control, flags, td); CURVNET_RESTORE(); return (error); } ==== //depot/projects/vimage-commit2/src/sys/kern/uipc_syscalls.c#6 (text+ko) ==== @@ -63,8 +63,8 @@ #include #include #include +#include #include -#include #ifdef KTRACE #include #endif ==== //depot/projects/vimage-commit2/src/sys/net/if.c#53 (text+ko) ==== @@ -53,7 +53,6 @@ #include #include #include -#include #include #include #include @@ -745,7 +744,7 @@ IFNET_WLOCK(); TAILQ_INSERT_TAIL(&V_ifnet, ifp, if_link); #ifdef VIMAGE - curvnet->ifccnt++; + ++curvnet->ifcnt; #endif IFNET_WUNLOCK(); @@ -903,7 +902,7 @@ } #ifdef VIMAGE if (found) - curvnet->ifccnt--; + --curvnet->ifcnt; #endif IFNET_WUNLOCK(); if (!found) ==== //depot/projects/vimage-commit2/src/sys/netinet/igmp.c#35 (text+ko) ==== @@ -1100,9 +1100,6 @@ nsrc = ntohs(igmpv3->igmp_numsrc); - if (!IS_DEFAULT_VNET(curvnet)) - return (retval); - /* * Deal with group-specific queries upfront. * If any group query is already pending, purge any recorded ==== //depot/projects/vimage-commit2/src/sys/netinet/tcp_hostcache.c#22 (text+ko) ==== @@ -637,7 +637,7 @@ CURVNET_SET((struct vnet *) arg); INIT_VNET_INET(curvnet); struct hc_metrics *hc_entry, *hc_next; - int all = 0; /* XXX was: (intptr_t)arg - makes no sense? */ + int all = 0; int i; if (V_tcp_hostcache.purgeall) { ==== //depot/projects/vimage-commit2/src/sys/sys/proc.h#15 (text+ko) ==== @@ -275,8 +275,8 @@ struct lpohead td_lprof[2]; /* (a) lock profiling objects. */ struct kdtrace_thread *td_dtrace; /* (*) DTrace-specific data. */ int td_errno; /* Error returned by last syscall. */ - struct vnet *td_vnet; /* (*) Effective vnet */ - const char *td_vnet_lpush; /* (*) Debugging vnet push / pop */ + struct vnet *td_vnet; /* (*) Effective vnet. */ + const char *td_vnet_lpush; /* (*) Debugging vnet push / pop. */ }; struct mtx *thread_lock_block(struct thread *); ==== //depot/projects/vimage-commit2/src/sys/sys/vimage.h#54 (text+ko) ==== @@ -179,7 +179,7 @@ LIST_ENTRY(vnet) vnet_le; /* all vnets list */ u_int vnet_magic_n; u_int vnet_id; - u_int ifccnt; + u_int ifcnt; u_int sockcnt; };