freebsd-skq/sys/net
Marko Zec f6dfe47a14 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)
2009-04-30 13:36:26 +00:00
..
bpf_buffer.c Fill in BPF sysctl descriptions. 2008-07-25 23:58:09 +00:00
bpf_buffer.h Introduce support for zero-copy BPF buffering, which reduces the 2008-03-24 13:49:17 +00:00
bpf_filter.c Fix the last missing parentheses for a return statement in bpf_filter.c. 2008-08-29 20:00:55 +00:00
bpf_jitter.c Initialize scratch memory for JIT-compiled filter when it is allocated. 2008-08-28 16:40:51 +00:00
bpf_jitter.h Fix a typo in copyrights. 2008-08-25 20:43:13 +00:00
bpf_zerocopy.c Clarify some comments, fix some types, and rename ZBUF_FLAG_IMMUTABLE to 2009-03-07 10:21:37 +00:00
bpf_zerocopy.h Make sure we are clearing the ZBUF_FLAG_IMMUTABLE any time a free buffer 2008-07-05 20:11:28 +00:00
bpf.c Disable zerocopy by default for now. It's causing some problems in pcap 2009-03-10 14:28:19 +00:00
bpf.h Sync DLTs with latest libpcap version. 2009-04-02 13:02:12 +00:00
bpfdesc.h Remove trailing ';' in BPFD_LOCK_ASSERT macro. 2008-08-01 22:08:14 +00:00
bridgestp.c replace IFQ_ENQUEUE + if_start with if_transmit 2009-04-27 22:46:26 +00:00
bridgestp.h Fix spelling. 2007-12-09 20:47:12 +00:00
ethernet.h Change if_output to take a struct route as its fourth argument in order 2009-04-16 20:30:28 +00:00
fddi.h
firewire.h
flowtable.c remove gratuitous memory barrier, a remnant of unified L2 / L3 2009-04-27 22:45:19 +00:00
flowtable.h - Import infrastructure for caching flows as a means of accelerating L3 and L2 lookups 2009-04-19 00:16:04 +00:00
ieee8023ad_lacp.c Update the interface baudrate taking into account the max speed for the 2008-12-17 20:58:10 +00:00
ieee8023ad_lacp.h Remove extra semicolons. 2008-03-17 01:26:44 +00:00
if_arc.h Change if_output to take a struct route as its fourth argument in order 2009-04-16 20:30:28 +00:00
if_arcsubr.c remove call to IFQ_HANDOFF is it called by if_transmit in the default case 2009-04-27 22:44:26 +00:00
if_arp.h
if_atm.h Change if_output to take a struct route as its fourth argument in order 2009-04-16 20:30:28 +00:00
if_atmsubr.c Change if_output to take a struct route as its fourth argument in order 2009-04-16 20:30:28 +00:00
if_bridge.c use if_transmit intead of direct frobbing of the if_snd q; this is no 2009-04-27 22:06:49 +00:00
if_bridgevar.h Add an option to limit the number of source MACs that can be behind a bridge 2007-11-04 08:32:27 +00:00
if_clone.c Fix clone destruction, can't use the simple api because that does not remove 2008-09-20 19:38:37 +00:00
if_clone.h Fix clone destruction, can't use the simple api because that does not remove 2008-09-20 19:38:37 +00:00
if_dead.c During if_detach(), invoke if_dead() to set the ifnet's function 2009-04-23 11:51:53 +00:00
if_disc.c Change if_output to take a struct route as its fourth argument in order 2009-04-16 20:30:28 +00:00
if_dl.h
if_edsc.c Give a hint that softc can contain many things besides ifp. 2007-03-26 09:05:10 +00:00
if_ef.c replace IFQ_HANDOFF with if_transmit 2009-04-27 22:45:56 +00:00
if_enc.c Change if_output to take a struct route as its fourth argument in order 2009-04-16 20:30:28 +00:00
if_enc.h Increase statistic counters for enc0 interface when enabled 2008-08-12 09:05:01 +00:00
if_ethersubr.c Change if_output to take a struct route as its fourth argument in order 2009-04-16 20:30:28 +00:00
if_faith.c Change if_output to take a struct route as its fourth argument in order 2009-04-16 20:30:28 +00:00
if_fddisubr.c Change if_output to take a struct route as its fourth argument in order 2009-04-16 20:30:28 +00:00
if_fwsubr.c Change if_output to take a struct route as its fourth argument in order 2009-04-16 20:30:28 +00:00
if_gif.c Permit buiding kernels with options VIMAGE, restricted to only a single 2009-04-30 13:36:26 +00:00
if_gif.h Change if_output to take a struct route as its fourth argument in order 2009-04-16 20:30:28 +00:00
if_gre.c Change if_output to take a struct route as its fourth argument in order 2009-04-16 20:30:28 +00:00
if_gre.h Add support for the optional key in the GRE header. 2008-06-20 17:26:34 +00:00
if_iso88025subr.c Change if_output to take a struct route as its fourth argument in order 2009-04-16 20:30:28 +00:00
if_lagg.c Change if_output to take a struct route as its fourth argument in order 2009-04-16 20:30:28 +00:00
if_lagg.h Change if_output to take a struct route as its fourth argument in order 2009-04-16 20:30:28 +00:00
if_llatbl.c clarify state of llentry that is passed back 2009-04-17 18:48:50 +00:00
if_llatbl.h add utility routine for updating an struct llentry * 2009-04-16 22:04:07 +00:00
if_llc.h
if_loop.c In preparation for turning on options VIMAGE in next commits, 2009-04-26 22:06:42 +00:00
if_media.c
if_media.h Add TWINAX (Twin Axial Copper for 10G networking) media types. 2008-12-17 22:59:29 +00:00
if_mib.c Permit buiding kernels with options VIMAGE, restricted to only a single 2009-04-30 13:36:26 +00:00
if_mib.h
if_sppp.h
if_spppfr.c
if_spppsubr.c Change if_output to take a struct route as its fourth argument in order 2009-04-16 20:30:28 +00:00
if_stf.c Prefer ifa_link (structure field) to ifa_list (macro alias for it). 2009-04-20 22:41:19 +00:00
if_stf.h
if_tap.c Remove the splimp()/splx() calls around the setting of the MTU. They are 2009-03-17 02:32:36 +00:00
if_tap.h Add new TAPGIFNAME tap(4) character device ioctl. This is a 2008-09-08 22:43:55 +00:00
if_tapvar.h
if_tun.c Acquire interfce address list lock while walking the interface address 2009-04-20 23:25:38 +00:00
if_tun.h
if_types.h Remove IPX over IP tunneling support, which allows IPX routing over IP 2007-06-13 14:01:43 +00:00
if_var.h Permit buiding kernels with options VIMAGE, restricted to only a single 2009-04-30 13:36:26 +00:00
if_vlan_var.h Prepare for 802.1p: 2007-02-28 22:05:30 +00:00
if_vlan.c The vlan code has not required the miibus code since 6.0 when 2009-04-17 17:40:47 +00:00
if.c Permit buiding kernels with options VIMAGE, restricted to only a single 2009-04-30 13:36:26 +00:00
if.h Add a new interface flag, IFF_DYING, which is set when a device driver 2009-04-23 09:32:30 +00:00
iso88025.h Change if_output to take a struct route as its fourth argument in order 2009-04-16 20:30:28 +00:00
netisr.c Remove NETISR_MPSAFE, which allows specific netisr handlers to be directly 2008-07-04 00:21:38 +00:00
netisr.h Reserve a netisr slot for the IGMPv3 output queue. 2009-03-04 02:54:11 +00:00
pfil.c A few locking fixes and cleanups to pfil hook registration, 2008-12-16 17:03:22 +00:00
pfil.h Line wrap very long line in struct packet_filter_hook definition. 2008-12-13 12:03:21 +00:00
pfkeyv2.h Commit the change from FAST_IPSEC to IPSEC. The FAST_IPSEC 2007-07-03 12:13:45 +00:00
ppp_defs.h
radix_mpath.c Extend route command: 2009-04-14 23:05:36 +00:00
radix_mpath.h When RADIX_MPATH is enabled, the route selection is not rotating 2008-05-30 09:34:35 +00:00
radix.c remove assertion checks for now - ipfw uses its own lock for protecting its radix tree instance 2008-12-16 11:01:36 +00:00
radix.h - convert radix node head lock from mutex to rwlock 2008-12-07 21:15:43 +00:00
raw_cb.c For all files including net/vnet.h directly include opt_route.h and 2009-02-27 14:12:05 +00:00
raw_cb.h Put a global variables, which were virtualized but formerly 2008-12-11 16:26:38 +00:00
raw_usrreq.c For all files including net/vnet.h directly include opt_route.h and 2009-02-27 14:12:05 +00:00
route.c In preparation for turning on options VIMAGE in next commits, 2009-04-26 22:06:42 +00:00
route.h Change if_output to take a struct route as its fourth argument in order 2009-04-16 20:30:28 +00:00
rtsock.c In preparation for turning on options VIMAGE in next commits, 2009-04-26 22:06:42 +00:00
slcompress.c
slcompress.h
vnet.h First pass at separating per-vnet initializer functions 2009-04-06 22:29:41 +00:00
zlib.c
zlib.h