From owner-freebsd-virtualization@FreeBSD.ORG Wed Sep 10 08:10:01 2008 Return-Path: Delivered-To: freebsd-virtualization@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8315E1065675 for ; Wed, 10 Sep 2008 08:10:01 +0000 (UTC) (envelope-from julian@elischer.org) Received: from outN.internet-mail-service.net (outn.internet-mail-service.net [216.240.47.237]) by mx1.freebsd.org (Postfix) with ESMTP id 66BAA8FC15 for ; Wed, 10 Sep 2008 08:10:01 +0000 (UTC) (envelope-from julian@elischer.org) Received: from idiom.com (mx0.idiom.com [216.240.32.160]) by out.internet-mail-service.net (Postfix) with ESMTP id 5BBCC2496; Wed, 10 Sep 2008 01:10:01 -0700 (PDT) Received: from julian-mac.elischer.org (localhost [127.0.0.1]) by idiom.com (Postfix) with ESMTP id 2C01A2D600E; Wed, 10 Sep 2008 01:10:00 -0700 (PDT) Message-ID: <48C780E4.2050207@elischer.org> Date: Wed, 10 Sep 2008 01:10:12 -0700 From: Julian Elischer User-Agent: Thunderbird 2.0.0.16 (Macintosh/20080707) MIME-Version: 1.0 To: Marko Zec References: <200809081655.m88GtxbV000906@repoman.freebsd.org> In-Reply-To: <200809081655.m88GtxbV000906@repoman.freebsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: FreeBSD virtualization mailing list Subject: Vnet iteration X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Discussion of various virtualization techniques FreeBSD supports." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Sep 2008 08:10:01 -0000 Marko Zec wrote: > http://perforce.freebsd.org/chv.cgi?CH=149433 > > Change 149433 by zec@zec_tpx32 on 2008/09/08 16:55:34 > > First-cut replacement of VNET_ITERLOOP_BEGIN() / > VNET_ITERLOOP_END() kludges with VNET_FOREACH() constructs > discussed at freebsd-virtualization@ > > Needs a bit more testing before merging over to > vimage-commit2 branch. > > Affected files ... > > .. //depot/projects/vimage/src/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb.c#3 edit > .. //depot/projects/vimage/src/sys/kern/kern_vimage.c#66 edit > .. //depot/projects/vimage/src/sys/net/if.c#36 edit > .. //depot/projects/vimage/src/sys/net/if_ef.c#6 edit > .. //depot/projects/vimage/src/sys/net80211/ieee80211_ddb.c#8 edit > .. //depot/projects/vimage/src/sys/netgraph/atm/ng_atm.c#6 edit > .. //depot/projects/vimage/src/sys/netgraph/ng_gif.c#7 edit > .. //depot/projects/vimage/src/sys/netinet/igmp.c#15 edit > .. //depot/projects/vimage/src/sys/netinet/in_pcb.c#29 edit > .. //depot/projects/vimage/src/sys/netinet/in_rmx.c#18 edit > .. //depot/projects/vimage/src/sys/netinet/ip_input.c#32 edit > .. //depot/projects/vimage/src/sys/netinet/tcp_subr.c#47 edit > .. //depot/projects/vimage/src/sys/netinet/tcp_timer.c#20 edit > .. //depot/projects/vimage/src/sys/netinet6/frag6.c#17 edit > .. //depot/projects/vimage/src/sys/netipsec/key.c#20 edit > .. //depot/projects/vimage/src/sys/sys/vimage.h#63 edit > > Differences ... [...] > + VNET_FOREACH(vnet_iter) { > + CURVNET_SET(vnet_iter); /* XXX CURVNET_SET_QUIET() ? */ > + INIT_VNET_NET(vnet_iter); > + TAILQ_FOREACH(ifp, &V_ifnet, if_link) > + (void)ifaddr_event_handler(NULL, ifp); > + CURVNET_RESTORE(); > } this looks great.. I'd like to see as much of this as possible in commit2 and then I'd like to see it committed as soon as brokk, bz and others have kicked the t[yi]res a bit. :-)