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 D8B54A0547; Wed, 1 Jun 2022 20:21:04 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B9EB440689; Wed, 1 Jun 2022 20:21:04 +0200 (CEST) Received: from shelob.oktetlabs.ru (shelob.oktetlabs.ru [91.220.146.113]) by mails.dpdk.org (Postfix) with ESMTP id 409224003F for ; Wed, 1 Jun 2022 20:21:03 +0200 (CEST) Received: from [192.168.1.126] (unknown [188.242.181.57]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by shelob.oktetlabs.ru (Postfix) with ESMTPSA id 7E0A4B2; Wed, 1 Jun 2022 21:21:00 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 shelob.oktetlabs.ru 7E0A4B2 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=oktetlabs.ru; s=default; t=1654107660; bh=P6t3Dxh22XzvPj5IgMpLSAmxIpev3ucIF0D7Nczi0IU=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=k7HXwG7Gfi2SiD+IYp6VQeVocNzhPehw0HZXLkhPIEUe3qWOr4tFSAes9tZvV2Zv0 1LPyWoXQXL4QNI84mIjMInHvYfdachmndIcqMi/xJae1us/FD9pSeMenQVNmYPySn1 uRLyPkH7i3N4dAfwVgX8gEFP+gE2mDnw4XKP9+wI= Message-ID: <9dfcaec4-c4af-2e64-909d-51ca0f8da554@oktetlabs.ru> Date: Wed, 1 Jun 2022 21:20:59 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.0 Subject: Re: [RFC v2 1/2] ethdev: port flags for pre-configuration flow hints Content-Language: en-US To: Xiaoyu Min , thomas@monjalon.net, Ori Kam , Ferruh Yigit Cc: dev@dpdk.org References: <608febf8d5d3c434a1eddb2e56f425ebbd6ff0b4.1654063912.git.jackmin@nvidia.com> From: Andrew Rybchenko In-Reply-To: <608febf8d5d3c434a1eddb2e56f425ebbd6ff0b4.1654063912.git.jackmin@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 Summary must not be a statement. May be: ethdev: add strict queue to pre-configuration flow hints On 6/1/22 10:39, Xiaoyu Min wrote: > The data-path focused flow rule management can manage flow rules in more > optimized way than traditional one by using hints provided by > application in initialization phase. > > In addition to the current hints we have in port attr, more hints could > be provided by application about its behaviour. > > One example is how the application do with the same flow rule ? > A. create/destroy flow on same queue but query flow on different queue > or queue-less way (i.e, counter query) > B. All flow operations will be exactly on the same queue, by which PMD > could be in more optimized way then A because resource could be > isolated and access based on queue, without lock, for example. > > This patch add flag about above situation and could be extended to cover > more situations. > > Signed-off-by: Xiaoyu Min > --- > lib/ethdev/rte_flow.h | 11 +++++++++++ > 1 file changed, 11 insertions(+) > > diff --git a/lib/ethdev/rte_flow.h b/lib/ethdev/rte_flow.h > index d8827dd184..38439fcd1d 100644 > --- a/lib/ethdev/rte_flow.h > +++ b/lib/ethdev/rte_flow.h > @@ -4948,6 +4948,12 @@ rte_flow_info_get(uint16_t port_id, > struct rte_flow_queue_info *queue_info, > struct rte_flow_error *error); > > +/** > + * Indicate all operations for a given flow rule will _strictly_ happen > + * on the same queue (create/destroy/query/update). > + */ > +#define RTE_FLOW_PORT_FLAG_STRICT_QUEUE RTE_BIT32(0) > + > /** > * @warning > * @b EXPERIMENTAL: this API may change without prior notice. > @@ -4972,6 +4978,11 @@ struct rte_flow_port_attr { > * @see RTE_FLOW_ACTION_TYPE_METER > */ > uint32_t nb_meters; > + /** > + * Port flags. > + * @see RTE_FLOW_PORT_FLAG_STRICT_QUEUE I'm not sure that it is a good idea to list flags here. If so, it will be required to add all future flags here. So, may be just "Port flags (RTE_FLOW_PORT_FLAG_*)" > + */ > + uint32_t flags; > }; > > /**