From owner-freebsd-virtualization@FreeBSD.ORG Wed Sep 3 10:04:09 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 B7CC91065673; Wed, 3 Sep 2008 10:04:09 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [209.31.154.42]) by mx1.freebsd.org (Postfix) with ESMTP id 859C68FC08; Wed, 3 Sep 2008 10:04:09 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [209.31.154.41]) by cyrus.watson.org (Postfix) with ESMTP id A60DC46C29; Wed, 3 Sep 2008 06:04:04 -0400 (EDT) Date: Wed, 3 Sep 2008 11:04:05 +0100 (BST) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Brooks Davis In-Reply-To: <20080902141245.GB48622@lor.one-eyed-alien.net> Message-ID: References: <20080828185639.P66593@maildrop.int.zabbadoz.net> <20080902000516.GA48622@lor.one-eyed-alien.net> <48BCED8E.5030109@elischer.org> <20080902141245.GB48622@lor.one-eyed-alien.net> User-Agent: Alpine 1.10 (BSF 962 2008-03-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: "Bjoern A. Zeeb" , Julian Elischer , FreeBSD virtualization mailing list Subject: Re: Step 1.5 needs review 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, 03 Sep 2008 10:04:09 -0000 On Tue, 2 Sep 2008, Brooks Davis wrote: >> I suggest that we eventually replace: >> >> VNET_ITERLOOP_BEGIN >> stuff >> VNET_ITERLOOP_END >> >> >> with (eventually) >> >> FOREACH_VNET(vnet) { >> stuff >> } >> >> but that would require that the entire contents of "stuff" >> would appear in the diff. > > Thinking about it more, at a minimum, I think we should do: > VNET_ITERLOOP_BEGIN > stuff > VNET_ITERLOOP_END FWIW, I think we should make the change to FOREACH_VNET(vnet() { } sooner rather than later -- especially if there's no semantic change going on currently, now would be the time to do the indentation change. >> I'm not sure I want to actually include the contents directly into if.h or >> any other place.. I think keeping a separate vnet.h and vinet.h seems ok to >> me. > > The #ifdef _KERNEL is a strong hint that it belongs in if_var.h if it's > going to be included in another header (IMO, the vnet/vinet.h files aren't a > good idea in the long term). My views on this one are a bit mixed -- if the goal is to get, in the medium term, to a case where we do explicit dereferencing rather than macros, we may find we do need more globally visible types than we had before, which may require us to have new globally included headers. That said, in.h might be as good a place as any for global inet stuff, and as long as we have piles of pointers rather than nested structs, the type issue shouldn't get too bad. Robert N M Watson Computer Laboratory University of Cambridge