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 D0A8E43A0E; Tue, 30 Jan 2024 15:56:29 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BA80F402CE; Tue, 30 Jan 2024 15:56:29 +0100 (CET) Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2056.outbound.protection.outlook.com [40.107.93.56]) by mails.dpdk.org (Postfix) with ESMTP id 7CB37402CD for ; Tue, 30 Jan 2024 15:56:28 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AyoY60Rdr/N/cD4tuvV1VJ8yNThKKNd6Jr/CYqN8u8NPuiGViQHn7p0Q6+LUh03jVhY9JK+CpL93PwWmiyH2aXRHvUiUtdaP9GHXnOKbQQwlSfKHiw5UhON2519EogkHH77hR2rI/r+IhLCZNvkrA/2QJKZ/HBEl2lbdr3LTAXqROZ4tdMRZ35ms+7FOKn++2I6iIM5qJUDnoCOfh2fuSsYNLcw3/XuQH9X+YNi16mhU0X4jsuQn2B0QMc9vMn6rLe/PX6JbhTliqzFgvT/5/2fwR9UhYSkLbz+jbVMx7dYiKpOpmhtdI9OjFwVRXTiq63gGfpVHXkRHwq22zIxqRA== 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=zeZM2nbgA6oOyku5JxHkiT6cNSWcrZp5ipw0NFocynM=; b=BR4HyPgWai3CR0hcMkVPbLSJJIWGE4ZU2nO1YmsmI+Wi8/sYnpaFJJyhcaFv38NGxz/XkFYp+g/6xD35rvFFgCHh1aai2F08o9YQ3Y9oWlIV9K90DvC8jk/Zw5e+zCVpqoq8Goim7dqXt7hH0v6/2YLql9Ky5+oHPbkxgS8PiqACMgOfgxLHFYNhjOgpL5wlh2QB4m9GPVaiHbfvBF5piqZy1RKp+DfsyxWKq94j7v8Btddwphqnvi+97Mr/sE5Y+st9QdDo6qL1lFcG7DNYPIkG9A1Gu2Z6irHk0ZJRw4nNYgMH7B9tZKAiw1Cd2gC9F3OHfUfn7dZSfuxMq2qT/g== 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=zeZM2nbgA6oOyku5JxHkiT6cNSWcrZp5ipw0NFocynM=; b=Wahwe2XWiXH10M+v/KH5qSVGuhl0eFY1KR0V3sosff3Pty4Iz9PR9A+Tibhk0c3L5x6Cty+Glfi5Tl68fEKy4slw9uYhqagtVcUwjOZGKieVn8HVgpTNMINPO377RMVdtFhh0GDkAv5y5uNyf48OFcN94UK60i/z9vBql4VGE9Y= 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 DM6PR12MB4234.namprd12.prod.outlook.com (2603:10b6:5:213::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7228.34; Tue, 30 Jan 2024 14:56:26 +0000 Received: from CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::815a:45e6:cf5e:479f]) by CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::815a:45e6:cf5e:479f%4]) with mapi id 15.20.7228.029; Tue, 30 Jan 2024 14:56:26 +0000 Message-ID: <8e9afae9-d35d-4134-bbb0-66ed4116503a@amd.com> Date: Tue, 30 Jan 2024 14:56:20 +0000 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] 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> 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 AQIeAQIXgAIZARYhBEm7aYjps5XGsPHCElRTPtCK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MTe2YScp9dIV7fsS5tpDwIs7BZNVM1l3NAdK+DLHqNxKuyO 8Zk= In-Reply-To: <20231217093205.321082-1-getelson@nvidia.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: FR0P281CA0098.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:a9::8) To CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH2PR12MB4294:EE_|DM6PR12MB4234:EE_ X-MS-Office365-Filtering-Correlation-Id: 49f6b77a-6ef8-46f9-ab36-08dc21a3a1ce X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: UXpJv90DAy1PmUWDaEx7e28LRMOlI0C0uXSEZG2nWId47HbovuiqUGukr9iyBh5uYlbLaT/fAqzmkGldpE+Y7cBp8vkGIHUWO4+Wus9VN76nx/fRDeAvxXAPOBJHrjTRrmCWeLIJhlpFwfPKb9nkBc0Cvn0BtVy6ni7W0C/d+2ejmix1aO9ubO8vU+Slv3Z/cmctjTh7/U6rkGJ4fnwdQD3Gn61i8ev9cd2lx5fxpXlf92/HhQDdPxUDcoOHZGArCkeDGBOT/A7tldN1ZR6WB8X1G9RO+x0fYLUkEp6zFiVl1seYp5tduWvexdIixJ3GROIrQMTp7bDHETdNJGlNdqNzWTtqRKRzoNDFMT+ZwzKm9A3jmtlNfw3j1Lt/Ga4IHfhvdpdYUi0ddVzb8RaKlabsg7kOEhUw3ynBONi7eKLGahSQcViMfQMHeo7vULgijlrftV+8n/yRuP9VixNNhcSN2k/s7Y3VXTG4ARfGgz2zXxwg/Dxz2ctF0UNJ4a4FPwmZS6Z8yl9PkPdH1ANV8KXjq/A557GIHRX80wi0PLcoylenjWQ44cEUQIq+IVv5m14K15Ns5YJFmtY5vWMrXdTaKAeoas7RYpA1twMSUg0Lp/diAJBMyTxa3VFyL2fRC6oWA7XfXEoK5C8kOQZw4tahQLX7RbLXGOIhYBMYWab7gK0D1kg2kWQXLBDfygK5 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)(136003)(39860400002)(366004)(376002)(346002)(396003)(230173577357003)(230273577357003)(230922051799003)(451199024)(1800799012)(186009)(64100799003)(6512007)(6506007)(36756003)(53546011)(83380400001)(2906002)(2616005)(44832011)(5660300002)(26005)(66556008)(66946007)(66476007)(41300700001)(54906003)(86362001)(31696002)(8676002)(4326008)(6666004)(8936002)(478600001)(6486002)(31686004)(316002)(38100700002)(45980500001)(43740500002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?VENTUGl4OUo4ZDREMDM0bGZIaVhyaGxKQWRCeHRFcldvenR6ajl5WjNuUEtz?= =?utf-8?B?cG82NElkbEMxbzJPU1lZQkNsd2twYlNiaHR4UlBlaDc2N2NHSDBsbm1tZlZS?= =?utf-8?B?STEvZFRwUkVVSVNwdi9lLzdhS0JSQWQ0V1o2emVKTHJzWDd0RDJOMGFaajFi?= =?utf-8?B?TnRFclJiNktJT1NyTUNBL3ErWG1zRmZ3ajBlNVlZUGx4ZEhiOERSaUJXWE1I?= =?utf-8?B?Y2RhdXRhcXJ6MEtIc3NjMzlzVmg5N24rWkNyZDNxMzhOTkhZNzVoaFlmdDQr?= =?utf-8?B?UlNUWUF4N2llNDdqVUc1VnZYUGxreU9leWlUK0FUY0VhbngvQ3ZyQnRtR0hp?= =?utf-8?B?OHU1QXZVRlUzV3dDb1ZaamZZVzV2bFBQOEZ3eXJ1Q0lnaUF2NkJJYmFFWEtN?= =?utf-8?B?bUljdHJNSHdaNFJjNkN5citmLy9rUS94MEhvc2w4UEp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KUVQxSEp5RWZTZWwyWnFFVXNCUXBMQnZvWG1C?= =?utf-8?B?Y0RSZmRWemYvcS94N0gwcTcyckMrR1dLOEcwWVk5aTkxSjJHWnJKQkxIazJi?= =?utf-8?B?Umw2MkhJZlc3MkFiTDh3a2t5diswQUdPdUVuanlpVWVJQXBYNjFOV01JZytr?= =?utf-8?B?ZStFeWNWakprN0VFejFsYjBmK0hvcEVwNTF5a3YySVZSRGtrZDgzcUJyRnVD?= =?utf-8?B?Z2FWa1ZEV3hpT2lYSGRBY0FKZU0vNWN3c1F4d09qbHpVMkJxNU1vazdtK0R4?= =?utf-8?B?Y0loRGgrcFBaZ29zUHQ1YlVIRUs1dXd3THB2MzZZem02b3hQTE5EckpvRHIv?= =?utf-8?B?Y2RhNmNwdlhnVlowbkVscTVENHZqTDRTZDZwUXovbTBwQit5eGNQSUphckdr?= =?utf-8?B?N2h6N1FtbTF2SkJ0aE9hMUl4Vll5OFVFeC9vNXNmaDNxRy84Ti9xL0VFT0Fs?= =?utf-8?B?V2xwWUVxL1pzbGpROWFidmdzaHB1MkJlV2VUZFA0bEVpMWhZNDBmK2NaQmhG?= =?utf-8?B?QlpacTVHR2MxeWdsSkpYVGFVQ0tZWXMzZVNuVnhsa3kza2o3UktRczlrZDZY?= =?utf-8?B?Y1RwVTlDN2lkSzN5bmRqRlh1NzhsUUhsN05nN2txMDNqaTJwVWwrcUlnOHZ5?= =?utf-8?B?b0x3N212a2JIOEgvYjFHSFFPd2VIRllTR29tUDJhTDRCaTZicTJEZHAvOHE0?= =?utf-8?B?VlZ6aTMwY0pQSVhtaTUxUHpqYjBxRVZuYUpoRWs5RzRJSDUxNndCZGJueTRY?= =?utf-8?Q?mVRI=3D?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 49f6b77a-6ef8-46f9-ab36-08dc21a3a1ce X-MS-Exchange-CrossTenant-AuthSource: CH2PR12MB4294.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Jan 2024 14:56:26.3072 (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: PUK40uaXd813Qjdh/2xG0ZlVGSWzV17/hK03dR0Ivt6U5N/orN3OWtUJf73WkCUR X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB4234 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 12/17/2023 9:32 AM, 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 handlers held by > application. > > * After `rte_flow_template_table_resize()` returned, application must > update all existing table flow rules by calling > `rte_flow_async_update_resized()`. > The table resize procedure does not change application flow handler. > However, flow object can reference internal PMD resources that are > obsolete after table resize. > `rte_flow_async_update_resized()` moves internal flow references > to the updated table resources. > The flow update must not interrupt hardware flow operations. > > * When all table flow 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. > > Signed-off-by: Gregory Etelson > Acked-by: Ori Kam > > --- > app/test-pmd/cmdline_flow.c | 86 +++++++++++++++++++-- > app/test-pmd/config.c | 102 +++++++++++++++++++++++++ > app/test-pmd/testpmd.h | 6 ++ > It helps to document added/updated command in the commit log, and in the documentation 'testpmd_funcs.rst'. Including new attribute to create table etc... Please check following commit as sample: Commit 98ab16778daa ("app/testpmd: add random item support") > doc/guides/rel_notes/release_24_03.rst | 2 + > lib/ethdev/ethdev_trace.h | 33 ++++++++ > lib/ethdev/ethdev_trace_points.c | 9 +++ > lib/ethdev/rte_flow.c | 69 +++++++++++++++++ > lib/ethdev/rte_flow.h | 97 +++++++++++++++++++++++ > lib/ethdev/rte_flow_driver.h | 15 ++++ > lib/ethdev/version.map | 3 + > 10 files changed, 417 insertions(+), 5 deletions(-) > Just to double check if there will be driver implementation of the new APIs in this release? <...> > > +static __rte_always_inline bool > +rte_flow_table_resizable(const struct rte_flow_template_table_attr *tbl_attr) > +{ > + return (tbl_attr->specialize & > + RTE_FLOW_TABLE_SPECIALIZE_RESIZABLE_TABLE) != 0; > +} > + Ahh, this is the 4th API added in this patch, missed before. Why it is exposed to the application? What is the expected usage for the function, it doesn't get 'port_id' as parameter and directly works on the table_attribute, feels like API should be for drivers? Why it is inlined? <...> > +/** > + * @warning > + * @b EXPERIMENTAL: this API may change without prior notice. > + * > + * Change template table 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* cannot be resized or invalid *nb_rules* > What is invalid 'nb_rules', does it make sense to document it in above @param for it. Like if 0 valid, or is there a max, or is it allowed to shrink the size of table? > + */ > +__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. > + * > + * Following table resize, update flow resources in port. > + * > + * @param port_id > + * Port identifier of Ethernet device. > + * @param queue > + * Flow queue for async operation. > + * @param attr > + * Async operation attributes. > + * @param rule > + * Flow rule to update. > + * @param user_data > + * The user data that will be returned on async completion event. > + * @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 *rule* cannot be updated. > + */ > +__rte_experimental > +int > +rte_flow_async_update_resized(uint16_t port_id, uint32_t queue, > + const struct rte_flow_op_attr *attr, > + struct rte_flow *rule, void *user_data, > + struct rte_flow_error *error); > + Should API have 'table' or 'template' in name, if it is out of this context, it is not intuitive that update_resized refers to template table resize. It may be confused as if this is something related to the rule itself resize. > +/** > + * @warning > + * @b EXPERIMENTAL: this API may change without prior notice. > + * > + * Following table resize, notify port that all table flows were updated. > + * > + * @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) PMD cannot complete table resize. > + */ > +__rte_experimental > +int > +rte_flow_template_table_resize_complete(uint16_t port_id, > + struct rte_flow_template_table *table, > + struct rte_flow_error *error); > Does it make sense to add a new error type to differentiate unrecoverable error (I don't know if there is any) and an error that is caused by not all rules updated? <...> > > /** > diff --git a/lib/ethdev/version.map b/lib/ethdev/version.map > index 5c4917c020..e37bab9b81 100644 > --- a/lib/ethdev/version.map > +++ b/lib/ethdev/version.map > @@ -316,6 +316,9 @@ EXPERIMENTAL { > rte_eth_recycle_rx_queue_info_get; > rte_flow_group_set_miss_actions; > rte_flow_calc_table_hash; > + rte_flow_template_table_resize; > + rte_flow_async_update_resized; > + rte_flow_template_table_resize_complete; > New APIs should go below "# added in 24.03" comment