BIRD 3.0-alpha0

Maria Matejka maria.matejka at nic.cz
Mon Mar 7 08:58:37 CET 2022


>>> One question: What changes (if any) are necessary for the protocols to
>>> run in multithreaded mode? I wouldn't mind taking a look at adding
>>> support to the Babel protocol if you'd be interested in taking patches
>>> at this stage?
>>
>> Simply, almost none compared to other changes inside BIRD. One of my
>> goals is to keep the protocols untouched if possible. What is needed, as
>> far as I can remember (list may be incomplete):
>>
>> * check that there is no global variable inside Babel (including static
>> variables inside functions)
>> * check that nothing inside Babel touches directly any global data
>> structure and no quirk in Nest touches Babel directly
>> * check that all timers are stopped before protocol sets itself DOWN
>> (this won't be needed in future, maybe)
>> * in config.Y, request to run the protocol in its own loop
>> * set the SKF_THREAD flag for all sockets
>> * explicitly lock by birdloop_enter() and birdloop_leave() in CLI
>> commands like "show babel ..."
> 
> Thanks for the pointers!Those bits seem simple enough. The first two
> items should be OK for Babel, the others need patches (but simple ones).

If you find anything too complicated or ugly, please let us know. It is 
intended to be simple. I suppose Babel is OK to fit into the current 
model "one thread per protocol instance". Multithreading inside one 
protocol is supported, yet it isn't much convenient for now.

>> For now, you can look at RPKI or BGP diff, anyway I'm going to write a
>> blogpost specifically about internal protocol API, where to lock and
>> how. Therefore, I think the most convenient time to do the Babel
>> patching will be after publishing that blogpost, if you don't mind
>> waiting.
>>
>> I won't refuse patches now, yet I think the best approach is
>> postponing the work to the time when the blogpost is out and the API
>> gets its final shape and description. I estimate that time to several
>> months from now as there are some tasks (as described in my previous
>> email) with higher priority.
> 
> Right, let's see if I get around to playing with this before then. If I
> do, I may open a pull request with the fixes to Babel; I don't mind
> rebasing if you do end up changing the requirements along the way.

Fine, thank you!

Maria


More information about the Bird-users mailing list