From owner-p4-projects@FreeBSD.ORG Wed Jun 18 22:29:30 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 77C431065675; Wed, 18 Jun 2008 22:29:30 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 211C6106566B for ; Wed, 18 Jun 2008 22:29:30 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 102598FC1A for ; Wed, 18 Jun 2008 22:29:30 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m5IMTTF1041499 for ; Wed, 18 Jun 2008 22:29:29 GMT (envelope-from julian@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m5IMTTsB041497 for perforce@freebsd.org; Wed, 18 Jun 2008 22:29:29 GMT (envelope-from julian@freebsd.org) Date: Wed, 18 Jun 2008 22:29:29 GMT Message-Id: <200806182229.m5IMTTsB041497@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to julian@freebsd.org using -f From: Julian Elischer To: Perforce Change Reviews Cc: Subject: PERFORCE change 143729 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Jun 2008 22:29:30 -0000 http://perforce.freebsd.org/chv.cgi?CH=143729 Change 143729 by julian@julian_trafmon1 on 2008/06/18 22:29:00 bring vimage_develp up to date with vimage Affected files ... .. //depot/projects/vimage-devel/src/sys/kern/kern_exit.c#4 integrate .. //depot/projects/vimage-devel/src/sys/kern/kern_synch.c#4 integrate .. //depot/projects/vimage-devel/src/sys/kern/sched_4bsd.c#5 integrate .. //depot/projects/vimage-devel/src/sys/kern/uipc_socket.c#3 integrate .. //depot/projects/vimage-devel/src/sys/kern/uipc_syscalls.c#3 integrate .. //depot/projects/vimage-devel/src/sys/modules/Makefile#3 integrate .. //depot/projects/vimage-devel/src/sys/net/if.c#3 integrate .. //depot/projects/vimage-devel/src/sys/net/if_clone.c#3 integrate .. //depot/projects/vimage-devel/src/sys/netgraph/ng_base.c#4 integrate .. //depot/projects/vimage-devel/src/sys/netinet/ip_carp.c#2 integrate .. //depot/projects/vimage-devel/src/sys/sys/sysctl.h#4 integrate Differences ... ==== //depot/projects/vimage-devel/src/sys/kern/kern_exit.c#4 (text+ko) ==== ==== //depot/projects/vimage-devel/src/sys/kern/kern_synch.c#4 (text+ko) ==== ==== //depot/projects/vimage-devel/src/sys/kern/sched_4bsd.c#5 (text+ko) ==== ==== //depot/projects/vimage-devel/src/sys/kern/uipc_socket.c#3 (text+ko) ==== @@ -2025,7 +2025,8 @@ error = 0; if (sopt->sopt_level != SOL_SOCKET) { if (so->so_proto && so->so_proto->pr_ctloutput) - return ((*so->so_proto->pr_ctloutput) (so, sopt)); + return ((*so->so_proto->pr_ctloutput) + (so, sopt)); error = ENOPROTOOPT; } else { switch (sopt->sopt_name) { ==== //depot/projects/vimage-devel/src/sys/kern/uipc_syscalls.c#3 (text+ko) ==== @@ -1577,7 +1577,6 @@ error = ENOTCONN; goto done; } - *sa = NULL; CURVNET_SET(so->so_vnet); error = (*so->so_proto->pr_usrreqs->pru_peeraddr)(so, sa); ==== //depot/projects/vimage-devel/src/sys/modules/Makefile#3 (text+ko) ==== ==== //depot/projects/vimage-devel/src/sys/net/if.c#3 (text+ko) ==== @@ -317,6 +317,7 @@ static void if_init(void *dummy __unused) { + #ifdef VIMAGE vnet_mod_register(&vnet_net_modinfo); #else @@ -2601,6 +2602,9 @@ void if_delmulti_ifma(struct ifmultiaddr *ifma) { +#ifdef DIAGNOSTIC + INIT_VNET_NET(curvnet); +#endif struct ifnet *ifp; int lastref; @@ -2612,7 +2616,7 @@ struct ifnet *oifp; IFNET_RLOCK(); - TAILQ_FOREACH(oifp, &ifnet, if_link) + TAILQ_FOREACH(oifp, &V_ifnet, if_link) if (ifp == oifp) break; if (ifp != oifp) { @@ -2881,6 +2885,7 @@ if_register_com_alloc(u_char type, if_com_alloc_t *a, if_com_free_t *f) { + KASSERT(if_com_alloc[type] == NULL, ("if_register_com_alloc: %d already registered", type)); KASSERT(if_com_free[type] == NULL, @@ -2893,6 +2898,7 @@ void if_deregister_com_alloc(u_char type) { + KASSERT(if_com_alloc[type] != NULL, ("if_deregister_com_alloc: %d not registered", type)); KASSERT(if_com_free[type] != NULL, ==== //depot/projects/vimage-devel/src/sys/net/if_clone.c#3 (text+ko) ==== @@ -470,6 +470,7 @@ #ifndef VIMAGE int bytoff, bitoff; + /* * Compute offset in the bitmap and deallocate the unit. */ ==== //depot/projects/vimage-devel/src/sys/netgraph/ng_base.c#4 (text+ko) ==== @@ -131,10 +131,10 @@ }, 1, /* refs */ #ifdef NETGRAPH_DEBUG - ND_MAGIC, - __FILE__, - __LINE__, - {NULL} + .nd_magic = ND_MAGIC, + .lastfile = __FILE__, + .lastline = __LINE__, + .nd_all = {NULL} #endif /* NETGRAPH_DEBUG */ }; ==== //depot/projects/vimage-devel/src/sys/netinet/ip_carp.c#2 (text+ko) ==== @@ -31,6 +31,7 @@ #include "opt_bpf.h" #include "opt_inet.h" #include "opt_inet6.h" +#include "opt_vimage.h" #include #include @@ -49,6 +50,7 @@ #include #include #include +#include #include #include @@ -66,6 +68,7 @@ #include #ifdef INET +#include #include #include #include @@ -76,6 +79,7 @@ #endif #ifdef INET6 +#include #include #include #include @@ -913,6 +917,7 @@ ch.carp_cksum = 0; #ifdef INET + INIT_VNET_INET(curvnet); if (sc->sc_ia) { struct ip *ip; @@ -1451,6 +1456,7 @@ static int carp_set_addr(struct carp_softc *sc, struct sockaddr_in *sin) { + INIT_VNET_INET(curvnet); struct ifnet *ifp; struct carp_if *cif; struct in_ifaddr *ia, *ia_if; @@ -1470,7 +1476,7 @@ /* we have to do it by hands to check we won't match on us */ ia_if = NULL; own = 0; - TAILQ_FOREACH(ia, &in_ifaddrhead, ia_link) { + TAILQ_FOREACH(ia, &V_in_ifaddrhead, ia_link) { /* and, yeah, we need a multicast-capable iface too */ if (ia->ia_ifp != SC2IFP(sc) && (ia->ia_ifp->if_flags & IFF_MULTICAST) && @@ -1612,6 +1618,7 @@ static int carp_set_addr6(struct carp_softc *sc, struct sockaddr_in6 *sin6) { + INIT_VNET_INET6(curvnet); struct ifnet *ifp; struct carp_if *cif; struct in6_ifaddr *ia, *ia_if; @@ -1631,7 +1638,7 @@ /* we have to do it by hands to check we won't match on us */ ia_if = NULL; own = 0; - for (ia = in6_ifaddr; ia; ia = ia->ia_next) { + for (ia = V_in6_ifaddr; ia; ia = ia->ia_next) { int i; for (i = 0; i < 4; i++) { ==== //depot/projects/vimage-devel/src/sys/sys/sysctl.h#4 (text+ko) ==== @@ -245,16 +245,16 @@ DATA_SET(sysctl_set, sysctl__##parent##_##name) #ifdef VIMAGE -#define SYSCTL_V_OID(subs, mod, parent, nbr, name, kind, a1, a2, \ - handler, fmt, descr) \ - static struct sysctl_v_oid sysctl__##parent##_##name = { \ - &sysctl_##parent##_children, { 0 }, nbr, kind, \ - (void *) offsetof(struct mod, _##a1), a2, #name, \ - handler, fmt, 0, __DESCR(descr), subs, V_MOD_##mod }; \ - DATA_SET(sysctl_set, sysctl__##parent##_##name) +#define SYSCTL_V_OID(subs, mod, parent, nbr, name, kind, a1, a2, \ + handler, fmt, descr) \ + static struct sysctl_v_oid sysctl__##parent##_##name = { \ + &sysctl_##parent##_children, { 0 }, nbr, kind, \ + (void *) offsetof(struct mod, _##a1), a2, #name, \ + handler, fmt, 0, __DESCR(descr), subs, V_MOD_##mod }; \ + DATA_SET(sysctl_set, sysctl__##parent##_##name) #else #define SYSCTL_V_OID(subs, mod, parent, nbr, name, kind, a1, a2, \ - handler, fmt, descr) \ + handler, fmt, descr) \ SYSCTL_OID(parent, nbr, name, kind, &a1, a2, handler, fmt, descr) #endif