tech-net archive

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

Improving use of rt_refcnt



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

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