From owner-cvs-src-old@FreeBSD.ORG Thu Jul 23 20:47:41 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 025E81065673 for ; Thu, 23 Jul 2009 20:47:41 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id DF1C38FC12 for ; Thu, 23 Jul 2009 20:47:40 +0000 (UTC) (envelope-from rwatson@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 n6NKleh2086635 for ; Thu, 23 Jul 2009 20:47:40 GMT (envelope-from rwatson@repoman.freebsd.org) Received: (from svn2cvs@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id n6NKleQg086634 for cvs-src-old@freebsd.org; Thu, 23 Jul 2009 20:47:40 GMT (envelope-from rwatson@repoman.freebsd.org) Message-Id: <200907232047.n6NKleQg086634@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: svn2cvs set sender to rwatson@repoman.freebsd.org using -f From: Robert Watson Date: Thu, 23 Jul 2009 20:46:49 +0000 (UTC) To: cvs-src-old@freebsd.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/kern kern_vimage.c uipc_domain.c src/sys/net flowtable.c if.c if_clone.c if_clone.h if_gif.c if_loop.c route.c rtsock.c vnet.c vnet.h src/sys/netgraph netgraph.h ng_base.c ng_eiface.c ng_ether.c ng_iface.c ng_socket.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: Thu, 23 Jul 2009 20:47:41 -0000 rwatson 2009-07-23 20:46:49 UTC FreeBSD src repository Modified files: sys/kern kern_vimage.c uipc_domain.c sys/net flowtable.c if.c if_clone.c if_clone.h if_gif.c if_loop.c route.c rtsock.c vnet.c vnet.h sys/netgraph netgraph.h ng_base.c ng_eiface.c ng_ether.c ng_iface.c ng_socket.c sys/netgraph/bluetooth/socket ng_btsocket.c sys/netinet igmp.c in_proto.c sys/netinet6 in6_proto.c mld6.c sys/netipsec ipsec.c keysock.c sys/sys domain.h kernel.h vimage.h Log: SVN rev 195837 on 2009-07-23 20:46:49Z by rwatson Introduce and use a sysinit-based initialization scheme for virtual network stacks, VNET_SYSINIT: - Add VNET_SYSINIT and VNET_SYSUNINIT macros to declare events that will occur each time a network stack is instantiated and destroyed. In the !VIMAGE case, these are simply mapped into regular SYSINIT/SYSUNINIT. For the VIMAGE case, we instead use SYSINIT's to track their order and properties on registration, using them for each vnet when created/ destroyed, or immediately on module load for already-started vnets. - Remove vnet_modinfo mechanism that existed to serve this purpose previously, as well as its dependency scheme: we now just use the SYSINIT ordering scheme. - Implement VNET_DOMAIN_SET() to allow protocol domains to declare that they want init functions to be called for each virtual network stack rather than just once at boot, compiling down to DOMAIN_SET() in the non-VIMAGE case. - Walk all virtualized kernel subsystems and make use of these instead of modinfo or DOMAIN_SET() for init/uninit events. In some cases, convert modular components from using modevent to using sysinit (where appropriate). In some cases, do minor rejuggling of SYSINIT ordering to make room for or better manage events. Portions submitted by: jhb (VNET_SYSINIT), bz (cleanup) Discussed with: jhb, bz, julian, zec Reviewed by: bz Approved by: re (VIMAGE blanket) Revision Changes Path 1.17 +7 -205 src/sys/kern/kern_vimage.c 1.60 +19 -36 src/sys/kern/uipc_domain.c 1.14 +10 -30 src/sys/net/flowtable.c 1.357 +17 -35 src/sys/net/if.c 1.17 +2 -16 src/sys/net/if_clone.c 1.6 +1 -0 src/sys/net/if_clone.h 1.87 +18 -42 src/sys/net/if_gif.c 1.139 +15 -41 src/sys/net/if_loop.c 1.166 +13 -27 src/sys/net/route.c 1.180 +2 -2 src/sys/net/rtsock.c 1.2 +142 -0 src/sys/net/vnet.c 1.21 +51 -0 src/sys/net/vnet.h 1.15 +4 -3 src/sys/netgraph/bluetooth/socket/ng_btsocket.c 1.85 +1 -1 src/sys/netgraph/netgraph.h 1.178 +4 -20 src/sys/netgraph/ng_base.c 1.53 +9 -30 src/sys/netgraph/ng_eiface.c 1.75 +8 -23 src/sys/netgraph/ng_ether.c 1.65 +9 -30 src/sys/netgraph/ng_iface.c 1.87 +6 -6 src/sys/netgraph/ng_socket.c 1.88 +12 -40 src/sys/netinet/igmp.c 1.98 +1 -1 src/sys/netinet/in_proto.c 1.66 +1 -1 src/sys/netinet6/in6_proto.c 1.56 +12 -41 src/sys/netinet6/mld6.c 1.55 +3 -25 src/sys/netipsec/ipsec.c 1.34 +1 -1 src/sys/netipsec/keysock.c 1.25 +25 -5 src/sys/sys/domain.h 1.150 +2 -0 src/sys/sys/kernel.h 1.43 +2 -60 src/sys/sys/vimage.h