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 BDA4CA0353; Thu, 24 Feb 2022 09:34:11 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5171141155; Thu, 24 Feb 2022 09:34:11 +0100 (CET) Received: from shelob.oktetlabs.ru (shelob.oktetlabs.ru [91.220.146.113]) by mails.dpdk.org (Postfix) with ESMTP id 6BB734114D for ; Thu, 24 Feb 2022 09:34:09 +0100 (CET) Received: from [192.168.38.17] (aros.oktetlabs.ru [192.168.38.17]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by shelob.oktetlabs.ru (Postfix) with ESMTPSA id D847056; Thu, 24 Feb 2022 11:34:08 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 shelob.oktetlabs.ru D847056 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=oktetlabs.ru; s=default; t=1645691648; bh=0rnH8yWm73cp+SLpP9wpyO/44ro3a5YROtniCPgZ9gI=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=paJqq1/ml7mtl4w6+Fn3h3ENh8Xo7ec3QTpDbhG1jKQCSsGLWOqS8K6zyruQn5DG5 ApfG5MdXooZCTvkdY9/n3Mt2u8wnx7q9M50Gs54sBOB+YS8SnBnnSk4Be4DndoMoce Po6XioA6OvTOoL0hebSyxpVQPodPpZJ7rsOVchIA= Message-ID: Date: Thu, 24 Feb 2022 11:34:06 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Subject: Re: [PATCH v10 02/11] ethdev: add flow item/action templates Content-Language: en-US To: Alexander Kozyrev , dev@dpdk.org Cc: orika@nvidia.com, thomas@monjalon.net, ivan.malov@oktetlabs.ru, ferruh.yigit@intel.com, mohammad.abdul.awal@intel.com, qi.z.zhang@intel.com, jerinj@marvell.com, ajit.khaparde@broadcom.com, bruce.richardson@intel.com References: <20220221230240.2409665-1-akozyrev@nvidia.com> <20220223030240.2506513-1-akozyrev@nvidia.com> <20220223030240.2506513-3-akozyrev@nvidia.com> From: Andrew Rybchenko Organization: OKTET Labs In-Reply-To: <20220223030240.2506513-3-akozyrev@nvidia.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On 2/23/22 06:02, Alexander Kozyrev wrote: > Treating every single flow rule as a completely independent and separate > entity negatively impacts the flow rules insertion rate. Oftentimes in an > application, many flow rules share a common structure (the same item mask > and/or action list) so they can be grouped and classified together. > This knowledge may be used as a source of optimization by a PMD/HW. > > The pattern template defines common matching fields (the item mask) without > values. The actions template holds a list of action types that will be used > together in the same rule. The specific values for items and actions will > be given only during the rule creation. > > A table combines pattern and actions templates along with shared flow rule > attributes (group ID, priority and traffic direction). This way a PMD/HW > can prepare all the resources needed for efficient flow rules creation in > the datapath. To avoid any hiccups due to memory reallocation, the maximum > number of flow rules is defined at the table creation time. > > The flow rule creation is done by selecting a table, a pattern template > and an actions template (which are bound to the table), and setting unique > values for the items and actions. > > Signed-off-by: Alexander Kozyrev > Acked-by: Ori Kam Acked-by: Andrew Rybchenko