From owner-cvs-src-old@FreeBSD.ORG Thu Apr 30 13:51:28 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 5E4AD1065675 for ; Thu, 30 Apr 2009 13:51:28 +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 47DFA8FC12 for ; Thu, 30 Apr 2009 13:51:28 +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 n3UDpRxc010332 for ; Thu, 30 Apr 2009 13:51:27 GMT (envelope-from zec@repoman.freebsd.org) Received: (from svn2cvs@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id n3UDpRpJ010331 for cvs-src-old@freebsd.org; Thu, 30 Apr 2009 13:51:27 GMT (envelope-from zec@repoman.freebsd.org) Message-Id: <200904301351.n3UDpRpJ010331@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: svn2cvs set sender to zec@repoman.freebsd.org using -f From: Marko Zec Date: Thu, 30 Apr 2009 13:36:26 +0000 (UTC) To: cvs-src-old@freebsd.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src UPDATING src/sys/kern kern_mib.c kern_sysctl.c kern_vimage.c uipc_socket.c src/sys/net if.c if_gif.c if_mib.c if_var.h src/sys/netinet in_pcb.c in_pcb.h ip_divert.c ip_fw.h ip_fw_pfil.c ip_input.c raw_ip.c tcp_subr.c tcp_syncache.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, 30 Apr 2009 13:51:28 -0000 zec 2009-04-30 13:36:26 UTC FreeBSD src repository Modified files: . UPDATING sys/kern kern_mib.c kern_sysctl.c kern_vimage.c uipc_socket.c sys/net if.c if_gif.c if_mib.c if_var.h sys/netinet in_pcb.c in_pcb.h ip_divert.c ip_fw.h ip_fw_pfil.c ip_input.c raw_ip.c tcp_subr.c tcp_syncache.c tcp_syncache.h tcp_var.h udp_usrreq.c vinet.h sys/netinet6 in6_ifattach.c in6_mcast.c in6_proto.c ip6_input.c mld6.c nd6.c raw_ip6.c vinet6.h sys/netipsec ipsec.c sys/sys param.h socketvar.h sysctl.h vimage.h Log: SVN rev 191688 on 2009-04-30 13:36:26Z by zec Permit buiding kernels with options VIMAGE, restricted to only a single active network stack instance. Turning on options VIMAGE at compile time yields the following changes relative to default kernel build: 1) V_ accessor macros for virtualized variables resolve to structure fields via base pointers, instead of being resolved as fields in global structs or plain global variables. As an example, V_ifnet becomes: options VIMAGE: ((struct vnet_net *) vnet_net)->_ifnet default build: vnet_net_0._ifnet options VIMAGE_GLOBALS: ifnet 2) INIT_VNET_* macros will declare and set up base pointers to be used by V_ accessor macros, instead of resolving to whitespace: INIT_VNET_NET(ifp->if_vnet); becomes struct vnet_net *vnet_net = (ifp->if_vnet)->mod_data[VNET_MOD_NET]; 3) Memory for vnet modules registered via vnet_mod_register() is now allocated at run time in sys/kern/kern_vimage.c, instead of per vnet module structs being declared as globals. If required, vnet modules can now request the framework to provide them with allocated bzeroed memory by filling in the vmi_size field in their vmi_modinfo structures. 4) structs socket, ifnet, inpcbinfo, tcpcb and syncache_head are extended to hold a pointer to the parent vnet. options VIMAGE builds will fill in those fields as required. 5) curvnet is introduced as a new global variable in options VIMAGE builds, always pointing to the default and only struct vnet. 6) struct sysctl_oid has been extended with additional two fields to store major and minor virtualization module identifiers, oid_v_subs and oid_v_mod. SYSCTL_V_* family of macros will fill in those fields accordingly, and store the offset in the appropriate vnet container struct in oid_arg1. In sysctl handlers dealing with virtualized sysctls, the SYSCTL_RESOLVE_V_ARG1() macro will compute the address of the target variable and make it available in arg1 variable for further processing. Unused fields in structs vnet_inet, vnet_inet6 and vnet_ipfw have been deleted. Reviewed by: bz, rwatson Approved by: julian (mentor) Revision Changes Path 1.598 +8 -0 src/UPDATING 1.94 +2 -4 src/sys/kern/kern_mib.c 1.191 +98 -2 src/sys/kern/kern_sysctl.c 1.4 +29 -1 src/sys/kern/kern_vimage.c 1.328 +4 -0 src/sys/kern/uipc_socket.c 1.327 +9 -1 src/sys/net/if.c 1.78 +3 -0 src/sys/net/if_gif.c 1.25 +0 -1 src/sys/net/if_mib.c 1.138 +1 -0 src/sys/net/if_var.h 1.247 +3 -1 src/sys/netinet/in_pcb.c 1.136 +8 -2 src/sys/netinet/in_pcb.h 1.147 +3 -0 src/sys/netinet/ip_divert.c 1.126 +0 -2 src/sys/netinet/ip_fw.h 1.36 +2 -0 src/sys/netinet/ip_fw_pfil.c 1.357 +1 -0 src/sys/netinet/ip_input.c 1.209 +3 -0 src/sys/netinet/raw_ip.c 1.340 +6 -0 src/sys/netinet/tcp_subr.c 1.168 +3 -0 src/sys/netinet/tcp_syncache.c 1.6 +1 -0 src/sys/netinet/tcp_syncache.h 1.174 +6 -2 src/sys/netinet/tcp_var.h 1.253 +3 -0 src/sys/netinet/udp_usrreq.c 1.14 +0 -2 src/sys/netinet/vinet.h 1.62 +4 -3 src/sys/netinet6/in6_ifattach.c 1.3 +2 -4 src/sys/netinet6/in6_mcast.c 1.60 +4 -0 src/sys/netinet6/in6_proto.c 1.120 +3 -2 src/sys/netinet6/ip6_input.c 1.44 +0 -5 src/sys/netinet6/mld6.c 1.112 +4 -5 src/sys/netinet6/nd6.c 1.104 +1 -0 src/sys/netinet6/raw_ip6.c 1.12 +0 -6 src/sys/netinet6/vinet6.h 1.49 +1 -0 src/sys/netipsec/ipsec.c 1.405 +1 -1 src/sys/sys/param.h 1.168 +3 -0 src/sys/sys/socketvar.h 1.170 +29 -2 src/sys/sys/sysctl.h 1.17 +74 -17 src/sys/sys/vimage.h