Date: Fri, 4 Jul 2008 00:06:04 GMT From: Julian Elischer <julian@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 144586 for review Message-ID: <200807040006.m64064jV049062@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=144586 Change 144586 by julian@julian_trafmon1 on 2008/07/04 00:05:52 catch up with 'vimage' branch a bit Affected files ... .. //depot/projects/vimage-devel/src/sys/contrib/pf/net/pfvar.h#3 integrate .. //depot/projects/vimage-devel/src/sys/net/if.c#5 integrate .. //depot/projects/vimage-devel/src/sys/net/if_var.h#4 integrate .. //depot/projects/vimage-devel/src/sys/net80211/ieee80211.c#5 integrate .. //depot/projects/vimage-devel/src/sys/netinet6/in6_src.c#3 integrate .. //depot/projects/vimage-devel/src/sys/nlm/nlm_advlock.c#2 integrate Differences ... ==== //depot/projects/vimage-devel/src/sys/contrib/pf/net/pfvar.h#3 (text+ko) ==== @@ -1861,8 +1861,7 @@ #ifdef VIMAGE struct vnet_pf { struct vnet *parent_vnet; - -} +}; #endif /* ==== //depot/projects/vimage-devel/src/sys/net/if.c#5 (text+ko) ==== @@ -151,12 +151,12 @@ static int if_indexlim; static struct knlist ifklist; -#endif /* !VIMAGE */ /* * Table of ifnet/cdev by index. Locked with ifnet_lock. */ static struct ifindex_entry *ifindex_table = NULL; +#endif /* !VIMAGE */ static void filt_netdetach(struct knote *kn); static int filt_netdev(struct knote *kn, long hint); @@ -190,21 +190,23 @@ struct ifnet * ifnet_byindex(u_short idx) { + INIT_VNET_NET(curvnet); struct ifnet *ifp; IFNET_RLOCK(); - ifp = ifindex_table[idx].ife_ifnet; + ifp = V_ifindex_table[idx].ife_ifnet; IFNET_RUNLOCK(); return (ifp); } -static void +void ifnet_setbyindex(u_short idx, struct ifnet *ifp) { + INIT_VNET_NET(curvnet); IFNET_WLOCK_ASSERT(); - ifindex_table[idx].ife_ifnet = ifp; + V_ifindex_table[idx].ife_ifnet = ifp; } struct ifaddr * @@ -221,10 +223,11 @@ struct cdev * ifdev_byindex(u_short idx) { + INIT_VNET_NET(curvnet); struct cdev *cdev; IFNET_RLOCK(); - cdev = ifindex_table[idx].ife_dev; + cdev = V_ifindex_table[idx].ife_dev; IFNET_RUNLOCK(); return (cdev); } @@ -233,8 +236,9 @@ ifdev_setbyindex(u_short idx, struct cdev *cdev) { + INIT_VNET_NET(curvnet); IFNET_WLOCK(); - ifindex_table[idx].ife_dev = cdev; + V_ifindex_table[idx].ife_dev = cdev; IFNET_WUNLOCK(); } @@ -268,7 +272,6 @@ static int netioctl(struct cdev *dev, u_long cmd, caddr_t data, int flag, struct thread *td) { - INIT_VNET_NET(curvnet); struct ifnet *ifp; int error, idx; @@ -379,15 +382,8 @@ vnet_net_iattach(NULL); #endif IFNET_LOCK_INIT(); -#ifdef VIMAGE - if (IS_DEFAULT_VNET(curvnet)) { - INIT_VNET_NET(curvnet); -#endif ifdev_setbyindex(0, make_dev(&net_cdevsw, 0, UID_ROOT, GID_WHEEL, 0600, "network")); -#ifdef VIMAGE - } -#endif if_clone_init(); } ==== //depot/projects/vimage-devel/src/sys/net/if_var.h#4 (text+ko) ==== @@ -650,6 +650,7 @@ struct cdev *ife_dev; }; +void ifnet_setbyindex(u_short idx, struct ifnet *ifp); struct ifnet *ifnet_byindex(u_short idx); /* * Given the index, ifaddr_byindex() returns the one and only ==== //depot/projects/vimage-devel/src/sys/net80211/ieee80211.c#5 (text+ko) ==== @@ -219,7 +219,6 @@ void ieee80211_ifattach(struct ieee80211com *ic) { - INIT_VNET_NET(curvnet); struct ifnet *ifp = ic->ic_ifp; struct sockaddr_dl *sdl; struct ifaddr *ifa; ==== //depot/projects/vimage-devel/src/sys/netinet6/in6_src.c#3 (text+ko) ==== @@ -455,7 +455,6 @@ struct ifnet **retifp, struct rtentry **retrt, int clone, int norouteok) { - INIT_VNET_NET(curvnet); INIT_VNET_INET6(curvnet); int error = 0; struct ifnet *ifp = NULL; ==== //depot/projects/vimage-devel/src/sys/nlm/nlm_advlock.c#2 (text+ko) ==== @@ -25,6 +25,7 @@ * SUCH DAMAGE. */ +#include "opt_vimage.h" #include <sys/cdefs.h> __FBSDID("$FreeBSD: src/sys/nlm/nlm_advlock.c,v 1.1 2008/06/26 10:21:54 dfr Exp $"); @@ -42,6 +43,7 @@ #include <sys/systm.h> #include <sys/unistd.h> #include <sys/vnode.h> +#include <sys/vimage.h> #include <rpc/rpcclnt.h> #include <nfs/nfsproto.h> @@ -1218,11 +1220,11 @@ return (EOVERFLOW); } - snprintf(oh_space, 32, "%d@%s", svid, hostname); + snprintf(oh_space, 32, "%d@%s", svid, G_hostname); oh_len = strlen(oh_space); memset(lock, 0, sizeof(*lock)); - lock->caller_name = hostname; + lock->caller_name = G_hostname; lock->fh.n_len = fhlen; lock->fh.n_bytes = fh; lock->oh.n_len = oh_len;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200807040006.m64064jV049062>