PERFORCE change 111198 for review

Marko Zec zec at icir.org
Wed Dec 6 07:49:04 PST 2006


On Wednesday 06 December 2006 16:38, Andre Oppermann wrote:
> Marko Zec wrote:
> > http://perforce.freebsd.org/chv.cgi?CH=111198
> >
> > Change 111198 by zec at zec_tpx32 on 2006/12/06 15:31:22
> >
> > 	Store a pointer back to the owner vnet in struct inpcbinfo,
> > 	so that whenever an inpcb is directly or indirectly available
> > 	as an argument to a function, the function-local vnet ptr can
> > 	be fetched from there, and not via the curvnetb macro.
>
> Ugh, this will become locking/refcounting hell.

Hmm, why?  This change doesn't introduce or need any additional refcounting.  
Each vnet has its own instance of inpcbinfo, hence inpcbinfo->vnet binding is 
permanent.  A vnet can't be removed until its inpcbinfo->ipi_count tells us 
there are no inpcbs pointing back to it any more.

Marko


More information about the p4-projects mailing list