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 AA82B43B38; Wed, 14 Feb 2024 16:56:24 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 62D9F40608; Wed, 14 Feb 2024 16:56:24 +0100 (CET) Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2075.outbound.protection.outlook.com [40.107.220.75]) by mails.dpdk.org (Postfix) with ESMTP id B979840263 for ; Wed, 14 Feb 2024 16:56:22 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Zf9NhcAL8eeevhUVelMX2ANTHHdytU6Uj3Cb/cayTena7LNtZ8JVlNLDG7fohdNsyCfjdk4EN/kqaeb33Ut4F6pI/osCyw8k5Eqj+UuamP1acElcezOQdsb9kJdlXrpYa2X4qPElKe+JELxXmR3yfMt5Ie4niV0tnhZgtinTDX8dMDw0cvi5G4qmeGww/ftq8oJN9PqlHy4haCJii9zV2EIqxBJadP/a/AOr8NNUSdjyVhvK2q8O20DiFAnSsmZ+KVMsK5qB2IyYszkyksT/3K2omrIqr675jUx4YLTeemR7ZN1p8RLSG/HSqsXBc4jjAU17JTkmHW5tqMYInxkF+Q== 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=4dxHYj8G3s6l2s/Z+kb0R7gBCvizOHlmArMJzTa+nVM=; b=jDq6fJelsC9Zendw9E6kaWDONsg96bg+bVqo/9ianLYTu5bZf6K/lktowuVkxxmcH8ttJBV60nRKVkxAjaXWqLGgNE5XNVBdIibaIYuzfqeEFRIu/lWXgUV9tVZh1WdxFWn6CwdkHQ2QEgRWsf3o+F3dcHpdnbjA4Zob6nPd3SkuRYAadr9NVYqglWohge7B0AHJfC/GbZ7/6AgKk+J4u5EeHRDgVwIstmLOimp/qwoUzD4MNb3FCCtcjirqOVbDu945IVsEuEbQet5/hAKMmtCQg0hnkMHw2dI6uBjNI+u+fpYlbHr3cPEPZtJWSTefX/NbqAjDcVHP2itqHFoTjQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=4dxHYj8G3s6l2s/Z+kb0R7gBCvizOHlmArMJzTa+nVM=; b=1ZkR/LdJcU4oOB38y3XkSsIrK0RV2VxFcvbf89GXP2yuegl/Sl6ZTsCgBwZ3CHgxTCR/MwGv5Kk/VyVa9zaNBW2xKYlwYjTsz/IpQ7WGWs+Y9fNZJTU2+cAf0mq1slvx298pxpuo0e7oku3mMwsb1Cd/alKHh06tv0LbyaLgp00= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) by PH0PR12MB5607.namprd12.prod.outlook.com (2603:10b6:510:142::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7292.25; Wed, 14 Feb 2024 15:56:20 +0000 Received: from CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::3ec7:6339:1c14:c529]) by CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::3ec7:6339:1c14:c529%4]) with mapi id 15.20.7292.028; Wed, 14 Feb 2024 15:56:19 +0000 Message-ID: <8dda8697-8719-46cb-be65-eababae1ccf4@amd.com> Date: Wed, 14 Feb 2024 15:56:15 +0000 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v7] ethdev: add template table resize API Content-Language: en-US To: Gregory Etelson , dev@dpdk.org Cc: mkashani@nvidia.com, Ori Kam , Aman Singh , Yuying Zhang , Thomas Monjalon , Andrew Rybchenko References: <20231217093205.321082-1-getelson@nvidia.com> <20240214143218.62630-1-getelson@nvidia.com> From: Ferruh Yigit Autocrypt: addr=ferruh.yigit@amd.com; keydata= xsFNBGJDD3EBEAC/M7Tk/DfQSmP1K96vyzdhfSBzlCaGtcxNXorq4fALruqVsD3oi0yfyEz9 4YN8x7py0o9EL8ZdpOX0skc0AMCDAaw033uWhCn0GLMeGRKUbfOAPvL6ecSDvGD7CJIO9j0J eZUvasBgPdM/435PEr9DmC6Ggzdzt8IuG4PoLi5jpFSfcqxZFCCxLUDEo/w0nuguk2FTuYJg B2zEZ4JTBZrw7hIHiFh8D8hr6YA6a5uTofq1tr+l048lbtdFUl8TR0aIExVzE4Z8qKZlcE+9 RQaewjK5Al1jLE4sHdmd3GN+IvgDF3D/fLsi25SKJDeGSdeHkOmaX0qGeM4WKIfU6iARRCiQ N3AmBIxZ/A7UXBKLaOyZ+/i3sE6Wb53nrO4i8+0K2Qwyh6LjTeiJAIjYKN43ppxz3DaI+QwQ vI+uyHr4Gg0Da9EPPz/YyKauSeOZCfCB5gIfICO0j6x0SCl8uQ2nLpjxcZkf0gjcwUzP3h+S 3x6NfDji9YEij0zczW/dcSpGgZ6vsFpPrtnP9ZXy6J53yp0kJtOJoOlkEFFdU2yCZnCDseum CoudmGLZVvS0/DzHDJejq+3kK3FDGktZBOxZIIpal+nFqS7lVgOZc4+huVv3jyhzoAUOEyXA XK5j6o7g8STUY+z33QNnHpdLvecMwuzmvqy0jR54yAbZ64mB9QARAQABzSNGZXJydWggWWln aXQgPGZlcnJ1aC55aWdpdEBhbWQuY29tPsLBlwQTAQgAQQIbAwULCQgHAgYVCgkICwIEFgID AQIeAQIXgAIZARYhBEm7aYjps5XGsPHCEl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qkZQ795MTe2YScp9dIV7fsS5tpDwIs7BZNVM1l3NAdK+DLHqNxKuyO 8Zk= In-Reply-To: <20240214143218.62630-1-getelson@nvidia.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO4P123CA0228.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:1a6::17) To CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH2PR12MB4294:EE_|PH0PR12MB5607:EE_ X-MS-Office365-Filtering-Correlation-Id: 6ffbf1fe-5793-4d09-b788-08dc2d757c0e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: x1dQbMyH+RdFi0pBhJ9PYd6Fu9K41f8j1lPIaVpuDJiT8HMkdtWShc1FHRJ/opp0l3Z+z0lZRXd+9qGGJdr4BriKA42y3O8hAFWxYUkUkHQBieSP5fMMhr4juLPk5iZTLFXIYHOE17OVWc2iRyWNi62Qa+h3lTHVV74eEkXKoCP5HjxsBMalWXD9THluQSBIIOvOzib9K48jmPP0NRqLZrcKRFr/Be06qX15EcHw9i2W7yDyeaKL86Jc7CcbiHNrqa+rUVVOvMHH/r5NPMLSbrk6pI62SUSpBnRgt2C/jiM69zERHOigDYbrao4Vuige0QO0mPf19MCEa8yap8WHMFtkh7iBDTlUDpNrC4C2pOjMIWA7CFthJOgUD1Es7Xs3hx7ZLsl8cfL7l5AyUKEruHBJ2GXAK4c69Mq/QGGGvVlY1nPnpjDAm8Q598oUgK2wvs6pQp7RDy9VD005TrY5Nf9IPkcbiqZmcrUeFZE4S3mPXYWn/p4JzNZGpifBvkSlobJfgRb2uX63bXbZtT8boJjryA3q3Z4//sInys9Y0ey238WeuZVWwbbtyf8xE5bs X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CH2PR12MB4294.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(366004)(376002)(346002)(396003)(39860400002)(136003)(230922051799003)(230273577357003)(186009)(64100799003)(451199024)(1800799012)(83380400001)(2616005)(26005)(41300700001)(38100700002)(478600001)(4326008)(53546011)(66556008)(66946007)(66476007)(8936002)(8676002)(5660300002)(44832011)(2906002)(6506007)(6512007)(6486002)(54906003)(316002)(6666004)(36756003)(31696002)(86362001)(31686004); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?MEZEZEgrOHkvb3FjUVdYU0FNb2gweWlRa3NFcUhlWDFuNXhPVnpzMnZ3cXRB?= =?utf-8?B?QS94YmZhUVRnYzBiN3g5N29VcW9NamhuRWgrQWptVVFNbGF1UUlBL1EwazBo?= =?utf-8?B?djFRYkJsQ2FHUGNISWJhWTg5QWZId3FxZVdwcXp1ZWt0c2tTY0N6MGRlRjR5?= =?utf-8?B?RE42MWdUeVdiQ2FvT3I3b1pJMkRCVWNFKzNaR0cweWQzOUtFUlRtdWF6K2tW?= =?utf-8?B?VzM4UTU5bXdiVlcyTThMU3l4WkxhcVdvSjBPb0U1citVejNIY2N5eHNsRGJ0?= =?utf-8?B?LzFKVmQ0d0NIa0tSTW9DbVRBV2NWNnVuYmJKS081NEd3U3FSSlJGK3NIb3BO?= =?utf-8?B?M3gyMTdjemFHUlJJVTZLUi9rNGJUdTRyQmoyLzFPNUM0dkp5TzhKUXBqeVJU?= =?utf-8?B?cXRXdkhMUnVwbkl3ZHJHaEwrNHRveW1XN20vajc4NGcveTNOcG8zcDVJcDNo?= =?utf-8?B?Mml6V0x6aEdNbUF1eXlVYVRUY3VhYWJuSUhXUStjVk0wdUFSK1dCOHpLZnZt?= =?utf-8?B?Sng3dDJOc0JERkM3STZ2UG9HSFVxRG1abjhyejJ3WTYyd0c4ZXIyYi93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ZE05eXVDT3ROYWZqODRZ?= =?utf-8?B?cUJWSmpiT21MWjBKaXVybm5zRFNuZDJjRWlFbERYb2gvM1NDOS9yNkZlYnV2?= =?utf-8?B?bXNJNEZEc09UQVhrZkpoSUpJcHNjMXVkZVpsSWl4ZWVPTUtuNkFlNElWaHE3?= =?utf-8?B?SlNMR1ZpdXNEVFZKcmZrc1NaRjdGZlVxU0Q5NmVlRGdHRk5rMHJpREpFRWVY?= =?utf-8?B?RE9WWXVsSmhUUmxnY205NW9XZllsZTYrQkNnYmVxSlVTVlhzRDRlMXdjZkxX?= =?utf-8?B?d0NHeUhYSmpJNHU1SitOQlBJWWRoaCtkeDZHRW1aWVAxcis3bVZLaDFlOENv?= =?utf-8?B?WXFqSlh6M2ZiWW52Z2U1eEJMUTZweHR4R1VoWUJPOEFhTjVVQ3ZJRnBTL3p0?= =?utf-8?B?VVBzWFBFNmlKZTRjS0dabkpQWU9NTk1xak9rQTY3Zko3TmRWOFZlbm5nKzVn?= =?utf-8?B?WUorS0pQSitsamgxQzM0VjFrMW92U2xJN1VYWU1XcWlrVnVwREhwM2hsVjFz?= =?utf-8?B?clFibGxPUjhVWlRiVExUS1I0dGZQSG5Hb01NQ29MOUo5TzZkUEU0OFhsU01O?= =?utf-8?B?VWs1K0t6QytUR0hBeUszazlXVXorN21vZnMyT2FaT3JCNXZmNG9vTWg5Y2tw?= =?utf-8?Q?jSf59NHVIcLaejYt+fjpmIpIv?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6ffbf1fe-5793-4d09-b788-08dc2d757c0e X-MS-Exchange-CrossTenant-AuthSource: CH2PR12MB4294.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Feb 2024 15:56:19.8381 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: wpiymkXRqzrCD8orVTh8ALtx3UuGNWuaSFJRQiVhEdZMGL5g1i8h0rQs+AEE9sP+ X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR12MB5607 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 On 2/14/2024 2:32 PM, Gregory Etelson wrote: > Template table creation API sets table flows capacity. > If application needs more flows then the table was designed for, > the following procedures must be completed: > 1. Create a new template table with larger flows capacity. > 2. Re-create existing flows in the new table and delete flows from > the original table. > 3. Destroy original table. > > Application cannot always execute that procedure: > * Port may not have sufficient resources to allocate a new table > while maintaining original table. > * Application may not have existing flows "recipes" to re-create > flows in a new table. > > The patch defines a new API that allows application to resize > existing template table: > > * Resizable template table must be created with the > RTE_FLOW_TABLE_SPECIALIZE_RESIZABLE_TABLE bit set. > > * Application resizes existing table with the > `rte_flow_template_table_resize()` function call. > The table resize procedure updates the table maximal flow number > only. Other table attributes are not affected by the table resize. > ** The table resize procedure must not interrupt > existing table flows operations in hardware. > ** The table resize procedure must not alter flow handles held by > application. > > * After `rte_flow_template_table_resize()` returned, application must > update table flow rules by calling > `rte_flow_async_update_resized()`. > The call reconfigures internal flow resources for the new table > configuration. > The flow update must not interrupt hardware flow operations. > > * After table flows were updated, application must call > `rte_flow_template_table_resize_complete()`. > The function releases PMD resources related to the original > table. > Application can start new table resize after > `rte_flow_template_table_resize_complete()` returned. > > Testpmd commands: > > * Create resizable template table > flow template_table create table_id resizable \ > [transfer|ingress|egres] group \ > rules_number \ > pattern_template [ pattern_template [ ... ]] \ > actions_template [ actions_template [ ... ]] > > * Resize table: > flow template_table resize table_resize_id \ > table_resize_rules_num > > * Queue a flow update: > flow queue update_resized rule > > * Complete table resize: > flow template_table resize_complete table > > Signed-off-by: Gregory Etelson > Acked-by: Ori Kam > Acked-by: Ferruh Yigit > --- > v2: Update the patch comment. > Add table resize commands to testpmd user guide. > v3: Rename RTE_FLOW_TABLE_SPECIALIZE_RESIZABLE macro. > v4: Remove inline. > Add use case to rte_flow.rst. > v5: Update API guide in the rte_flow.rst. > v6: Update docs. > v7: More API doc updates. > --- > app/test-pmd/cmdline_flow.c | 86 +++++++++++++- > app/test-pmd/config.c | 102 +++++++++++++++++ > app/test-pmd/testpmd.h | 6 + > doc/guides/howto/rte_flow.rst | 88 +++++++++++++++ > doc/guides/rel_notes/release_24_03.rst | 12 ++ > doc/guides/testpmd_app_ug/testpmd_funcs.rst | 15 ++- > lib/ethdev/ethdev_trace.h | 33 ++++++ > lib/ethdev/ethdev_trace_points.c | 9 ++ > lib/ethdev/rte_flow.c | 77 +++++++++++++ > lib/ethdev/rte_flow.h | 119 ++++++++++++++++++++ > lib/ethdev/rte_flow_driver.h | 15 +++ > lib/ethdev/version.map | 6 + > 12 files changed, 562 insertions(+), 6 deletions(-) > Having conflict while applying the patch, can you please rebase it on latest 'next-net'? <...> > diff --git a/doc/guides/rel_notes/release_24_03.rst b/doc/guides/rel_notes/release_24_03.rst > index 39088da303..ec4d317af7 100644 > --- a/doc/guides/rel_notes/release_24_03.rst > +++ b/doc/guides/rel_notes/release_24_03.rst > @@ -55,6 +55,18 @@ New Features > Also, make sure to start the actual text at the margin. > ======================================================= > > +* **Added API to change template table flows capacity.** > + > + * ``RTE_FLOW_TABLE_SPECIALIZE_RESIZABLE_TABLE`` table configuration bit. > + Set when template must be created with the resizable property. > + * ``rte_flow_template_table_resizable()``. > + Query wheather template table can be resized. > s/wheather/whether/ <...> > +/** > + * @warning > + * @b EXPERIMENTAL: this API may change without prior notice. > + * > + * Query whether a table can be resized. > + * > + * @param port_id > + * Port identifier of Ethernet device. > + * @param tbl_attr > + * Template table. > + * > + * @return > + * True if the table can be resized. > + */ > +__rte_experimental > +bool > +rte_flow_template_table_resizable > + (__rte_unused uint16_t port_id, > + const struct rte_flow_template_table_attr *tbl_attr); > + Syntax above is odd, why not move parenthesis to first line. <...> > /** > * @warning > * @b EXPERIMENTAL: this API may change without prior notice. > @@ -6750,6 +6774,101 @@ rte_flow_calc_table_hash(uint16_t port_id, const struct rte_flow_template_table > const struct rte_flow_item pattern[], uint8_t pattern_template_index, > uint32_t *hash, struct rte_flow_error *error); > > +/** > + * @warning > + * @b EXPERIMENTAL: this API may change without prior notice. > + * > + * Update template table for new flow rules capacity. > + * > + * @param port_id > + * Port identifier of Ethernet device. > + * @param table > + * Template table to modify. > + * @param nb_rules > + * New flow rules capacity. > + * @param error > + * Perform verbose error reporting if not NULL. > + * PMDs initialize this structure in case of error only. > + * > + * @return > + * - (0) if success. > + * - (-ENODEV) if *port_id* invalid. > + * - (-ENOTSUP) if underlying device does not support this functionality. > + * - (-EINVAL) if *table* is not resizable or > + * *table* resize to *nb_rules* is not supported or > + * unrecoverable *table* error. > + */ > +__rte_experimental > +int > +rte_flow_template_table_resize(uint16_t port_id, > + struct rte_flow_template_table *table, > + uint32_t nb_rules, > + struct rte_flow_error *error); > +/** > + * @warning > + * @b EXPERIMENTAL: this API may change without prior notice. > + * > + * Update flow for the new template table configuration after table resize. > + * Must be called for each *rule* created before and after *table* resize. > This is different than previous version, I just want to confirm if this is intentional. Rules created *before* resize must be updated. Rules created *after* resize not need to be updated, but if API accepts them and just returns a quick success, this helps user and even user may prefer to not keep track of flows as before and after resize, in a good time user can call update for all flows. But I am not clear why API is saying all flows (before or after) *must* be updated? If user is already keeping record of flows *before* resize, why not let app to update only those flows? Is the enforcing update of all flows done intentionally, or is it just wording error? <...> > +/** > + * @warning > + * @b EXPERIMENTAL: this API may change without prior notice. > + * > + * Resume normal operational mode after table was resized and > + * table rules were updated for the new table configuration. > + * > + * @param port_id > + * Port identifier of Ethernet device. > + * @param table > + * Template table that undergoing resize operation. > + * @param error > + * Perform verbose error reporting if not NULL. > + * PMDs initialize this structure in case of error only. > + * > + * @return > + * - (0) if success. > + * - (-ENODEV) if *port_id* invalid. > + * - (-ENOTSUP) if underlying device does not support this functionality. > + * - (-EINVAL) if there are rules that were not updated or > + * *table* cannot complete table resize, > + * unrecoverable error. > + */ > +__rte_experimental > +int > +rte_flow_template_table_resize_complete(uint16_t port_id, > + struct rte_flow_template_table *table, > + struct rte_flow_error *error); I think I asked this before but perhaps missed the response, it is possible that user missed to update all flows and called this API, it will return -EINVAL, in this case it is not clear for user if there is a unrecoverable error or just need to update more flows. What do you think to send a different error for the case that there are flows not updated, so user can action on this information.