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 EBC39A0548; Thu, 2 Jun 2022 11:38:25 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D386C40691; Thu, 2 Jun 2022 11:38:25 +0200 (CEST) Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2074.outbound.protection.outlook.com [40.107.237.74]) by mails.dpdk.org (Postfix) with ESMTP id B4FC04021E for ; Thu, 2 Jun 2022 11:38:24 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NlgBUac6XPnrN2xjFhWAO4QZzIO8EHmL2xnXMHl/B8jmczG0r33riE8YPu+cmAkMJLt1MMRyYndyoC3Ghh57VZRZDWp1v0TrpVM1l+JVyMIJz/0FUS30ub4Hp2PnEX+U9uhbleZN6AWJpwF0QlGXifqDSnMu+lX/k2CYB+ECHnl+60sjjG5iWnxJkEUD1I0T8KEoCrmGMYqVAEJSnHh2sgoIuGe83htBi6ijLrQ5Go155m+fEI7dhLoI17TO0o7FNMcPWo03kgHTxVRPk/+X1uwz7C72KOvr5788eZNerkmaovd9GLzApw9+rJbw0Hkr9VAks5VUf2JTi8t10wcncA== 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=4w/oR/qXKhd3fh8/rJSAbnbBQ4T7nu17wl+oUq0Ke7Y=; b=hHf9+5Yr8Fd1Ce+MjXWn2b+OgbrMDw0eBvezDKFzeav3Aqap/AEg/JLwTL/G4xvK+aKqZX4KmtwYdz99y2xOw5HPIPetRzOYHSMKxAjaJAt/dbU2kvkOTzbfF1b7+bHkcgSpqWPAKOGrHjC/UHs7annyoC7hJDJ7bNizGbeseNgOaohk11SMvcEJthWgf+XBUMzVdnNZXTobTVEX0zJar0MhKJDxeHsF7UsnctQ+H8F2AomreD00aDOP4tILeSlY3U13HvwsFqjrE2ZhhSt25umMjQ84KBikdP1pJKTaix8BIAASlnG37zD5Fg0nIwdViLK2Psh0gIQ3qjbJolK91w== 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=4w/oR/qXKhd3fh8/rJSAbnbBQ4T7nu17wl+oUq0Ke7Y=; b=k0gCek8HXzs7FIII+ym5sMeDcdtrYCRm02CaV+KQd2rCFH5zZKVuxsrMG/uVK20VEMlhO83A9XWvBXoSJbDc91h8aks9WPG8n2BULinkO8WhV645PgYAlTNKkDuYuBAUkqQnVjpKUOo6o+vkuXSqs7/OvmRaPpyf6Q+p1fc7sZy6qVDhZH+lyUs2gNgoTWuA0ndWdEJZRyOd99jWaJQfWMJpihFR1GpRTyC1IQefUAIKrq/N9PZAuPZjoe99mSYVM4P7v52Dvt+WiiA3k4jlmfylxOlZOBzdsKDygvZ2tvWCyxAC2rA2D0G4RSW0fYDe4E8sr589oPoWWywe82uOrQ== 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 SJ0PR12MB5633.namprd12.prod.outlook.com (2603:10b6:a03:428::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5314.13; Thu, 2 Jun 2022 09:38:23 +0000 Received: from CO6PR12MB5459.namprd12.prod.outlook.com ([fe80::34ef:8717:3038:667]) by CO6PR12MB5459.namprd12.prod.outlook.com ([fe80::34ef:8717:3038:667%3]) with mapi id 15.20.5314.014; Thu, 2 Jun 2022 09:38:22 +0000 Content-Type: multipart/alternative; boundary="------------1IneFPNsxoZ0m3SVRqc0wo04" Message-ID: <22d7d621-92a8-9d2c-0c72-e00ac15ae887@nvidia.com> Date: Thu, 2 Jun 2022 17:38:16 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 Subject: Re: [RFC v2 1/2] ethdev: port flags for pre-configuration flow hints Content-Language: en-US To: Andrew Rybchenko , thomas@monjalon.net, Ori Kam , Ferruh Yigit Cc: dev@dpdk.org References: <608febf8d5d3c434a1eddb2e56f425ebbd6ff0b4.1654063912.git.jackmin@nvidia.com> <9dfcaec4-c4af-2e64-909d-51ca0f8da554@oktetlabs.ru> From: Jack Min In-Reply-To: <9dfcaec4-c4af-2e64-909d-51ca0f8da554@oktetlabs.ru> X-ClientProxiedBy: HK2PR0401CA0012.apcprd04.prod.outlook.com (2603:1096:202:2::22) 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: 06e980f5-611b-4f6f-2d5f-08da447ba280 X-MS-TrafficTypeDiagnostic: SJ0PR12MB5633: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: 6dlbiu2Es8eDELgDdaRX5fooNGrpm3253eBBoZuV0F6qsoDxM1dEv3CahG6BaYRzumXsCNBsef15ikN1L0qXbe4QDvSJ1IkcNZK/jDVNXi22ytzwU4FLKjRSZPNLDdoMO/7tUhwLjngwL5hYLUKX/Cr7jcrVcZXS9QU5g8s9Mgzp07LoIkgr+r46cubxEMgapfaSBRyG7mPs0FoxK6YPQFTWQZBVdtYTQ0ZyPmvizWlacdzW1KCUxdORsuMOcMK7ddScx4msjxgkkobEjcUvL1vCL7p5v7E7LXivSlDvTbtSUbPv21UBYZUIVGa9qoN6V9ogvXrTj1Otp8ZhjPuiQrqZazDhHRviYkRJ7hp30ARsRJH4GldlHKwYL1G+EWAePQGDzSFCMH1MtuM06gXESwnjlwRDk2SkLj1NZqooJm+puufYtUiuOtxPpjBOsulgguBKWcdQf5oOFSyffaAyL6wRtgT/q3uWrW52BpqpBH41E6jjVvRAQKIsV6lwUU1BVe59Vy7PTW/MBwg+DrHaUSRcKJhX+HWkKlbDDfPmHdLMEs1CbPXOB95gJgdpIDNUIEqYSStvQ4YHgkG9tX8zRv154aW/4JJNrnGI6dTJT+PLGpNpRlDNuxn5FfzzxxAGU3c5X0fv6BSBTO4n5BpI5nNfZk2zjWUaVDfuPxu5jiqkouAN164X4TOtTWf8pNTH31yhHtEiGQ+9sfG9p130if8ytgRjfKwlbilUfCOCBL8= 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)(38100700002)(36756003)(5660300002)(6486002)(53546011)(6666004)(6506007)(31686004)(33964004)(6512007)(26005)(110136005)(8936002)(316002)(66476007)(66556008)(31696002)(8676002)(2616005)(66946007)(86362001)(2906002)(4326008)(186003)(508600001)(83380400001)(43740500002)(45980500001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?YmhQNlg3bnJ0NFV6S3hXT2cvelhPb2oxUjFPQXdlTzd4YmYveDN0cDVhNjlO?= =?utf-8?B?dlRmOEJuaVFJVUE0SEpBMlFmQ3piK084REQxbjF5YTZleXVON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k5QTVPbHYzTW5oVjYxZCtCRFhTODRTMnhPQ0ZrUGVhUXJ5UkFzYmVzeFdl?= =?utf-8?B?RkpNMUwwYUFKWXE5VlJCd0VjOGduVy94UmdjN2NBc0RGSjdGQWFUOFRkcndq?= =?utf-8?B?Z2tRVWlVTmlOWkRHcFBJQmtyQVFFVTBScW5TdFZKT2pOM3lBV2grcVl6ZnUv?= =?utf-8?B?Mlg5OWlDdjh6VHg5YVZkcWR4bmlkV21tWC9MRkkwVERZNHk2RVR5V0c5RzY1?= =?utf-8?B?UjFlVVFvWW5JbDVONzJ0eXloZUZ1dTBlRjFoSkpjOFltcEpOWHNsQ0oxandt?= =?utf-8?B?Mm1NUVJadG1yWW1wM0lWMGtCY0dCRkc4SERIYmdtaDNxcjlOK0hLeWdVbk4w?= =?utf-8?B?MS8rbHkrYmNkb1JOZXVJQUVXK3lYeDJwT2lyMmhZN2xiWURDSUtMUGtDdENw?= =?utf-8?B?RUZRSHRCR0F3VlM3WTVRUkZBN1NBYmNRVnArUlNKWnBhV1Y5R0lsZz09?= X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-Network-Message-Id: 06e980f5-611b-4f6f-2d5f-08da447ba280 X-MS-Exchange-CrossTenant-AuthSource: CO6PR12MB5459.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Jun 2022 09:38:22.6040 (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: LkLBP1mVXpa61mWqn1XlnkxoPzbRHBUgLMW0YPX/0257Eu1R9/P/LEw9Wf/XIjkj/afo0E0F+HDyopAJO9mZXA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR12MB5633 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 --------------1IneFPNsxoZ0m3SVRqc0wo04 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 6/2/22 02:20, Andrew Rybchenko wrote: > Summary must not be a statement. May be: > ethdev: add strict queue to pre-configuration flow hints Ok, I'll change to this. > > 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. Yes, it will become a lot later on. > So, may be just "Port flags (RTE_FLOW_PORT_FLAG_*)" Sure. > >> +     */ >> +    uint32_t flags; >>   }; >>     /** > --------------1IneFPNsxoZ0m3SVRqc0wo04 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit
On 6/2/22 02:20, Andrew Rybchenko wrote:
Summary must not be a statement. May be:
ethdev: add strict queue to pre-configuration flow hints
Ok, I'll change to this.

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 <jackmin@nvidia.com>
---
  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.
Yes, it will become a lot later on.
So, may be just "Port flags (RTE_FLOW_PORT_FLAG_*)"
Sure.

+     */
+    uint32_t flags;
  };
    /**

--------------1IneFPNsxoZ0m3SVRqc0wo04--