From owner-p4-projects@FreeBSD.ORG Tue Dec 23 13:30:08 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 0E99F1065678; Tue, 23 Dec 2008 13:30:08 +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 C6D4C1065674; Tue, 23 Dec 2008 13:30:07 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mail.cksoft.de (mail.cksoft.de [62.111.66.27]) by mx1.freebsd.org (Postfix) with ESMTP id 802938FC24; Tue, 23 Dec 2008 13:30:07 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from localhost (amavis.str.cksoft.de [192.168.74.71]) by mail.cksoft.de (Postfix) with ESMTP id 30C9A41C616; Tue, 23 Dec 2008 14:30:06 +0100 (CET) X-Virus-Scanned: amavisd-new at cksoft.de Received: from mail.cksoft.de ([62.111.66.27]) by localhost (amavis.str.cksoft.de [192.168.74.71]) (amavisd-new, port 10024) with ESMTP id MBhVQVKaB5TQ; Tue, 23 Dec 2008 14:30:05 +0100 (CET) Received: by mail.cksoft.de (Postfix, from userid 66) id 9A91D41C5D9; Tue, 23 Dec 2008 14:30:05 +0100 (CET) Received: from maildrop.int.zabbadoz.net (maildrop.int.zabbadoz.net [10.111.66.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.int.zabbadoz.net (Postfix) with ESMTP id 8B54E4448D5; Tue, 23 Dec 2008 13:25:42 +0000 (UTC) Date: Tue, 23 Dec 2008 13:25:42 +0000 (UTC) From: "Bjoern A. Zeeb" X-X-Sender: bz@maildrop.int.zabbadoz.net To: Marko Zec In-Reply-To: <200812231349.07820.zec@freebsd.org> Message-ID: <20081223132508.M97918@maildrop.int.zabbadoz.net> References: <200812230943.mBN9hbEZ048678@repoman.freebsd.org> <20081223115423.W97918@maildrop.int.zabbadoz.net> <200812231349.07820.zec@freebsd.org> X-OpenPGP-Key: 0x14003F198FEFA3E77207EE8D2B58B8F83CCF1842 MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: Perforce Change Reviews Subject: Re: PERFORCE change 155159 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: Tue, 23 Dec 2008 13:30:08 -0000 On Tue, 23 Dec 2008, Marko Zec wrote: Hey, > On Tuesday 23 December 2008 13:05:26 Bjoern A. Zeeb wrote: >> On Tue, 23 Dec 2008, Marko Zec wrote: >>> http://perforce.freebsd.org/chv.cgi?CH=155159 >>> >>> Change 155159 by zec@zec_tca51 on 2008/12/23 09:42:41 >>> >>> Misintegration - unbreak options VIMAGE_GLOBALS build. >>> >>> Affected files ... >>> >>> .. //depot/projects/vimage/src/sys/net/if.c#60 edit >>> >>> Differences ... >>> >>> ==== //depot/projects/vimage/src/sys/net/if.c#60 (text+ko) ==== >>> >>> @@ -402,10 +402,6 @@ >>> { >>> INIT_VNET_NET(curvnet); >>> >>> -#ifndef VIMAGE >>> - vnet_mod_register(&vnet_net_modinfo); >>> -#endif >>> - >>> V_if_index = 0; >>> V_ifindex_table = NULL; >>> V_if_indexlim = 8; >> >> This is sounds wrong as well. >> >> In case of VIMAGE vnet_mod_register is called in if_init(). >> Then vnet_net_iattach will be called as well from >> vnet_mod_constructor() and thus we are going to call >> vnet_mod_register() twice resulting in a panic. See p4 describe -du >> 154705 . >> >> So the proper check would be.. ? >> >> #if !defined(VIMAGE_GLOBALS) && !defined(VIMAGE) > > Yes, or to perhaps a in a slightly simpler form, I think the correct way > of calling the initializer fn and / or registering the vnet module > should be > > #ifdef VIMAGE_GLOBALS > vnet_inet_iattach(NULL) > #else > vnet_mod_register(&vnet_net_modinfo); > #endif > > in this case in if_init(), definitely not in vnet_net_iattach() Yes, that sounds good. > Good point, I think I should revisit all the vnet module registrations > in the vimage branch now, as well as possibly put in some #ifdefs > inside vnet_mod_register()... Thanks:) -- Bjoern A. Zeeb The greatest risk is not taking one.