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 E270141B9E; Wed, 1 Feb 2023 12:00:34 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CF4244282D; Wed, 1 Feb 2023 12:00:34 +0100 (CET) Received: from shelob.oktetlabs.ru (shelob.oktetlabs.ru [91.220.146.113]) by mails.dpdk.org (Postfix) with ESMTP id 2E2B3406A2 for ; Wed, 1 Feb 2023 12:00:33 +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 (4096 bits)) (No client certificate requested) by shelob.oktetlabs.ru (Postfix) with ESMTPSA id 8300150; Wed, 1 Feb 2023 14:00:32 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 shelob.oktetlabs.ru 8300150 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=oktetlabs.ru; s=default; t=1675249232; bh=TslmIF6pPs5f546sVamOHHYj4Cfqu3zHRQIdMknjnEk=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=b0MG1156zCkdP+iYnem8nJwhi54uQPULLz5nXuvy5IRunGqV3Dt94AdGrUBzoxAVY URG/c4zEGY8QGYtYiyi0dGfAhQLze4hZFn3/Z/2aAnjft34U7lO66YdC398itLhtT8 2zILA1SEdlLMz62qY85N34gj64F6/8bA8PLftbwM= Message-ID: <8e660a50-a305-f1d4-ae1d-7e15b054149f@oktetlabs.ru> Date: Wed, 1 Feb 2023 14:00:32 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.6.0 Subject: Re: [PATCH v6 1/2] ethdev: add query_update sync and async function calls Content-Language: en-US To: Gregory Etelson , "dev@dpdk.org" Cc: Matan Azrad , Raslan Darawsheh , Ori Kam , "NBU-Contact-Thomas Monjalon (EXTERNAL)" , Ferruh Yigit References: <20221221073547.988-1-getelson@nvidia.com> <20230119164713.7164-1-getelson@nvidia.com> From: Andrew Rybchenko Organization: OKTET Labs In-Reply-To: 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 1/20/23 19:50, Gregory Etelson wrote: > Hello Andrew, > > [] > >> On 1/20/23 13:46, Gregory Etelson wrote: >>>>> and it's async version `rte_flow_async_action_handle_query_update` >>>>> to atomically query and update flow action. >>>> >>>> Sorry, may be I'm missing something, but after reading previous >>>> discussion I have a feeling that update could be queried data >>>> dependent. However, I don't understand how it could be possible >>>> with API below. Just my misunderstanding? >>>> >>> >>> The goal of `rte_flow_action_handle_query_update()` is to execute query >> and update actions atomically. >>> The function guaranties that action state will not change by any event >> before both update and query complete. >>> If the function was called with the ` RTE_FLOW_QU_QUERY_FIRST ` >> `mode` argument, then update execution can depend >>> on query result. That's up to query format, PMD implementation and >> hardware capabilities. >>> I hope that answered your question. >> >> Sorry, I'm still confused. Could you explain a bit more, >> please. How update could depend on query result? > > Conditional update I described requires special action properties. > Consider an action object with a method that receives query and update as parameters. > The method will activate update only if query result satisfies action state. > If the action was updated, both query and update were atomic for application. > The function returns the action state - updated or not. > Application is aware about the action properties. > Application applies action properties to returned state to discover if action was updated. Is it just a theoretical possibility or do you have an example right now? > >> Caller already specified update structure... > > Regards, > Gregory