<div dir="ltr">I have approx 5K-10K (5 000 - 10 000) rules. <div>On average I have 10-20 matches (60 max). </div><div>I don't need to insert/delete/update rules frequently - you can consider rules being permanent which are loaded once on startup. </div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">пт, 26 нояб. 2021 г. в 17:12, Dmitry Kozlyuk <<a href="mailto:dmitry.kozliuk@gmail.com">dmitry.kozliuk@gmail.com</a>>:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">2021-11-26 16:53 (UTC+0300), Дмитрий Степанов:<br>
> Hi!<br>
> I have a big number of IPv4 5-tuple rules, every rule corresponds to some<br>
> action. I need to find all matched rules and perform all tied actions.<br>
<br>
I rather meant the subject field,<br>
like splitting the flows or access control is a typical application of ACL.<br>
I'm asking partially out of curiosity,<br>
but also because there may be a better solution then DPDK ACL.<br>
<br>
> The search time greatly affects overall system performance, so I can't just<br>
> scan all rules. ACL is based on multi-bit tries and provides great<br>
> performance, so I'm looking for nearly the same performance with the<br>
> ability to find all matches within a single request.<br>
<br>
Some regex libraries, Hyperscan or DPDK regexdev in particular,<br>
take a database of rules, compile it to an efficient form<br>
(Hyperscan generates vector instructions, regexdev may use HW acceleration),<br>
and then allow to match input to the entire database in a single request,<br>
yielding every match for every expression.<br>
<br>
>From my experience, performance is decent,<br>
but of course it depends on the number or rules and their complexity.<br>
How many rules do you have?<br>
How many rules are expected to match (avg/max)?<br>
How often do you need to insert/delete/update rules?<br>
</blockquote></div>