From owner-cvs-src-old@FreeBSD.ORG Mon Apr 6 22:31:18 2009 Return-Path: Delivered-To: cvs-src-old@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 58DD8106566B for ; Mon, 6 Apr 2009 22:31:18 +0000 (UTC) (envelope-from zec@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 42FF18FC15 for ; Mon, 6 Apr 2009 22:31:18 +0000 (UTC) (envelope-from zec@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id n36MVI7M077517 for ; Mon, 6 Apr 2009 22:31:18 GMT (envelope-from zec@repoman.freebsd.org) Received: (from svn2cvs@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id n36MVIQ9077516 for cvs-src-old@freebsd.org; Mon, 6 Apr 2009 22:31:18 GMT (envelope-from zec@repoman.freebsd.org) Message-Id: <200904062231.n36MVIQ9077516@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: svn2cvs set sender to zec@repoman.freebsd.org using -f From: Marko Zec Date: Mon, 6 Apr 2009 22:29:41 +0000 (UTC) To: cvs-src-old@freebsd.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/net if.c if_gif.c if_loop.c route.c vnet.h src/sys/netinet if_ether.c ip_fw.h ip_input.c tcp_reass.c tcp_sack.c tcp_subr.c tcp_timewait.c vinet.h src/sys/netinet6 frag6.c in6_src.c ip6_input.c scope6.c src/sys/netipsec ipsec.c ... X-BeenThere: cvs-src-old@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: **OBSOLETE** CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Apr 2009 22:31:18 -0000 zec 2009-04-06 22:29:41 UTC FreeBSD src repository Modified files: sys/net if.c if_gif.c if_loop.c route.c vnet.h sys/netinet if_ether.c ip_fw.h ip_input.c tcp_reass.c tcp_sack.c tcp_subr.c tcp_timewait.c vinet.h sys/netinet6 frag6.c in6_src.c ip6_input.c scope6.c sys/netipsec ipsec.c key.c xform_ah.c xform_esp.c xform_ipcomp.c xform_ipip.c sys/sys param.h vimage.h Log: SVN rev 190787 on 2009-04-06 22:29:41Z by zec First pass at separating per-vnet initializer functions from existing functions for initializing global state. At this stage, the new per-vnet initializer functions are directly called from the existing global initialization code, which should in most cases result in compiler inlining those new functions, hence yielding a near-zero functional change. Modify the existing initializer functions which are invoked via protosw, like ip_init() et. al., to allow them to be invoked multiple times, i.e. per each vnet. Global state, if any, is initialized only if such functions are called within the context of vnet0, which will be determined via the IS_DEFAULT_VNET(curvnet) check (currently always true). While here, V_irtualize a few remaining global UMA zones used by net/netinet/netipsec networking code. While it is not yet clear to me or anybody else whether this is the right thing to do, at this stage this makes the code more readable, and makes it easier to track uncollected UMA-zone-backed objects on vnet removal. In the long run, it's quite possible that some form of shared use of UMA zone pools among multiple vnets should be considered. Bump __FreeBSD_version due to changes in layout of structs vnet_ipfw, vnet_inet and vnet_net. Approved by: julian (mentor) Revision Changes Path 1.313 +16 -5 src/sys/net/if.c 1.75 +23 -14 src/sys/net/if_gif.c 1.129 +11 -2 src/sys/net/if_loop.c 1.151 +22 -11 src/sys/net/route.c 1.8 +2 -0 src/sys/net/vnet.h 1.193 +12 -2 src/sys/netinet/if_ether.c 1.125 +2 -0 src/sys/netinet/ip_fw.h 1.352 +16 -11 src/sys/netinet/ip_input.c 1.359 +9 -7 src/sys/netinet/tcp_reass.c 1.48 +3 -4 src/sys/netinet/tcp_sack.c 1.337 +44 -32 src/sys/netinet/tcp_subr.c 1.299 +8 -8 src/sys/netinet/tcp_timewait.c 1.12 +9 -0 src/sys/netinet/vinet.h 1.44 +6 -4 src/sys/netinet6/frag6.c 1.67 +6 -2 src/sys/netinet6/in6_src.c 1.116 +23 -8 src/sys/netinet6/ip6_input.c 1.24 +5 -1 src/sys/netinet6/scope6.c 1.47 +12 -0 src/sys/netipsec/ipsec.c 1.48 +9 -6 src/sys/netipsec/key.c 1.21 +12 -1 src/sys/netipsec/xform_ah.c 1.25 +14 -3 src/sys/netipsec/xform_esp.c 1.16 +11 -1 src/sys/netipsec/xform_ipcomp.c 1.26 +10 -2 src/sys/netipsec/xform_ipip.c 1.395 +1 -1 src/sys/sys/param.h 1.13 +1 -0 src/sys/sys/vimage.h