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 498F4A0353; Thu, 24 Feb 2022 09:35:54 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 399FA41184; Thu, 24 Feb 2022 09:35:54 +0100 (CET) Received: from shelob.oktetlabs.ru (shelob.oktetlabs.ru [91.220.146.113]) by mails.dpdk.org (Postfix) with ESMTP id 6BF1D41181 for ; Thu, 24 Feb 2022 09:35:52 +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)) (No client certificate requested) by shelob.oktetlabs.ru (Postfix) with ESMTPSA id 6C51856; Thu, 24 Feb 2022 11:35:51 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 shelob.oktetlabs.ru 6C51856 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=oktetlabs.ru; s=default; t=1645691752; bh=r+w3lcbucnkrixMLbBTXkOJY1Gr98A/vfTGjMBHzYco=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=mhfFS4YM3w/sxDuVH16+vPT1FRGw34j8IKwE+HUdsKDYgTJ1xuxMgwncSXyxx9Smn ZSgjD3AwmmALy+yvGwLlm5hbxod/F2fPK89SnzoeOoaMWs2y/sb1BwSwpCkEV4RLB9 IhsiESnMNKCCNGZtdvqo4MISDwGgsg5Ym/6YFWhA= Message-ID: <7b4eeb5c-01ee-40bf-8790-13b9b99aa5b3@oktetlabs.ru> Date: Thu, 24 Feb 2022 11:35:50 +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 03/11] ethdev: bring in async queue-based flow rules operations 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-4-akozyrev@nvidia.com> From: Andrew Rybchenko Organization: OKTET Labs In-Reply-To: <20220223030240.2506513-4-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: > A new, faster, queue-based flow rules management mechanism is needed for > applications offloading rules inside the datapath. This asynchronous > and lockless mechanism frees the CPU for further packet processing and > reduces the performance impact of the flow rules creation/destruction > on the datapath. Note that queues are not thread-safe and the queue > should be accessed from the same thread for all queue operations. > It is the responsibility of the app to sync the queue functions in case > of multi-threaded access to the same queue. > > The rte_flow_async_create() function enqueues a flow creation to the > requested queue. It benefits from already configured resources and sets > unique values on top of item and action templates. A flow rule is enqueued > on the specified flow queue and offloaded asynchronously to the hardware. > The function returns immediately to spare CPU for further packet > processing. The application must invoke the rte_flow_pull() function > to complete the flow rule operation offloading, to clear the queue, and to > receive the operation status. The rte_flow_async_destroy() function > enqueues a flow destruction to the requested queue. > > Signed-off-by: Alexander Kozyrev > Acked-by: Ori Kam Acked-by: Andrew Rybchenko