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 1D864A0C43 for ; Fri, 26 Nov 2021 15:12:36 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D8E8542736; Fri, 26 Nov 2021 15:12:35 +0100 (CET) Received: from mail-lj1-f182.google.com (mail-lj1-f182.google.com [209.85.208.182]) by mails.dpdk.org (Postfix) with ESMTP id 3F6364270C for ; Fri, 26 Nov 2021 15:12:34 +0100 (CET) Received: by mail-lj1-f182.google.com with SMTP id v15so19132578ljc.0 for ; Fri, 26 Nov 2021 06:12:34 -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=PYFhrvwyy/0eR78gI+KXSO6tYbU21sdTSietxVMqkzU=; b=PzcwhB9iDM6hu/epv68QmFkbf5BZcJykyHF/wzMLaSgatOC3ea8HIQK9JU7MoQ+824 51/dhX3PPEEiQtH1QNxjKk5HpjVw1HzL6dMgtfq5cSt7pIAsjkgK3eCNNjM/MOqs568I /2AGdvrfDKj3mZT+NAvSYMWhw+yAo1AQkm20JT0dpuQTV4P4MyMnEJrIeTqqyTK4b3in J0uf7+n5Rj+QkTGlhizozs23KVxCwfGw8oLMp4fcXR7AJIZmxa+8WBPZYH0xcKM48iJ+ V/wCZRDqAcO1ZgFl2III3WNwkGy3RuJu+HHMUPPuww36ePna5JrU0DlQyW17ga5vnOyP QVMg== 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=PYFhrvwyy/0eR78gI+KXSO6tYbU21sdTSietxVMqkzU=; b=h0Klklu3E5e1aDxwybWCRGodQIUnV3dQv+lMh4TuH+h/QfK9g4WkudsAHj4+QCPNXW 0DnFHW98MNLyCjaR0ZLJikCTT0XB+UBz1pn5doGqa488W0Z8eF/hLbOyBnHF7UpGsay0 AmkaENmjRQ63fWFsGli9NpSje1dOgRqMywSMXyVPb+1EzoU0upqeVJlWABCE+IYXE1rI mfFjlSG2Q3G3d1hqnXZkpqzmXHFa3Q5d5i70GuH70rFkIljpswL7lpGtRpuqW9kCWtsN 5Qo5mS4qYZkFTz3gQlezD0wmn+VPSiBKANB9XB45CyqoZ/1dzHEEmuFfSlBqbBt9FuIi 6GUg== X-Gm-Message-State: AOAM532zLkmboIyJZ0UNkm2enTgzEKTcof7cwl/eqc5NDx9p0SA3vRxQ L68yYqRdwNN9t3F2YtV3LNY= X-Google-Smtp-Source: ABdhPJyNyUJYfnyCOq6KD7IrAlQWh8E8mkvoa1awIY13116fXIwbohARwzVh/DMjJlG/LA6AGLMGXQ== X-Received: by 2002:a2e:984f:: with SMTP id e15mr31023157ljj.427.1637935953779; Fri, 26 Nov 2021 06:12:33 -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 f10sm513398lfg.211.2021.11.26.06.12.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Nov 2021 06:12:33 -0800 (PST) Date: Fri, 26 Nov 2021 17:12:32 +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: <20211126171232.401fefca@sovereign> In-Reply-To: References: <20211124181958.212f1179@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 16:53 (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: > Hi! > I have a big number of IPv4 5-tuple rules, every rule corresponds to some > action. I need to find all matched rules and perform all tied actions. I rather meant the subject field, like splitting the flows or access control is a typical application of ACL. I'm asking partially out of curiosity, but also because there may be a better solution then DPDK ACL. > The search time greatly affects overall system performance, so I can't ju= st > scan all rules. ACL is based on multi-bit tries and provides great > performance, so I'm looking for nearly the same performance with the > ability to find all matches within a single request. Some regex libraries, Hyperscan or DPDK regexdev in particular, take a database of rules, compile it to an efficient form (Hyperscan generates vector instructions, regexdev may use HW acceleration), and then allow to match input to the entire database in a single request, yielding every match for every expression. =46rom my experience, performance is decent, but of course it depends on the number or rules and their complexity. How many rules do you have? How many rules are expected to match (avg/max)? How often do you need to insert/delete/update rules?