Index | Thread | Search

From:
Claudio Jeker <cjeker@diehard.n-r-g.com>
Subject:
Re: bgpd needs a reaper
To:
Theo Buehler <tb@theobuehler.org>
Cc:
tech@openbsd.org
Date:
Wed, 11 Dec 2024 10:15:14 +0100

Download raw body.

Thread
On Wed, Dec 11, 2024 at 08:55:27AM +0100, Theo Buehler wrote:
> On Wed, Dec 11, 2024 at 07:17:11AM +0100, Claudio Jeker wrote:
> > When a peer is removed in the RDE the Adj-RIB-Out can be cleared in the
> > background. So implement a reaper and put the dead peers on a zombielist.
> 
> I thought we already had too many reapers in the tree?
> 
> > Now in peer_down run the reaper once so that session with only a few
> > prefixes are immediatly gone. Not sure if that is premature optimisation.
> > 
> > While there fixup peer_down prototype and instead call it from
> > peer_shutdown(). The shutdown code is a bit funky and only runs when
> > started with debug since it is stupid to clean up before exit.
> 
> I'm not sure I like the 0/1 return of prefix_adjout_reaper(), but bgpd
> has a few different API conventions already, so probably not the moment
> to get fussy about thiss and -1/0 wouldn't be much better anyway.

I like the more boolean form with 0/1 here better than -1/0 since it
matches better what the function does. I normally use -1/0 when the return
value is a success vs failure distinction. Here the return is more an
indication if the function finished or not.

Happy for better suggestions.
 
> There's an extra empty line after peer_work_pending()
> 
> ok tb
> 

-- 
:wq Claudio