summaryrefslogtreecommitdiffstats
path: root/sys/netinet6/mld6.c
diff options
context:
space:
mode:
authorzec <zec@FreeBSD.org>2009-04-30 13:36:26 +0000
committerzec <zec@FreeBSD.org>2009-04-30 13:36:26 +0000
commit39b6dc8ba2de1c81754454858aae4fc4b706bdbf (patch)
tree47044959fbe0bb326af1b89e4cd6b6798fc96fa1 /sys/netinet6/mld6.c
parente030268f0da956f47899e7e6ad7f3fd4bf34c434 (diff)
downloadFreeBSD-src-39b6dc8ba2de1c81754454858aae4fc4b706bdbf.zip
FreeBSD-src-39b6dc8ba2de1c81754454858aae4fc4b706bdbf.tar.gz
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)
Diffstat (limited to 'sys/netinet6/mld6.c')
-rw-r--r--sys/netinet6/mld6.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/sys/netinet6/mld6.c b/sys/netinet6/mld6.c
index 17b1df8..4359322 100644
--- a/sys/netinet6/mld6.c
+++ b/sys/netinet6/mld6.c
@@ -435,7 +435,6 @@ mld_dispatch_queue(struct ifqueue *ifq, int limit)
static __inline int
mld_is_addr_reported(const struct in6_addr *addr)
{
- INIT_VNET_INET6(curvnet);
KASSERT(IN6_IS_ADDR_MULTICAST(addr), ("%s: not multicast", __func__));
@@ -639,7 +638,6 @@ static int
mld_v1_input_query(struct ifnet *ifp, const struct ip6_hdr *ip6,
const struct mld_hdr *mld)
{
- INIT_VNET_INET6(ifp->if_vnet);
struct ifmultiaddr *ifma;
struct mld_ifinfo *mli;
struct in6_multi *inm;
@@ -1034,7 +1032,6 @@ static int
mld_v1_input_report(struct ifnet *ifp, const struct ip6_hdr *ip6,
const struct mld_hdr *mld)
{
- INIT_VNET_INET6(curvnet);
struct in6_ifaddr *ia;
struct in6_multi *inm;
#ifdef KTR
@@ -1646,7 +1643,6 @@ mld_slowtimo_vnet(void)
static void
mld_v1_process_querier_timers(struct mld_ifinfo *mli)
{
- INIT_VNET_INET6(curvnet);
MLD_LOCK_ASSERT();
@@ -3009,7 +3005,6 @@ out:
static struct mbuf *
mld_v2_encap_report(struct ifnet *ifp, struct mbuf *m)
{
- INIT_VNET_INET6(curvnet);
struct mbuf *mh;
struct mldv2_report *mld;
struct ip6_hdr *ip6;
OpenPOWER on IntegriCloud