From owner-p4-projects@FreeBSD.ORG Sat Apr 21 04:13:18 2007 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id D01B416A406; Sat, 21 Apr 2007 04:13:17 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A1FD816A401 for ; Sat, 21 Apr 2007 04:13:17 +0000 (UTC) (envelope-from zec@icir.org) Received: from xaqua.tel.fer.hr (xaqua.tel.fer.hr [161.53.19.25]) by mx1.freebsd.org (Postfix) with ESMTP id 60CFC13C45B for ; Sat, 21 Apr 2007 04:13:17 +0000 (UTC) (envelope-from zec@icir.org) Received: by xaqua.tel.fer.hr (Postfix, from userid 20006) id 02B9C9B6F6; Sat, 21 Apr 2007 06:13:16 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.1.7 (2006-10-05) on xaqua.tel.fer.hr X-Spam-Level: X-Spam-Status: No, score=-4.3 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.7 Received: from [192.168.200.106] (zec2.tel.fer.hr [161.53.19.79]) by xaqua.tel.fer.hr (Postfix) with ESMTP id 3DF649B656; Sat, 21 Apr 2007 06:13:15 +0200 (CEST) From: Marko Zec To: Max Laier Date: Sat, 21 Apr 2007 06:12:51 +0200 User-Agent: KMail/1.9.1 References: <200704190739.l3J7dFng023292@repoman.freebsd.org> <200704191549.13955.max@love2party.net> In-Reply-To: <200704191549.13955.max@love2party.net> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-2" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200704210612.52050.zec@icir.org> Cc: perforce@freebsd.org Subject: Re: PERFORCE change 118399 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: Sat, 21 Apr 2007 04:13:18 -0000 On Thursday 19 April 2007 15:49, you wrote: > On Thursday 19 April 2007 09:39, Marko Zec wrote: > > http://perforce.freebsd.org/chv.cgi?CH=118399 > > > > Change 118399 by zec@zec_tca51 on 2007/04/19 07:38:43 > > > > Fix to allow compilation with nooptions VIMAGE. > > > > Affected files ... > > > > .. //depot/projects/vimage/src/sys/contrib/pf/net/pf_ioctl.c#5 edit > > > > Differences ... > > > > ==== //depot/projects/vimage/src/sys/contrib/pf/net/pf_ioctl.c#5 > > (text+ko) ==== > > > > @@ -401,10 +401,14 @@ > > callout_reset(&V_pf_expire_to, my_timeout[PFTM_INTERVAL] * hz, > > pf_purge_timeout, curvnet); > > > > -if (curvnet == &vnet_0) { > > +#ifdef VIMAGE > > + if (curvnet == &vnet_0) { > > +#endif > > pf_normalize_init(); > > pf_pfil_hooked = 0; > > -} > > +#ifdef VIMAGE > > + } > > +#endif > > I don't quite understand this one. I'd believe that pf_pfil_hooked > should be virtualized as well. Otherwise you can only enable/hook > all instances at once. I think you're right that this needs more work. Note that virtualizing pf_pfil_hooked would be incorrect at this point, given that the pfil_hooks infrastructure (lists) are not virtualized. So either we should implement a per-stack instance of pfil_hooks (in net/pfil.c), or in pf we should register / deregister hook handles only once, in pf_load() and pf_unload(), and dump the pf_pfil_hooked flag away... Marko