<div dir="ltr">I'm trying to understand a bit deeper the <span class="gmail_default" style="font-family:"courier new",monospace;font-size:small">new </span>concepts of multithreading of Bird.<br><br>You mentioned:<br>"and a programmer's documentation composed mostly of comments spread across the source code"<br><br>So I decided to dig a bit on the code available at <a href="https://gitlab.nic.cz/labs/bird/">https://gitlab.nic.cz/labs/bird/</a> to look at the comments, try to understand the concepts...<br>But I could not find any tags earlier than 1 year. No releases bigger than 2.0.7. No Milestones.<br><br>Is reasonable to consider that this innovative part of the code is still no publicly available?<br><br>How someone that "want to know how BIRD works internally and how it is going to change" could look a bit more directly to that part of the code changes?</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Em seg., 15 de mar. de 2021 às 15:02, Maria Matejka <<a href="mailto:maria.matejka@nic.cz">maria.matejka@nic.cz</a>> escreveu:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hello!<br>
<br>
On 3/15/21 6:07 PM, Douglas Fischer wrote:<br>
> That part about "Filter Rework" made me a bit anxious!<br>
> I don't know exactly means the part:<br>
> "we decided to preprocess the filter internal structure to another <br>
> structure which is much easier to execute"...<br>
> But, to me, it sounds like fragmenting, even more, the "test, mark, and <br>
> actuate" on the filters... Right?<br>
<br>
This is a work that has been already included in v2.0.x for x ≥ 4 as far <br>
as I can remember. The filter is simply converted (in config time) from <br>
an infix structure with lots of pointers to a stack-oriented postfix <br>
bytecode.<br>
<br>
That bytecode is somehow similar to Lua. We also thought about using Lua <br>
itself as a filtering language, anyway we had problems with Lua stack <br>
initialization. A simple run of an empty filter took at least 2 us on <br>
our testing machine, compared to 35 ns of our empty filter.<br>
<br>
> Talking about BGP, I love Bird because only with it I know how to do <br>
> what I call "2 cycles filtering"...<br>
> <br>
> - I create several Small Tests, where each route is tested and marked <br>
> somehow...<br>
> - On each Peer-Type, import or export(but mostly on import), and I <br>
> define which tests will be called to be executed on that route, and live <br>
> their mark on each route.<br>
> - I here I test, Mask-lenght, AS-Set, AS-Origin, AS-Path, <br>
> foreigner-communities, internal-communities, a lot of Regex, and all <br>
> those multiple complex things...<br>
> - And at the end of the filter-police I do an "IF" that tests on a <br>
> combined And+Or the marks lived by the previous tests, and based on that <br>
> do the accept, reject, add-communities, adjust MED/Local-Pref/Etc...<br>
<br>
This stays the same, the filter language didn't change, we just reworked <br>
the interpreter. To add to this, there are also custom route attributes. <br>
It is quite common to do the small test on import, store the results to <br>
BGP communities, decide on export based on them and then filter them <br>
out. For this use, you can define your own route attributes and you <br>
don't mess with the communities at all. (And these are also faster than <br>
community list manipulation.)<br>
<br>
We are thinking about more filtering features like iterating over the <br>
community lists or multipath nexthops. Don't worry, the filters are <br>
going to stay the same or better.<br>
<br>
Thank you for your input!<br>
<br>
Maria<br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><font size="2"><span style="font-family:"courier new",monospace">Douglas Fernando Fischer</span><br style="font-family:"courier new",monospace"><span style="font-family:"courier new",monospace">Engº de Controle e Automação</span></font><div style="padding:0px;margin-left:0px;margin-top:0px;overflow:hidden;color:black;text-align:left;line-height:130%;font-family:"courier new",monospace"></div></div>