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 F019CA050B; Thu, 7 Apr 2022 15:01:27 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 94E7B4068B; Thu, 7 Apr 2022 15:01:27 +0200 (CEST) Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2083.outbound.protection.outlook.com [40.107.236.83]) by mails.dpdk.org (Postfix) with ESMTP id 8132840689 for ; Thu, 7 Apr 2022 15:01:26 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UG9TdOPB2tyPJrjB/8BWEHchFF2ZxJ0ASNsBEh5JGkM8jw9J9tZKGXUi06bTSK0YYj3Ug/huLZS/7k7QoXDuOWHk21uy0VVpnzBgxUFRwDyy249A4rorul0X776ixM4T2s0ffTQ1NCjAGDUcSTIKJ2PyItR2tpi8xP2+rtM1QJLmypowqG25RifP1Nw2mjKqczNnk2rWnm+3xD3EJFl1UAK1dm822rE1JhoNt3WTuh30NO2CkI6uwRNS/dcsTzu4DocI/1MuOX7ciVtaKOdn2VBxps+qLg9BGLlM5IZTWamBTqkO2Tt0c7Pf4XEFinZCnxNEcHIex/1R0RA8O/hN6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=GT8eYQf1Yohd9RuaKrMJaD05mVV/XIok1TpLUaTYGpc=; b=mE7Yw+xgAN4Wr+oFZ2RyoEbbltiSPciXEm8XDCRVhukBI/2dRkNj2xEw7Hdy1Ql2OxfRBxkEt3IgGLt2vfFIPwii4+3T6Iqg6tqy+hRZr8z2oGVzF7kfQiXY3Au8Xl10jvq9fNJxnmCGMogy20QRBnbr49zW2UQdi2nSQa6rPCNWMgkLQV5UwZFLJ9+u8w2YV/goFgAE3OAYtN8u54zif9nPz4Kyhyr8+nF/G3hTngbikmv6VEehvuhyO38D/HNGip3xfh6QIHlxs4TVf0YUtIPMS/JUrVicb3ap6zKmL6qFiysFCDb8Nf9I38gLbtd0lExNNSOxAVwtPLJbUKvtVg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=GT8eYQf1Yohd9RuaKrMJaD05mVV/XIok1TpLUaTYGpc=; b=sShie1hV+/V5+alH0klVaWK4VHMYpRG/dKti2GuqvWfXgBVO8sPI2S4HoiZILL62Wnx2+AAMkOjCk6UZyei5fHS8X/n3bmrKZS4h4Aq422wHzCTSLK25ySYKKePP2/wZ83yj3xU5JeamFJBWPRRCzx8Rs7Ad46Izqq4J072JqylibC+oYL8eST4R9fgM5z/o3XjoJ1aiT7b8/c/bztmOkAbImczkEPfi7gabcSryEFrjdPMev3k2hmtqOSKytgoDu9Avr1XhBw0lAgyfBB1jxtOv5IIOO1ayWh2tbgdnGAu6wLFW9oGvu1jBUX7LkiK7yp4545e8IxzPux0g6JQ83A== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nvidia.com; Received: from CO6PR12MB5459.namprd12.prod.outlook.com (2603:10b6:303:13b::16) by CH0PR12MB5235.namprd12.prod.outlook.com (2603:10b6:610:d2::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5144.22; Thu, 7 Apr 2022 13:01:24 +0000 Received: from CO6PR12MB5459.namprd12.prod.outlook.com ([fe80::c819:1efc:65dd:196f]) by CO6PR12MB5459.namprd12.prod.outlook.com ([fe80::c819:1efc:65dd:196f%6]) with mapi id 15.20.5144.019; Thu, 7 Apr 2022 13:01:24 +0000 Content-Type: multipart/alternative; boundary="------------uHbAhxYdOGVzQ0q03RS0ruqi" Message-ID: Date: Thu, 7 Apr 2022 21:01:16 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.0 Subject: Re: [RFC 1/2] ethdev: port flags for pre-configuration flow hints Content-Language: en-US To: Ori Kam , "NBU-Contact-Thomas Monjalon (EXTERNAL)" , Ferruh Yigit , Andrew Rybchenko Cc: "dev@dpdk.org" References: From: Jack Min In-Reply-To: X-ClientProxiedBy: HK2PR0401CA0018.apcprd04.prod.outlook.com (2603:1096:202:2::28) To CO6PR12MB5459.namprd12.prod.outlook.com (2603:10b6:303:13b::16) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 3866137b-ca31-4ae8-f878-08da1896b85e X-MS-TrafficTypeDiagnostic: CH0PR12MB5235:EE_ X-LD-Processed: 43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: aXph4gDX79JqG4HPAjWCa+RhFZ+ch87ziy/LD3uZOpMRcYcAb8HSlvEQuAZreQd7p3orz2SKfql+qKcV2nMqLzcg5PnQHsyB4635j/+SyIIiOaqW+alvp0YJs/dp5hOxHeLCLVSKRrlPUs+SyODIv7NvTwTk14T9iLSosOjdxYx0M8g+fJI905/1roTKNNjQO8GkewnGXYMaiG641ndCAT4xTbX04Sl+djfC7oeOPPkFK+aLg3tRiHxJQaEUMm03Cfg/X5x6ofDGTVLwlXktrveMvRzdoJUet0T+1gXz63TzjWzRX2s+pYibv03+RUbw6xdHPrR5D7dYCBRSW60fKq4t316AemAmJ9lFZHT2UJHo79J1PovIeg0AH2N4U4Er/OA6eQ7XhRvdwlBJJlws/n+sut5wmeV4ruFtsHo4KcXU+5cqS3s1ylQg+XSsuImfI8k2cEFFKZr4vsvyVkRpdjtU/8ZfrTJEuQlLCTmJFo26xcUdcxKO6jgvZAw/ysWYzBaprqv5HULnbV7kMlkVsv6rRiNRjIGHWB+EB092/fitWQXgWhGNpbdA7j6lp8immJOqCi4lXqRdbcPtZtFy1eaGKy4JhGGrAj4zuV3zI+jrTtMimtYEfrwM2xDF+UsqnnLwbP+1y+fWSyBkxYZ1jnAIWYcbabXoWvgxr5W+Q9ZwnvzFuAvyVUX4zm2rCREgbpGCmaRN5pG9QMp1tTeUc1pwxjR5gfQB3/p0DZmzQCA= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CO6PR12MB5459.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(4636009)(366004)(6506007)(33964004)(53546011)(2616005)(6666004)(36756003)(8936002)(2906002)(31686004)(5660300002)(8676002)(31696002)(66476007)(66556008)(86362001)(38100700002)(66946007)(4326008)(26005)(83380400001)(186003)(316002)(6486002)(508600001)(110136005)(6512007)(45980500001)(43740500002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?TU9TQmc0dllySWZGam13OEp4cXBRSUtKUDhDbnZOOXpHS2svSnE1QWdNR1BP?= =?utf-8?B?Y3ZqQXVoemxFWDcwSGswS2lQRm9WS0ZUaUQrMytyUFRZVVZjRkQ1c1BLU1U2?= =?utf-8?B?RkY5ejlMSE56cnNZSkttL25pNUkyVTdKajVlSnR1clZyRDd4WDBTNFo5UzRo?= =?utf-8?B?VEUwYm1vS2lRMExPMHloeDJTOUZqeGJwa1JRSTlISjltVzl0MnlqdlowNj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XQ2o2SHZqanQ4Sy8wTHVNWHZydE9oZ2ZGVEFiejZL?= =?utf-8?B?YiszdUNmWUY1R3V5b0JLZ0FmWmhwMklBeE5ieXpJc2t0Mys3bEZ3bi9jdG5W?= =?utf-8?B?V0luVGFoSTg3TDZiZHNiTlBGcDYxeFMwMXFrRVpGZG50d21KN09aYkVxUFBx?= =?utf-8?B?ZkVEbE0zVnFUQlZMRVBJVG4yM2tuUEdnQnRCaEdJOU5UdGRwa1F6RnQzN3FG?= =?utf-8?B?MzFyQ1lyY2JMRHQ5eVZwQzVCSDRJRXZnREx0cXRNeXI4ZDl1MXkxWDA4U0Q2?= =?utf-8?B?STJEQ1l4OVJMUmZQN3YxN0hzV0xNMnJTYys2YWhOdkZCYVZJL2pmQT09?= X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3866137b-ca31-4ae8-f878-08da1896b85e X-MS-Exchange-CrossTenant-AuthSource: CO6PR12MB5459.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Apr 2022 13:01:24.5301 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: gunLvMgYsSO8LunZfBXVsn4zYcw2TAa8f8PJGk4dFDvUM0QHNVgxzSWhNFhDK0e1/PNRPdD10qs13HcXsc6R5g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH0PR12MB5235 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 --------------uHbAhxYdOGVzQ0q03RS0ruqi Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 4/7/22 19:27, Ori Kam wrote: > Hi Jack, Hey Ori, > >> -----Original Message----- >> From: Jack Min >> Sent: Thursday, April 7, 2022 8:31 AM >> Subject: [RFC 1/2] ethdev: port flags for pre-configuration flow hints >> >> The data-path focused flow rule management can manage flow rules in more >> optimized way then tranditional one by using hits provided by >> application in initialization phase. >> >> In addition to the current hints we have in port attr, more hints could >> be proivded by application about it's behaviour. >> >> One example is how the application do with the same flow: >> 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 extanded to cover >> more situations. >> >> Signed-off-by: Xiaoyu Min >> --- >> lib/ethdev/rte_flow.h | 16 ++++++++++++++++ >> 1 file changed, 16 insertions(+) >> >> diff --git a/lib/ethdev/rte_flow.h b/lib/ethdev/rte_flow.h >> index d8827dd184..578dd837f5 100644 >> --- a/lib/ethdev/rte_flow.h >> +++ b/lib/ethdev/rte_flow.h >> @@ -4875,6 +4875,17 @@ rte_flow_flex_item_release(uint16_t port_id, >> const struct rte_flow_item_flex_handle *handle, >> struct rte_flow_error *error); >> >> +/** >> + * The flags of rte flow port >> + */ >> +enum rte_flow_port_flag { >> + /** >> + * All flow operations for one specified flow will _strictlly_ happen >> + * on the same queue (create/destroy/query/update). >> + */ >> + RTE_FLOW_PORT_FLAG_STRICT_QUEUE = RTE_BIT32(0), >> +}; >> + >> /** >> * @warning >> * @b EXPERIMENTAL: this API may change without prior notice. >> @@ -4972,6 +4983,11 @@ struct rte_flow_port_attr { >> * @see RTE_FLOW_ACTION_TYPE_METER >> */ >> uint32_t nb_meters; >> + /** >> + * Port flags. >> + * @see enum rte_flow_port_flag >> + */ >> + enum rte_flow_port_flag flags; > Why the use of enum and not flags? > I guess there will be more flags in future, and those flags will not be related to the strict queue. Yes, you are right. We will have more flags, and they will not relate to strict queue. I will change it to "flags". Thank you. >> }; >> >> /** >> -- >> 2.35.1 --------------uHbAhxYdOGVzQ0q03RS0ruqi Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit
On 4/7/22 19:27, Ori Kam wrote:
Hi Jack,
Hey Ori,

-----Original Message-----
From: Jack Min <jackmin@nvidia.com>
Sent: Thursday, April 7, 2022 8:31 AM
Subject: [RFC 1/2] ethdev: port flags for pre-configuration flow hints

The data-path focused flow rule management can manage flow rules in more
optimized way then tranditional one by using hits provided by
application in initialization phase.

In addition to the current hints we have in port attr, more hints could
be proivded by application about it's behaviour.

One example is how the application do with the same flow:
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 extanded to cover
more situations.

Signed-off-by: Xiaoyu Min <jackmin@nvidia.com>
---
 lib/ethdev/rte_flow.h | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/lib/ethdev/rte_flow.h b/lib/ethdev/rte_flow.h
index d8827dd184..578dd837f5 100644
--- a/lib/ethdev/rte_flow.h
+++ b/lib/ethdev/rte_flow.h
@@ -4875,6 +4875,17 @@ rte_flow_flex_item_release(uint16_t port_id,
 			   const struct rte_flow_item_flex_handle *handle,
 			   struct rte_flow_error *error);

+/**
+ * The flags of rte flow port
+ */
+enum rte_flow_port_flag {
+	/**
+	 * All flow operations for one specified flow will _strictlly_ happen
+	 * on the same queue (create/destroy/query/update).
+	 */
+	RTE_FLOW_PORT_FLAG_STRICT_QUEUE = RTE_BIT32(0),
+};
+
 /**
  * @warning
  * @b EXPERIMENTAL: this API may change without prior notice.
@@ -4972,6 +4983,11 @@ struct rte_flow_port_attr {
 	 * @see RTE_FLOW_ACTION_TYPE_METER
 	 */
 	uint32_t nb_meters;
+	/**
+	 * Port flags.
+	 * @see enum rte_flow_port_flag
+	 */
+	enum rte_flow_port_flag flags;
Why the use of enum and not flags?
I guess there will be more flags in future, and those flags will not be related to the strict queue.

Yes, you are right. We will have more flags, and they will not relate to strict queue.

I will change it to "flags".

Thank you.


      
 };

 /**
--
2.35.1

    
--------------uHbAhxYdOGVzQ0q03RS0ruqi--