On 20/11/15(Fri) 18:05, Alexandr Nedvedicky wrote:
> Hello,
> 
> I have just nit comments, feel free to ignore them.
> 
> 1) would it be possible to use closing #endif guards as follows:
>       #endif  /* NCARP */

Done.

> 2) another nit here:
> > @@ -5607,6 +5616,8 @@ pf_route(struct mbuf **m, struct pf_rule
> >  done:
> >     if (r->rt != PF_DUPTO)
> >             *m = NULL;
> > +   if (!r->rt)
> > +           if_put(ifp);
> >     rtfree(rt);
> >     return;
> >  
> 
> I would probably use test as follows:
>       if (rt != NULL)
>               if_put(ifp);
> 
> it's detail, given at some point in future we will probably have to use
> if_put()/if_get() for ifp's bound to kif's (right?).

Well not necessarily.  kif have the same lifetime as an ifp and are easy
to garbage collect so there's no need for the moment to use index for
them.  Indexes are useful when two objects having a different lifetime
need to be linked at some point.  By using indexes/id/cookie we do not 
increase the lifetime of an object like with references but this has the
cost of a layer of indirection.

Reply via email to