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 79A0FA04E6; Fri, 30 Oct 2020 21:35:30 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id CD77F4C73; Fri, 30 Oct 2020 21:35:28 +0100 (CET) Received: from shelob.oktetlabs.ru (shelob.oktetlabs.ru [91.220.146.113]) by dpdk.org (Postfix) with ESMTP id 976652BF5 for ; Fri, 30 Oct 2020 21:35: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 14F117F541; Fri, 30 Oct 2020 23:35:25 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 shelob.oktetlabs.ru 14F117F541 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=oktetlabs.ru; s=default; t=1604090125; bh=+Jjd1ZPR92tZfs4fLxILKAt5cMdaen2m2xOsK3FecD4=; h=Subject:To:Cc:References:From:Date:In-Reply-To; b=qyE4BYAcoIEfy2aQE6rG+ZzSutOWCI4a0g81QiIjqf13Qc0scAmj1yqQmPf/Pfvaw jnOTayqu86CvnB0aMBgYhPHZ2mG/NekCVkBWZIHazERTB7gP1OmmYS8380z/Du/mvw MyLDZqIhlT6frBqdi41wBh+0TvFFiMMh03YfOS3c= To: "Xueming(Steven) Li" , "dev@dpdk.org" Cc: Ori Kam , NBU-Contact-Thomas Monjalon , Ferruh Yigit , Andrew Rybchenko References: <20201029114644.22169-1-ivan.malov@oktetlabs.ru> From: Ivan Malov Message-ID: <66df746e-1a70-d2bb-fa31-7df2a81faac4@oktetlabs.ru> Date: Fri, 30 Oct 2020 23:35:22 +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: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH 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, On 30/10/2020 18:49, Xueming(Steven) Li wrote: > Hi Ivan, > >> -----Original Message----- >> From: dev On Behalf Of Ivan Malov >> Sent: Thursday, October 29, 2020 7:47 PM >> To: dev@dpdk.org >> Cc: Ori Kam ; NBU-Contact-Thomas Monjalon >> ; Ferruh Yigit ; Andrew >> Rybchenko >> Subject: [dpdk-dev] [PATCH 1/2] ethdev: introduce transfer attribute to >> shared action conf >> >> 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. > Most actions apply to both level, rss and queue action applies on non-transfer level, > Port action applies to transfer level. Is there a particular scenario for this new attribute? Most doesn't mean all, and you've already described some of the exceptions. And that's exactly the deal. Particular scenarios are don't cares given the fact that such an attribute is meant to be a generic solution. If an action happens to be supported on both levels, this doesn't necessarily mean that HW resources/objects that need to be prepared in the two cases are of the same type (or programmed to the NIC the same way). This is exactly what applies to flow rules (which do have attribute transfer) and what should be done to shared action conf, too. If this still seems vague, please let me know. > >> >> Signed-off-by: Ivan Malov >> --- >> lib/librte_ethdev/rte_flow.h | 7 +++++++ >> 1 file changed, 7 insertions(+) >> >> diff --git a/lib/librte_ethdev/rte_flow.h b/lib/librte_ethdev/rte_flow.h index >> a8eac4deb..0b993d8eb 100644 >> --- a/lib/librte_ethdev/rte_flow.h >> +++ b/lib/librte_ethdev/rte_flow.h >> @@ -3487,6 +3487,13 @@ 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. */ >> + >> + /** >> + * This attribute matches that of the flow rules which >> + * are supposed to comprise the given shared action. >> + * See struct rte_flow_attr. >> + */ >> + uint32_t transfer:1; >> }; >> >> /** >> -- >> 2.20.1 -- Ivan M