Re: RTM_DELETE and route refcount

2015-08-24 Thread Martin Pieuchot
On 24/08/15(Mon) 20:32, Mike Belopuhov wrote: > On Thu, Aug 20, 2015 at 20:10 +0200, Martin Pieuchot wrote: > > On 20/08/15(Thu) 18:20, Mike Belopuhov wrote: > [...] > Thanks a lot for taking your time to dig through this. > Your diff looks good to me apart from the small bit where > you've moved

Re: RTM_DELETE and route refcount

2015-08-24 Thread Martin Pieuchot
On 24/08/15(Mon) 22:40, Alexander Bluhm wrote: > On Thu, Aug 20, 2015 at 01:37:00PM +0200, Martin Pieuchot wrote: > > --- net/route.c 19 Aug 2015 13:27:38 - 1.223 > > +++ net/route.c 20 Aug 2015 11:25:54 - > > @@ -570,12 +570,8 @@ rtdeletemsg(struct rtentry *rt, u_int ta > >

Re: RTM_DELETE and route refcount

2015-08-24 Thread Alexander Bluhm
On Thu, Aug 20, 2015 at 01:37:00PM +0200, Martin Pieuchot wrote: > --- net/route.c 19 Aug 2015 13:27:38 - 1.223 > +++ net/route.c 20 Aug 2015 11:25:54 - > @@ -570,12 +570,8 @@ rtdeletemsg(struct rtentry *rt, u_int ta > info.rti_flags = rt->rt_flags; > ifp = rt->

Re: RTM_DELETE and route refcount

2015-08-24 Thread Mike Belopuhov
On Thu, Aug 20, 2015 at 20:10 +0200, Martin Pieuchot wrote: > On 20/08/15(Thu) 18:20, Mike Belopuhov wrote: > > Makes you wonder why the heck it wasn't done in the first place, > > doesn't it? > > If you look at the original CSRG source tree, you'll see how/why > this happened :) > > When karels@

Re: RTM_DELETE and route refcount

2015-08-20 Thread Martin Pieuchot
On 20/08/15(Thu) 18:20, Mike Belopuhov wrote: > Makes you wonder why the heck it wasn't done in the first place, > doesn't it? If you look at the original CSRG source tree, you'll see how/why this happened :) When karels@ changed rtrequest() to turn it into a frontend for the radix tree in r7.8 o

Re: RTM_DELETE and route refcount

2015-08-20 Thread Mike Belopuhov
Makes you wonder why the heck it wasn't done in the first place, doesn't it?

RTM_DELETE and route refcount

2015-08-20 Thread Martin Pieuchot
This is the next logical step after bluhm@'s retrequest1(9) unification. The idea is to always return a route with an incremented reference count when the ``rtp'' argument of rtrequest1(9) is non-NULL. Apart from the code simplification this will prevent ``rt'' to be freed by another CPU between