From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id E1001A0521; Tue, 3 Nov 2020 15:16:21 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 1C476CC54; Tue, 3 Nov 2020 15:10:28 +0100 (CET) Received: from shelob.oktetlabs.ru (shelob.oktetlabs.ru [91.220.146.113]) by dpdk.org (Postfix) with ESMTP id C9FFACB00 for ; Tue, 3 Nov 2020 15:10:26 +0100 (CET) Received: from [192.168.45.100] (unknown [188.242.7.54]) (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 6705E7F48B; Tue, 3 Nov 2020 17:10:25 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 shelob.oktetlabs.ru 6705E7F48B DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=oktetlabs.ru; s=default; t=1604412625; bh=MpjUoWHtU0LTPZhWXztW8No7hWiOFcjfOOszyt7Gx9Y=; h=Subject:To:Cc:References:From:Date:In-Reply-To; b=oNoyELFSLIjcmyiMRTHqzhDFQ5Ai6ngvHIyzrROtkZlmb96UgFR9VF4EeszMzmy7l wlDyWavuMMKE5L5ItN0skidAO2NfL4FsCBuidhfcPn0jdWC+cjfgi/6Al6tOSKbxV8 gFcdJFKHLclsWqdLJQpdPwUUUyhwUeLVOkx3R8sc= To: Ferruh Yigit , dev@dpdk.org, Andrey Vesnovaty Cc: Xueming Li , Ori Kam , Thomas Monjalon , Andrew Rybchenko References: <20201029114644.22169-1-ivan.malov@oktetlabs.ru> <20201102114317.24492-1-ivan.malov@oktetlabs.ru> <914ca03f-69ed-9cb0-44a3-1a3bf9af79f7@intel.com> From: Ivan Malov Message-ID: <7a9b6c06-ac7e-e1f7-e6e9-6856d2bb90a3@oktetlabs.ru> Date: Tue, 3 Nov 2020 17:10:23 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.3.1 MIME-Version: 1.0 In-Reply-To: <914ca03f-69ed-9cb0-44a3-1a3bf9af79f7@intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Subject: Re: [dpdk-dev] [PATCH v3 1/2] ethdev: introduce transfer attribute to shared action conf X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Hi Ferruh, On 02/11/2020 21:54, Ferruh Yigit wrote: > On 11/2/2020 11:43 AM, Ivan Malov wrote: >> In a flow rule, attribute "transfer" means operation level >> at which both traffic is matched and actions are conducted. >> >> Add the very same attribute to shared action configuration. >> If a driver needs to prepare HW resources in two different >> ways, depending on the operation level, in order to set up >> an action, then this new attribute will indicate the level. >> Also, when handling a flow rule insertion, the driver will >> be able to turn down a shared action if its level is unfit. >> >> Signed-off-by: Ivan Malov >> Acked-by: Ori Kam >> --- >>   lib/librte_ethdev/rte_flow.h | 8 ++++++++ >>   1 file changed, 8 insertions(+) >> >> diff --git a/lib/librte_ethdev/rte_flow.h b/lib/librte_ethdev/rte_flow.h >> index a8eac4deb..8b970ba0b 100644 >> --- a/lib/librte_ethdev/rte_flow.h >> +++ b/lib/librte_ethdev/rte_flow.h >> @@ -3487,6 +3487,14 @@ struct rte_flow_shared_action_conf { >>       /**< Action valid for rules applied to ingress traffic. */ >>       uint32_t egress:1; >>       /**< Action valid for rules applied to egress traffic. */ >> + >> +    /** >> +     * When set to 1, indicates that the action is valid for >> +     * transfer traffic; otherwise, for non-transfer traffic. >> +     * >> +     * See struct rte_flow_attr. >> +     */ >> +    uint32_t transfer:1; > > Is this require any documentation update? > > Also cc'ed Andrey, as he is author of the shared action feature, @Andrey > can you please review this update? Many-many thanks to you for reviewing the patch. And thanks for inviting @Andrey. I should've done that from the very beginning. What's for documentation update, = I did take a look at "doc/guides/prog_guide/rte_flow.rst" after Ori had suggested to do so. As far as I can learn from the file, the convention is to describe the action structure itself, i.e. not any auxiliary structures. For example, direct input to action SHARED is "struct rte_flow_shared_action". And it's already described by an empty table ("table:: SHARED") in the doc file. On the other hand, documentation of "struct rte_flow_shared_action_conf" belongs in a place where the API rte_flow_shared_action_create() is documented. This API is only mentioned by "doc/guides/prog_guide/rte_flow.rst", and it looks like it's not documented anywhere but in the header file itself ("lib/librte_ethdev/rte_flow.h"). So, it looks like this particular patch does not need to provide an update to documentation other that the existing comment before the field in the structure. -- Ivan M