Date: Thu, 30 Apr 2009 13:36:26 +0000 (UTC) From: Marko Zec <zec@FreeBSD.org> To: cvs-src-old@freebsd.org 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 ... Message-ID: <200904301351.n3UDpRpJ010331@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200904301351.n3UDpRpJ010331>