tech-net archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Improving use of rt_refcnt



On Sat, Jul 4, 2015 at 9:52 PM, Ryota Ozaki <ozaki-r%netbsd.org@localhost> wrote:
> Hi,
>
> I'm trying to improve use of rt_refcnt: reducing
> abuse of it, e.g., rt_refcnt++/rt_refcnt-- outside
> route.c and extending it to treat referencing
> during packet processing (IOW, references from
> local variables) -- currently it handles only
> references between routes. The latter is needed for
> MP-safe networking.
>
> Here is a patch:
> http://www.netbsd.org/~ozaki-r/reduce-rt_refcnt-abuse.diff

BTW are there objections against the patch as a cleanup
of use of rt_refcnt?

  ozaki-r

>
> The patch passes all ATF tests and an additional test
> specific to refcnt that is not committed yet due
> to lack of refcnt outputs in netstat -r (See PR#50027).
>
> Note that the patch isn't ready for MP-safe yet;
> we need atomicity of refcnt operations somehow
> (locking is an easy solution for it). This work
> will be solved in another patch.
>
> Any comments or suggestions are welcome.
>
> Thanks,
>   ozaki-r


Home | Main Index | Thread Index | Old Index