Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 21 Apr 2007 06:12:51 +0200
From:      Marko Zec <zec@icir.org>
To:        Max Laier <max@love2party.net>
Cc:        perforce@freebsd.org
Subject:   Re: PERFORCE change 118399 for review
Message-ID:  <200704210612.52050.zec@icir.org>
In-Reply-To: <200704191549.13955.max@love2party.net>
References:  <200704190739.l3J7dFng023292@repoman.freebsd.org> <200704191549.13955.max@love2party.net>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200704210612.52050.zec>