From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 5A649A0C43 for ; Sat, 27 Nov 2021 00:56:56 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D4E984068E; Sat, 27 Nov 2021 00:56:55 +0100 (CET) Received: from mail-lf1-f47.google.com (mail-lf1-f47.google.com [209.85.167.47]) by mails.dpdk.org (Postfix) with ESMTP id 9723E4068A for ; Sat, 27 Nov 2021 00:56:54 +0100 (CET) Received: by mail-lf1-f47.google.com with SMTP id k37so27831970lfv.3 for ; Fri, 26 Nov 2021 15:56:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Rn0Uoder/92ZVYXcg6svntYJrsAyKx0OctNNvRmvVog=; b=F0JjbPK4V+bwoueF29AIs1KXIPoapY4A+sHp6bEqjEFbDkFxOif8xzV2DrkOUDU3Wm 1jvzTpCQOZKbstN1OUQB7l2ZxeqzPF5KXLg7iCrYJ0osXuef0S6y07mia6ClcO2wY4r2 N23LlCoM/LkGloG6VqVRO5JlAV/BnTuva6DMYEnmhly+gcad9GNPjSh0Qrlxjp80YA1c DprEpQ4sd116/Hs1LbgSjjzTzsspAOvZn1ULWMoCh5F8lV6ex4Fteb3jtCKmUjls0Kya Lt9joS9FAcf1rhWd2RK0/Hu8zw/otcYSsd7CiMb2jvHBau4TXeFCne8BMzNHzV8Mnqw4 cshQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Rn0Uoder/92ZVYXcg6svntYJrsAyKx0OctNNvRmvVog=; b=ghecNBaCe0qIbxFoj5wYSbGs5GJDxVqj3kmpHqlGwmi9OrlsNEIujTRco2oO/ZmoN4 H6Dp7z5BaOYwCuClLtjBb5hysIs6lKnBmQRn3l15UY8w9HsJSeEG0qZ/5h5ov9/o4QmS YhnwAIdXXC2kBHi/ca2wDklgQFXvunAGhut2Vu2pRPYge/DuZkr7Az7YSPxb4IXuSUO/ 40GvuDycKncZX0OxDxzU7O5Ve1mR+cynrNrYun1OBOHR09mVrZOTgghTepEUXxrwJKtF GgBC+/H8FSSlfveuO5BNsViPDYjPU++awL8iIaKlHpfa4yIdsmLqF9g/SB5qv6W9Eoyv A/Nw== X-Gm-Message-State: AOAM533kb7VrVhwJB8am1u9hPtZn3XFE/qOE+vzE3tmKQK6Z6O3YZ1KH Q/RBC27pQfB8gzvmhkNhGTM= X-Google-Smtp-Source: ABdhPJy69vNBgk6wimMeFDwdYu/ma/YD8b3T195+hSKnFF/xvsQB3ucwNVE0Xl/3GTder8uhzQ0UZQ== X-Received: by 2002:a19:6454:: with SMTP id b20mr33066890lfj.469.1637971014084; Fri, 26 Nov 2021 15:56:54 -0800 (PST) Received: from sovereign (broadband-37-110-65-23.ip.moscow.rt.ru. [37.110.65.23]) by smtp.gmail.com with ESMTPSA id b32sm651234ljf.41.2021.11.26.15.56.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Nov 2021 15:56:53 -0800 (PST) Date: Sat, 27 Nov 2021 02:56:53 +0300 From: Dmitry Kozlyuk To: =?UTF-8?B?0JTQvNC40YLRgNC40Lkg0KHRgtC10L/QsNC90L7Qsg==?= Cc: Steffen Weise , users@dpdk.org Subject: Re: Find all matches with DPDK ACL Message-ID: <20211127025653.113071f5@sovereign> In-Reply-To: References: <20211124181958.212f1179@sovereign> <20211126171232.401fefca@sovereign> X-Mailer: Claws Mail 3.18.0 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: users@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK usage discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: users-bounces@dpdk.org 2021-11-26 17:56 (UTC+0300), =D0=94=D0=BC=D0=B8=D1=82=D1=80=D0=B8=D0=B9 =D0= =A1=D1=82=D0=B5=D0=BF=D0=B0=D0=BD=D0=BE=D0=B2: > I have approx 5K-10K (5 000 - 10 000) rules. > On average I have 10-20 matches (60 max). > I don't need to insert/delete/update rules frequently - you can consider > rules being permanent which are loaded once on startup. Never mind my suggestion then. I made a benchmark with your case parameters and even a brute-force scan of all rules outperforms regex database. When Hyperscan performed well in my experience, it was with <100 rules and any single match. Sorry for misdirection and thanks for an interesting algo problem :)