Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/136471/?format=api
http://patches.dpdk.org/api/patches/136471/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20240207070322.21199-1-getelson@nvidia.com/", "project": { "id": 1, "url": "http://patches.dpdk.org/api/projects/1/?format=api", "name": "DPDK", "link_name": "dpdk", "list_id": "dev.dpdk.org", "list_email": "dev@dpdk.org", "web_url": "http://core.dpdk.org", "scm_url": "git://dpdk.org/dpdk", "webscm_url": "http://git.dpdk.org/dpdk", "list_archive_url": "https://inbox.dpdk.org/dev", "list_archive_url_format": "https://inbox.dpdk.org/dev/{}", "commit_url_format": "" }, "msgid": "<20240207070322.21199-1-getelson@nvidia.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20240207070322.21199-1-getelson@nvidia.com", "date": "2024-02-07T07:03:22", "name": "[v3] ethdev: add template table resize API", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "2cb41ee39efbba5b848584d324beb3a7ce7abc62", "submitter": { "id": 1882, "url": "http://patches.dpdk.org/api/people/1882/?format=api", "name": "Gregory Etelson", "email": "getelson@nvidia.com" }, "delegate": { "id": 319, "url": "http://patches.dpdk.org/api/users/319/?format=api", "username": "fyigit", "first_name": "Ferruh", "last_name": "Yigit", "email": "ferruh.yigit@amd.com" }, "mbox": "http://patches.dpdk.org/project/dpdk/patch/20240207070322.21199-1-getelson@nvidia.com/mbox/", "series": [ { "id": 31033, "url": "http://patches.dpdk.org/api/series/31033/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=31033", "date": "2024-02-07T07:03:22", "name": "[v3] ethdev: add template table resize API", "version": 3, "mbox": "http://patches.dpdk.org/series/31033/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/136471/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/136471/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<dev-bounces@dpdk.org>", "X-Original-To": "patchwork@inbox.dpdk.org", "Delivered-To": "patchwork@inbox.dpdk.org", "Received": [ "from mails.dpdk.org (mails.dpdk.org [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 094FE43A94;\n\tWed, 7 Feb 2024 08:04:06 +0100 (CET)", "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id EDE4A427DA;\n\tWed, 7 Feb 2024 08:04:05 +0100 (CET)", "from NAM10-BN7-obe.outbound.protection.outlook.com\n (mail-bn7nam10on2076.outbound.protection.outlook.com [40.107.92.76])\n by mails.dpdk.org (Postfix) with ESMTP id 219ED40295\n for <dev@dpdk.org>; Wed, 7 Feb 2024 08:03:54 +0100 (CET)", "from DS7PR03CA0215.namprd03.prod.outlook.com (2603:10b6:5:3ba::10)\n by SJ1PR12MB6099.namprd12.prod.outlook.com (2603:10b6:a03:45e::13) with\n Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7270.15; Wed, 7 Feb\n 2024 07:03:51 +0000", "from DS2PEPF00003446.namprd04.prod.outlook.com\n (2603:10b6:5:3ba:cafe::6) by DS7PR03CA0215.outlook.office365.com\n (2603:10b6:5:3ba::10) with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7249.36 via Frontend\n Transport; Wed, 7 Feb 2024 07:03:51 +0000", "from mail.nvidia.com (216.228.117.161) by\n DS2PEPF00003446.mail.protection.outlook.com (10.167.17.73) with Microsoft\n SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id\n 15.20.7249.19 via Frontend Transport; Wed, 7 Feb 2024 07:03:50 +0000", "from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com\n (10.129.200.67) with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Tue, 6 Feb 2024\n 23:03:39 -0800", "from nvidia.com (10.126.231.35) by rnnvmail201.nvidia.com\n (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1258.12; Tue, 6 Feb\n 2024 23:03:35 -0800" ], "ARC-Seal": "i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;\n b=kCmqW8Q5whgx7KYsMd4OgYsU7/9ll1gLK2cnCiRH0PE9RRbmkau8swjvlY/lerxgYsz4a7kWWa211cJ3xVUTCkxRAd42QaN1/YGiZeShcLsln4reYrZbY7MbX06zjlE2J2prbReNIpT3YmQG6+Z6wooZkU6G6gELluu/uqPEwwjJWZdFIqWz0Mud9YzohgNiAY8EW5bl7MgQWdoans/11PTHvlLEHa0KgKXEs9WxSGKT12BcR6Hgtki4zhqZ1ZFaFjcQU8lFC6XmmvQSqFIBdbwhee47EUOWHll0CtibnbRZLZiLYSCtxtvSqnfV4YUZdeQKrD8eaKF3awGNRE+5Lw==", "ARC-Message-Signature": "i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;\n s=arcselector9901;\n 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;\n bh=oWNYZRYLRhUaNKwFWio0i9Txii+yA/Y2tZIxgUVFAfI=;\n b=LdWlPHd325Vy1jzBrMEdTHr7fNlGqrO/HRQF/hmMHkxiUZGJG5V+dSly3pU3wP6XjHmd7q+K+EbAp3pNpGMFlPpt7zdC7u0950HvD85WtcTD+zGDAnUS1bqoActBwHZmbxhOBZ0TRPqrQKUsQNv928oqI4QtpFiYupUF+/UWg//zV4b7tVo/OkCnQY+jEVbhfUQlzFe5N3yG2gvSScY6f1MiiuySGZ4B4v/L19zvVLhf9a+q/nu8YTRHT5k3dhVHtN9CN/QhWsuEQfsr3nrA1x2F0Ry0xJHPYTJkQWvUhRd4tE5G5nLmjv2nPNI2NrLapLtWDS0KFhjrmGVLCHCSMA==", "ARC-Authentication-Results": "i=1; mx.microsoft.com 1; spf=pass (sender ip is\n 216.228.117.161) smtp.rcpttodomain=dpdk.org smtp.mailfrom=nvidia.com;\n dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com;\n dkim=none (message not signed); arc=none (0)", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com;\n s=selector2;\n h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;\n bh=oWNYZRYLRhUaNKwFWio0i9Txii+yA/Y2tZIxgUVFAfI=;\n b=KCDcBGLpXq9gQJk/XUuomSThnpnzpacQ4mlIpx5bJNwqWLnN59QOFrhfBD5IVmtnyLgFJP+s82HY2uwWreuVsFdT0w56eJBz8FdUEeezEPJRuKjWUEuYNMKUHa1YW+qG3CeQvArih1i6vtj27m1f1WdQnCXJSTEq+CfRusiw059nRDmNDVxpO/9QxUHl2ePWm5ErXKMy94hvEKDwqNCA/GYTaQy5YFIK4xMnq/7y2Z7TjiyUwIue5ySXnWKqatSa9zqEB7uL4wZ7pJRwTuY6wDArL3uuWAchrmB2X4YfbR39DPNOmf9tC8LR3EOscdNCsCe7Uy5x3ya5S8A1wMK9cw==", "X-MS-Exchange-Authentication-Results": "spf=pass (sender IP is 216.228.117.161)\n smtp.mailfrom=nvidia.com;\n dkim=none (message not signed)\n header.d=none;dmarc=pass action=none header.from=nvidia.com;", "Received-SPF": "Pass (protection.outlook.com: domain of nvidia.com designates\n 216.228.117.161 as permitted sender) receiver=protection.outlook.com;\n client-ip=216.228.117.161; helo=mail.nvidia.com; pr=C", "From": "Gregory Etelson <getelson@nvidia.com>", "To": "<dev@dpdk.org>", "CC": "<getelson@nvidia.com>, <mkashani@nvidia.com>, <thomas@monjalon.net>, \"Ori\n Kam\" <orika@nvidia.com>, Aman Singh <aman.deep.singh@intel.com>,\n Yuying Zhang\n <yuying.zhang@intel.com>, Ferruh Yigit <ferruh.yigit@amd.com>, \"Andrew\n Rybchenko\" <andrew.rybchenko@oktetlabs.ru>", "Subject": "[PATCH v3] ethdev: add template table resize API", "Date": "Wed, 7 Feb 2024 09:03:22 +0200", "Message-ID": "<20240207070322.21199-1-getelson@nvidia.com>", "X-Mailer": "git-send-email 2.39.2", "In-Reply-To": "<20231217093205.321082-1-getelson@nvidia.com>", "References": "<20231217093205.321082-1-getelson@nvidia.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Content-Type": "text/plain", "X-Originating-IP": "[10.126.231.35]", "X-ClientProxiedBy": "rnnvmail201.nvidia.com (10.129.68.8) To\n rnnvmail201.nvidia.com (10.129.68.8)", "X-EOPAttributedMessage": "0", "X-MS-PublicTrafficType": "Email", "X-MS-TrafficTypeDiagnostic": "DS2PEPF00003446:EE_|SJ1PR12MB6099:EE_", "X-MS-Office365-Filtering-Correlation-Id": "b8708335-90c3-4617-ca39-08dc27aaf06c", "X-LD-Processed": "43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr", "X-MS-Exchange-SenderADCheck": "1", "X-MS-Exchange-AntiSpam-Relay": "0", "X-Microsoft-Antispam": "BCL:0;", "X-Microsoft-Antispam-Message-Info": "\n er55oGLd3I41swn3unchVYwzaRscr6Ia9vwPURXCfowY2CIAfWRgxntQQjWocKy753BMj0RDsZd0eHOyldkTlwoUNsQCuM76mQ0KTnWoTEGJqFhMyytpq5kPCCphun/oj+ap0NXR/m2VpKGPxwbezkhYjP01Ye3ZwtMp4aOzvZu+6jyeYCrVGXI4b54uqeoJLEVUFnPiLBVS3YDylgy/TsWuQNF/0are21tjpY3bHlsMp+bOb30HXTU5N3o8Si3EIbtuos7IY4ToAFDwv8lyD8h+SGciZ8nuTNyVPq7M6Jpp8VK3CAyWy3gEFcoDN2qDridFIB0wtbA3T/mGkYLqcftCs7w1r4iCO3+tzoRztNth2KOnMGe6EdopvJ5r7Yp9mgDXjtJK+zVa5/zO/YQGbxIpLlZexOgETYM9Oq0SNwJyWJ2GU/Iisc9BF9wlegiRAjaT1yshQDSig3uOi5OtFCEk+iXzhaY23weLUlWSuAD0nA9Ware5Cu7N2VShwV+dy72tSf3nLJ/A0oNL2JRYAp5mYqHTiWCXEuTrO4Xs5rmqWeeGRdnkYYCXudiUNWXUb1eLpcsuShaFa+lhD/OL5UdmxOgfrIhbhMWQMHuVxCaSIKwlunU1FrGmvVFjKpYqOXP6pRtsqP+jZ4pS4LcHMSTd02fPAwAKhUsmOPL/NW6Q1yA4nL4Y+e2e7QYNxt5M8VWoDJcYEbgvILA9wAgdz1ghYQI4/qfUygK1+fOrX6qfe1aCBtTgbE7/j3zOQWZV", "X-Forefront-Antispam-Report": "CIP:216.228.117.161; CTRY:US; LANG:en; SCL:1;\n SRV:;\n IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge2.nvidia.com; CAT:NONE;\n SFS:(13230031)(4636009)(346002)(376002)(39860400002)(396003)(136003)(230273577357003)(230922051799003)(82310400011)(64100799003)(186009)(451199024)(1800799012)(40470700004)(36840700001)(46966006)(83380400001)(54906003)(7636003)(82740400003)(6916009)(336012)(2616005)(316002)(356005)(6666004)(6286002)(70206006)(1076003)(426003)(7696005)(26005)(478600001)(86362001)(2906002)(16526019)(70586007)(4326008)(30864003)(8936002)(8676002)(5660300002)(36756003)(40460700003)(40480700001)(36860700001)(55016003)(41300700001)(47076005);\n DIR:OUT; SFP:1101;", "X-OriginatorOrg": "Nvidia.com", "X-MS-Exchange-CrossTenant-OriginalArrivalTime": "07 Feb 2024 07:03:50.9790 (UTC)", "X-MS-Exchange-CrossTenant-Network-Message-Id": "\n b8708335-90c3-4617-ca39-08dc27aaf06c", "X-MS-Exchange-CrossTenant-Id": "43083d15-7273-40c1-b7db-39efd9ccc17a", "X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp": "\n TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.117.161];\n Helo=[mail.nvidia.com]", "X-MS-Exchange-CrossTenant-AuthSource": "\n DS2PEPF00003446.namprd04.prod.outlook.com", "X-MS-Exchange-CrossTenant-AuthAs": "Anonymous", "X-MS-Exchange-CrossTenant-FromEntityHeader": "HybridOnPrem", "X-MS-Exchange-Transport-CrossTenantHeadersStamped": "SJ1PR12MB6099", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.29", "Precedence": "list", "List-Id": "DPDK patches and discussions <dev.dpdk.org>", "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>", "List-Archive": "<http://mails.dpdk.org/archives/dev/>", "List-Post": "<mailto:dev@dpdk.org>", "List-Help": "<mailto:dev-request@dpdk.org?subject=help>", "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org" }, "content": "Template table creation API sets table flows capacity.\nIf application needs more flows then the table was designed for,\nthe following procedures must be completed:\n1. Create a new template table with larger flows capacity.\n2. Re-create existing flows in the new table and delete flows from\n the original table.\n3. Destroy original table.\n\nApplication cannot always execute that procedure:\n* Port may not have sufficient resources to allocate a new table\n while maintaining original table.\n* Application may not have existing flows \"recipes\" to re-create\n flows in a new table.\n\nThe patch defines a new API that allows application to resize\nexisting template table:\n\n* Resizable template table must be created with the\nRTE_FLOW_TABLE_SPECIALIZE_RESIZABLE_TABLE bit set.\n\n* Application resizes existing table with the\n `rte_flow_template_table_resize()` function call.\n The table resize procedure updates the table maximal flow number\n only. Other table attributes are not affected by the table resize.\n ** The table resize procedure must not interrupt\n existing table flows operations in hardware.\n ** The table resize procedure must not alter flow handlers held by\n application.\n\n* After `rte_flow_template_table_resize()` returned, application must\n update all existing table flow rules by calling\n `rte_flow_async_update_resized()`.\n The table resize procedure does not change application flow handler.\n However, flow object can reference internal PMD resources that are\n obsolete after table resize.\n `rte_flow_async_update_resized()` moves internal flow references\n to the updated table resources.\n The flow update must not interrupt hardware flow operations.\n\n* When all table flow were updated, application must call\n `rte_flow_template_table_resize_complete()`.\n The function releases PMD resources related to the original\n table.\n Application can start new table resize after\n `rte_flow_template_table_resize_complete()` returned.\n\nTestpmd commands:\n\n* Create resizable template table\nflow template_table <port-id> create table_id <tbl-id> resizable \\\n [transfer|ingress|egres] group <group-id> \\\n rules_number <initial table capacity> \\\n pattern_template <pt1> [ pattern_template <pt2> [ ... ]] \\\n actions_template <at1> [ actions_template <at2> [ ... ]]\n\n* Resize table:\nflow template_table <tbl-id> resize table_resize_id <tbl-id> \\\n table_resize_rules_num <new table capacity>\n\n* Queue a flow update:\nflow queue <port-id> update_resized <tbl-id> rule <flow-id>\n\n* Complete table resize:\nflow template_table <port-id> resize_complete table <tbl-id>\n\nSigned-off-by: Gregory Etelson <getelson@nvidia.com>\nAcked-by: Ori Kam <orika@nvidia.com>\n---\nv2: Update the patch comment.\n Add table resize commands to testpmd user guide.\nv3: Rename RTE_FLOW_TABLE_SPECIALIZE_RESIZABLE macro.\n---\n app/test-pmd/cmdline_flow.c | 86 ++++++++++++++-\n app/test-pmd/config.c | 102 ++++++++++++++++++\n app/test-pmd/testpmd.h | 6 ++\n doc/guides/rel_notes/release_24_03.rst | 2 +\n doc/guides/testpmd_app_ug/testpmd_funcs.rst | 15 ++-\n lib/ethdev/ethdev_trace.h | 33 ++++++\n lib/ethdev/ethdev_trace_points.c | 9 ++\n lib/ethdev/rte_flow.c | 69 ++++++++++++\n lib/ethdev/rte_flow.h | 114 ++++++++++++++++++++\n lib/ethdev/rte_flow_driver.h | 15 +++\n lib/ethdev/version.map | 5 +\n 11 files changed, 450 insertions(+), 6 deletions(-)", "diff": "diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c\nindex ce71818705..1a2556d53b 100644\n--- a/app/test-pmd/cmdline_flow.c\n+++ b/app/test-pmd/cmdline_flow.c\n@@ -134,6 +134,7 @@ enum index {\n \t/* Queue arguments. */\n \tQUEUE_CREATE,\n \tQUEUE_DESTROY,\n+\tQUEUE_FLOW_UPDATE_RESIZED,\n \tQUEUE_UPDATE,\n \tQUEUE_AGED,\n \tQUEUE_INDIRECT_ACTION,\n@@ -191,8 +192,12 @@ enum index {\n \t/* Table arguments. */\n \tTABLE_CREATE,\n \tTABLE_DESTROY,\n+\tTABLE_RESIZE,\n+\tTABLE_RESIZE_COMPLETE,\n \tTABLE_CREATE_ID,\n \tTABLE_DESTROY_ID,\n+\tTABLE_RESIZE_ID,\n+\tTABLE_RESIZE_RULES_NUMBER,\n \tTABLE_INSERTION_TYPE,\n \tTABLE_INSERTION_TYPE_NAME,\n \tTABLE_HASH_FUNC,\n@@ -204,6 +209,7 @@ enum index {\n \tTABLE_TRANSFER,\n \tTABLE_TRANSFER_WIRE_ORIG,\n \tTABLE_TRANSFER_VPORT_ORIG,\n+\tTABLE_RESIZABLE,\n \tTABLE_RULES_NUMBER,\n \tTABLE_PATTERN_TEMPLATE,\n \tTABLE_ACTIONS_TEMPLATE,\n@@ -1323,6 +1329,8 @@ static const enum index next_group_attr[] = {\n static const enum index next_table_subcmd[] = {\n \tTABLE_CREATE,\n \tTABLE_DESTROY,\n+\tTABLE_RESIZE,\n+\tTABLE_RESIZE_COMPLETE,\n \tZERO,\n };\n \n@@ -1337,6 +1345,7 @@ static const enum index next_table_attr[] = {\n \tTABLE_TRANSFER,\n \tTABLE_TRANSFER_WIRE_ORIG,\n \tTABLE_TRANSFER_VPORT_ORIG,\n+\tTABLE_RESIZABLE,\n \tTABLE_RULES_NUMBER,\n \tTABLE_PATTERN_TEMPLATE,\n \tTABLE_ACTIONS_TEMPLATE,\n@@ -1353,6 +1362,7 @@ static const enum index next_table_destroy_attr[] = {\n static const enum index next_queue_subcmd[] = {\n \tQUEUE_CREATE,\n \tQUEUE_DESTROY,\n+\tQUEUE_FLOW_UPDATE_RESIZED,\n \tQUEUE_UPDATE,\n \tQUEUE_AGED,\n \tQUEUE_INDIRECT_ACTION,\n@@ -3344,6 +3354,19 @@ static const struct token token_list[] = {\n \t\t.args = ARGS(ARGS_ENTRY(struct buffer, port)),\n \t\t.call = parse_table_destroy,\n \t},\n+\t[TABLE_RESIZE] = {\n+\t\t.name = \"resize\",\n+\t\t.help = \"resize template table\",\n+\t\t.next = NEXT(NEXT_ENTRY(TABLE_RESIZE_ID)),\n+\t\t.call = parse_table\n+\t},\n+\t[TABLE_RESIZE_COMPLETE] = {\n+\t\t.name = \"resize_complete\",\n+\t\t.help = \"complete table resize\",\n+\t\t.next = NEXT(NEXT_ENTRY(TABLE_DESTROY_ID)),\n+\t\t.args = ARGS(ARGS_ENTRY(struct buffer, port)),\n+\t\t.call = parse_table_destroy,\n+\t},\n \t/* Table arguments. */\n \t[TABLE_CREATE_ID] = {\n \t\t.name = \"table_id\",\n@@ -3354,13 +3377,29 @@ static const struct token token_list[] = {\n \t},\n \t[TABLE_DESTROY_ID] = {\n \t\t.name = \"table\",\n-\t\t.help = \"specify table id to destroy\",\n+\t\t.help = \"table id\",\n \t\t.next = NEXT(next_table_destroy_attr,\n \t\t\t NEXT_ENTRY(COMMON_TABLE_ID)),\n \t\t.args = ARGS(ARGS_ENTRY_PTR(struct buffer,\n \t\t\t\t\t args.table_destroy.table_id)),\n \t\t.call = parse_table_destroy,\n \t},\n+\t[TABLE_RESIZE_ID] = {\n+\t\t.name = \"table_resize_id\",\n+\t\t.help = \"table resize id\",\n+\t\t.next = NEXT(NEXT_ENTRY(TABLE_RESIZE_RULES_NUMBER),\n+\t\t\t NEXT_ENTRY(COMMON_TABLE_ID)),\n+\t\t.args = ARGS(ARGS_ENTRY(struct buffer, args.table.id)),\n+\t\t.call = parse_table\n+\t},\n+\t[TABLE_RESIZE_RULES_NUMBER] = {\n+\t\t.name = \"table_resize_rules_num\",\n+\t\t.help = \"table resize rules number\",\n+\t\t.next = NEXT(NEXT_ENTRY(END), NEXT_ENTRY(COMMON_UNSIGNED)),\n+\t\t.args = ARGS(ARGS_ENTRY(struct buffer,\n+\t\t\t\t\targs.table.attr.nb_flows)),\n+\t\t.call = parse_table\n+\t},\n \t[TABLE_INSERTION_TYPE] = {\n \t\t.name = \"insertion_type\",\n \t\t.help = \"specify insertion type\",\n@@ -3433,6 +3472,12 @@ static const struct token token_list[] = {\n \t\t.next = NEXT(next_table_attr),\n \t\t.call = parse_table,\n \t},\n+\t[TABLE_RESIZABLE] = {\n+\t\t.name = \"resizable\",\n+\t\t.help = \"set resizable attribute\",\n+\t\t.next = NEXT(next_table_attr),\n+\t\t.call = parse_table,\n+\t},\n \t[TABLE_RULES_NUMBER] = {\n \t\t.name = \"rules_number\",\n \t\t.help = \"number of rules in table\",\n@@ -3525,6 +3570,14 @@ static const struct token token_list[] = {\n \t\t.args = ARGS(ARGS_ENTRY(struct buffer, queue)),\n \t\t.call = parse_qo_destroy,\n \t},\n+\t[QUEUE_FLOW_UPDATE_RESIZED] = {\n+\t\t.name = \"update_resized\",\n+\t\t.help = \"update a flow after table resize\",\n+\t\t.next = NEXT(NEXT_ENTRY(QUEUE_DESTROY_ID),\n+\t\t\t NEXT_ENTRY(COMMON_QUEUE_ID)),\n+\t\t.args = ARGS(ARGS_ENTRY(struct buffer, queue)),\n+\t\t.call = parse_qo_destroy,\n+\t},\n \t[QUEUE_UPDATE] = {\n \t\t.name = \"update\",\n \t\t.help = \"update a flow rule\",\n@@ -10334,6 +10387,7 @@ parse_table(struct context *ctx, const struct token *token,\n \t}\n \tswitch (ctx->curr) {\n \tcase TABLE_CREATE:\n+\tcase TABLE_RESIZE:\n \t\tout->command = ctx->curr;\n \t\tctx->objdata = 0;\n \t\tctx->object = out;\n@@ -10378,18 +10432,25 @@ parse_table(struct context *ctx, const struct token *token,\n \tcase TABLE_TRANSFER_WIRE_ORIG:\n \t\tif (!out->args.table.attr.flow_attr.transfer)\n \t\t\treturn -1;\n-\t\tout->args.table.attr.specialize = RTE_FLOW_TABLE_SPECIALIZE_TRANSFER_WIRE_ORIG;\n+\t\tout->args.table.attr.specialize |= RTE_FLOW_TABLE_SPECIALIZE_TRANSFER_WIRE_ORIG;\n \t\treturn len;\n \tcase TABLE_TRANSFER_VPORT_ORIG:\n \t\tif (!out->args.table.attr.flow_attr.transfer)\n \t\t\treturn -1;\n-\t\tout->args.table.attr.specialize = RTE_FLOW_TABLE_SPECIALIZE_TRANSFER_VPORT_ORIG;\n+\t\tout->args.table.attr.specialize |= RTE_FLOW_TABLE_SPECIALIZE_TRANSFER_VPORT_ORIG;\n+\t\treturn len;\n+\tcase TABLE_RESIZABLE:\n+\t\tout->args.table.attr.specialize |=\n+\t\t\tRTE_FLOW_TABLE_SPECIALIZE_RESIZABLE;\n \t\treturn len;\n \tcase TABLE_RULES_NUMBER:\n \t\tctx->objdata = 0;\n \t\tctx->object = out;\n \t\tctx->objmask = NULL;\n \t\treturn len;\n+\tcase TABLE_RESIZE_ID:\n+\tcase TABLE_RESIZE_RULES_NUMBER:\n+\t\treturn len;\n \tdefault:\n \t\treturn -1;\n \t}\n@@ -10411,7 +10472,8 @@ parse_table_destroy(struct context *ctx, const struct token *token,\n \tif (!out)\n \t\treturn len;\n \tif (!out->command || out->command == TABLE) {\n-\t\tif (ctx->curr != TABLE_DESTROY)\n+\t\tif (ctx->curr != TABLE_DESTROY &&\n+\t\t ctx->curr != TABLE_RESIZE_COMPLETE)\n \t\t\treturn -1;\n \t\tif (sizeof(*out) > size)\n \t\t\treturn -1;\n@@ -10513,7 +10575,8 @@ parse_qo_destroy(struct context *ctx, const struct token *token,\n \tif (!out)\n \t\treturn len;\n \tif (!out->command || out->command == QUEUE) {\n-\t\tif (ctx->curr != QUEUE_DESTROY)\n+\t\tif (ctx->curr != QUEUE_DESTROY &&\n+\t\t ctx->curr != QUEUE_FLOW_UPDATE_RESIZED)\n \t\t\treturn -1;\n \t\tif (sizeof(*out) > size)\n \t\t\treturn -1;\n@@ -12569,10 +12632,18 @@ cmd_flow_parsed(const struct buffer *in)\n \t\t\t\t\tin->args.table_destroy.table_id_n,\n \t\t\t\t\tin->args.table_destroy.table_id);\n \t\tbreak;\n+\tcase TABLE_RESIZE_COMPLETE:\n+\t\tport_flow_template_table_resize_complete\n+\t\t\t(in->port, in->args.table_destroy.table_id[0]);\n+\t\tbreak;\n \tcase GROUP_SET_MISS_ACTIONS:\n \t\tport_queue_group_set_miss_actions(in->port, &in->args.vc.attr,\n \t\t\t\t\t\t in->args.vc.actions);\n \t\tbreak;\n+\tcase TABLE_RESIZE:\n+\t\tport_flow_template_table_resize(in->port, in->args.table.id,\n+\t\t\t\t\t\tin->args.table.attr.nb_flows);\n+\t\tbreak;\n \tcase QUEUE_CREATE:\n \t\tport_queue_flow_create(in->port, in->queue, in->postpone,\n \t\t\tin->args.vc.table_id, in->args.vc.rule_id,\n@@ -12584,6 +12655,11 @@ cmd_flow_parsed(const struct buffer *in)\n \t\t\t\t\tin->args.destroy.rule_n,\n \t\t\t\t\tin->args.destroy.rule);\n \t\tbreak;\n+\tcase QUEUE_FLOW_UPDATE_RESIZED:\n+\t\tport_queue_flow_update_resized(in->port, in->queue,\n+\t\t\t\t\t in->postpone,\n+\t\t\t\t\t in->args.destroy.rule[0]);\n+\t\tbreak;\n \tcase QUEUE_UPDATE:\n \t\tport_queue_flow_update(in->port, in->queue, in->postpone,\n \t\t\t\tin->args.vc.rule_id, in->args.vc.act_templ_id,\ndiff --git a/app/test-pmd/config.c b/app/test-pmd/config.c\nindex cad7537bc6..e589ac614b 100644\n--- a/app/test-pmd/config.c\n+++ b/app/test-pmd/config.c\n@@ -1403,6 +1403,19 @@ port_flow_new(const struct rte_flow_attr *attr,\n \treturn NULL;\n }\n \n+static struct port_flow *\n+port_flow_locate(struct port_flow *flows_list, uint32_t flow_id)\n+{\n+\tstruct port_flow *pf = flows_list;\n+\n+\twhile (pf) {\n+\t\tif (pf->id == flow_id)\n+\t\t\tbreak;\n+\t\tpf = pf->next;\n+\t}\n+\treturn pf;\n+}\n+\n /** Print a message out of a flow error. */\n static int\n port_flow_complain(struct rte_flow_error *error)\n@@ -1693,6 +1706,19 @@ table_alloc(uint32_t id, struct port_table **table,\n \treturn 0;\n }\n \n+static struct port_table *\n+port_table_locate(struct port_table *tables_list, uint32_t table_id)\n+{\n+\tstruct port_table *pt = tables_list;\n+\n+\twhile (pt) {\n+\t\tif (pt->id == table_id)\n+\t\t\tbreak;\n+\t\tpt = pt->next;\n+\t}\n+\treturn pt;\n+}\n+\n /** Get info about flow management resources. */\n int\n port_flow_get_info(portid_t port_id)\n@@ -2665,6 +2691,46 @@ port_flow_template_table_destroy(portid_t port_id,\n \treturn ret;\n }\n \n+int\n+port_flow_template_table_resize_complete(portid_t port_id, uint32_t table_id)\n+{\n+\tstruct rte_port *port;\n+\tstruct port_table *pt;\n+\tstruct rte_flow_error error = { 0, };\n+\tint ret;\n+\n+\tif (port_id_is_invalid(port_id, ENABLED_WARN))\n+\t\treturn -EINVAL;\n+\tport = &ports[port_id];\n+\tpt = port_table_locate(port->table_list, table_id);\n+\tif (!pt)\n+\t\treturn -EINVAL;\n+\tret = rte_flow_template_table_resize_complete(port_id,\n+\t\t\t\t\t\t pt->table, &error);\n+\treturn !ret ? 0 : port_flow_complain(&error);\n+}\n+\n+int\n+port_flow_template_table_resize(portid_t port_id,\n+\t\t\t\tuint32_t table_id, uint32_t flows_num)\n+{\n+\tstruct rte_port *port;\n+\tstruct port_table *pt;\n+\tstruct rte_flow_error error = { 0, };\n+\tint ret;\n+\n+\tif (port_id_is_invalid(port_id, ENABLED_WARN))\n+\t\treturn -EINVAL;\n+\tport = &ports[port_id];\n+\tpt = port_table_locate(port->table_list, table_id);\n+\tif (!pt)\n+\t\treturn -EINVAL;\n+\tret = rte_flow_template_table_resize(port_id, pt->table, flows_num, &error);\n+\tif (ret)\n+\t\treturn port_flow_complain(&error);\n+\treturn 0;\n+}\n+\n /** Flush table */\n int\n port_flow_template_table_flush(portid_t port_id)\n@@ -2805,6 +2871,42 @@ port_queue_flow_create(portid_t port_id, queueid_t queue_id,\n \treturn 0;\n }\n \n+int\n+port_queue_flow_update_resized(portid_t port_id, queueid_t queue_id,\n+\t\t\t bool postpone, uint32_t flow_id)\n+{\n+\tconst struct rte_flow_op_attr op_attr = { .postpone = postpone };\n+\tstruct rte_flow_error error = { 0, };\n+\tstruct port_flow *pf;\n+\tstruct rte_port *port;\n+\tstruct queue_job *job;\n+\tint ret;\n+\n+\tif (port_id_is_invalid(port_id, ENABLED_WARN) ||\n+\t port_id == (portid_t)RTE_PORT_ALL)\n+\t\treturn -EINVAL;\n+\tport = &ports[port_id];\n+\tif (queue_id >= port->queue_nb) {\n+\t\tprintf(\"Queue #%u is invalid\\n\", queue_id);\n+\t\treturn -EINVAL;\n+\t}\n+\tpf = port_flow_locate(port->flow_list, flow_id);\n+\tif (!pf)\n+\t\treturn -EINVAL;\n+\tjob = calloc(1, sizeof(*job));\n+\tif (!job)\n+\t\treturn -ENOMEM;\n+\tjob->type = QUEUE_JOB_TYPE_FLOW_TRANSFER;\n+\tjob->pf = pf;\n+\tret = rte_flow_async_update_resized(port_id, queue_id, &op_attr,\n+\t\t\t\t\t pf->flow, job, &error);\n+\tif (ret) {\n+\t\tfree(job);\n+\t\treturn port_flow_complain(&error);\n+\t}\n+\treturn 0;\n+}\n+\n /** Enqueue number of destroy flow rules operations. */\n int\n port_queue_flow_destroy(portid_t port_id, queueid_t queue_id,\ndiff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h\nindex 9b10a9ea1c..92f21e7776 100644\n--- a/app/test-pmd/testpmd.h\n+++ b/app/test-pmd/testpmd.h\n@@ -110,6 +110,7 @@ enum {\n enum {\n \tQUEUE_JOB_TYPE_FLOW_CREATE,\n \tQUEUE_JOB_TYPE_FLOW_DESTROY,\n+\tQUEUE_JOB_TYPE_FLOW_TRANSFER,\n \tQUEUE_JOB_TYPE_FLOW_UPDATE,\n \tQUEUE_JOB_TYPE_ACTION_CREATE,\n \tQUEUE_JOB_TYPE_ACTION_DESTROY,\n@@ -981,7 +982,12 @@ int port_flow_template_table_create(portid_t port_id, uint32_t id,\n \t\t uint32_t nb_actions_templates, uint32_t *actions_templates);\n int port_flow_template_table_destroy(portid_t port_id,\n \t\t\t uint32_t n, const uint32_t *table);\n+int port_queue_flow_update_resized(portid_t port_id, queueid_t queue_id,\n+\t\t\t\t bool postpone, uint32_t flow_id);\n int port_flow_template_table_flush(portid_t port_id);\n+int port_flow_template_table_resize_complete(portid_t port_id, uint32_t table_id);\n+int port_flow_template_table_resize(portid_t port_id,\n+\t\t\t\t uint32_t table_id, uint32_t flows_num);\n int port_queue_group_set_miss_actions(portid_t port_id, const struct rte_flow_attr *attr,\n \t\t\t\t const struct rte_flow_action *actions);\n int port_queue_flow_create(portid_t port_id, queueid_t queue_id,\ndiff --git a/doc/guides/rel_notes/release_24_03.rst b/doc/guides/rel_notes/release_24_03.rst\nindex 6f8ad27808..047664a079 100644\n--- a/doc/guides/rel_notes/release_24_03.rst\n+++ b/doc/guides/rel_notes/release_24_03.rst\n@@ -55,6 +55,8 @@ New Features\n Also, make sure to start the actual text at the margin.\n =======================================================\n \n+* **Added support for template API table resize.**\n+\n \n Removed Items\n -------------\ndiff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst b/doc/guides/testpmd_app_ug/testpmd_funcs.rst\nindex 447e28e694..d0d3adf643 100644\n--- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst\n+++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst\n@@ -2984,12 +2984,21 @@ following sections.\n - Create a table::\n \n flow table {port_id} create\n- [table_id {id}]\n+ [table_id {id}] [resizable]\n [group {group_id}] [priority {level}] [ingress] [egress] [transfer]\n rules_number {number}\n pattern_template {pattern_template_id}\n actions_template {actions_template_id}\n \n+- Resize a table::\n+\n+ flow template_table {port_id} resize\n+ table_resize_id {id} table_resize_rules_num {number}\n+\n+- Complete table resize::\n+\n+ flow template_table {port_id} resize_complete table {table_id}\n+\n - Destroy a table::\n \n flow table {port_id} destroy table {id} [...]\n@@ -3010,6 +3019,10 @@ following sections.\n pattern {item} [/ {item} [...]] / end\n actions {action} [/ {action} [...]] / end\n \n+- Enqueue flow update following table resize::\n+\n+ flow queue {port_id} update_resized {table_id} rule {rule_id}\n+\n - Enqueue destruction of specific flow rules::\n \n flow queue {port_id} destroy {queue_id}\ndiff --git a/lib/ethdev/ethdev_trace.h b/lib/ethdev/ethdev_trace.h\nindex 1b1ae0cfe8..cd3327a619 100644\n--- a/lib/ethdev/ethdev_trace.h\n+++ b/lib/ethdev/ethdev_trace.h\n@@ -2572,6 +2572,39 @@ RTE_TRACE_POINT_FP(\n \trte_trace_point_emit_ptr(user_data);\n \trte_trace_point_emit_int(ret);\n )\n+\n+RTE_TRACE_POINT_FP(\n+\trte_flow_trace_template_table_resize,\n+\tRTE_TRACE_POINT_ARGS(uint16_t port_id,\n+\t\t\t struct rte_flow_template_table *table,\n+\t\t\t uint32_t nb_rules, int ret),\n+\trte_trace_point_emit_u16(port_id);\n+\trte_trace_point_emit_ptr(table);\n+\trte_trace_point_emit_u32(nb_rules);\n+\trte_trace_point_emit_int(ret);\n+)\n+\n+RTE_TRACE_POINT_FP(\n+\trte_flow_trace_async_update_resized,\n+\tRTE_TRACE_POINT_ARGS(uint16_t port_id, uint32_t queue,\n+\t\t\t const struct rte_flow_op_attr *attr,\n+\t\t\t struct rte_flow *rule, void *user_data, int ret),\n+\trte_trace_point_emit_u16(port_id);\n+\trte_trace_point_emit_u32(queue);\n+\trte_trace_point_emit_ptr(attr);\n+\trte_trace_point_emit_ptr(rule);\n+\trte_trace_point_emit_ptr(user_data);\n+\trte_trace_point_emit_int(ret);\n+)\n+\n+RTE_TRACE_POINT_FP(\n+\trte_flow_trace_table_resize_complete,\n+\tRTE_TRACE_POINT_ARGS(uint16_t port_id,\n+\t\t\t struct rte_flow_template_table *table, int ret),\n+\trte_trace_point_emit_u16(port_id);\n+\trte_trace_point_emit_ptr(table);\n+\trte_trace_point_emit_int(ret);\n+)\n #ifdef __cplusplus\n }\n #endif\ndiff --git a/lib/ethdev/ethdev_trace_points.c b/lib/ethdev/ethdev_trace_points.c\nindex 91f71d868b..1a1f685daa 100644\n--- a/lib/ethdev/ethdev_trace_points.c\n+++ b/lib/ethdev/ethdev_trace_points.c\n@@ -774,3 +774,12 @@ RTE_TRACE_POINT_REGISTER(rte_flow_trace_async_action_list_handle_destroy,\n \n RTE_TRACE_POINT_REGISTER(rte_flow_trace_async_action_list_handle_query_update,\n \t\t\t lib.ethdev.flow.async_action_list_handle_query_update)\n+\n+RTE_TRACE_POINT_REGISTER(rte_flow_trace_template_table_resize,\n+\t\t\t lib.ethdev.flow.template_table_resize)\n+\n+RTE_TRACE_POINT_REGISTER(rte_flow_trace_async_update_resized,\n+\t\t\t lib.ethdev.flow.async_update_resized)\n+\n+RTE_TRACE_POINT_REGISTER(rte_flow_trace_table_resize_complete,\n+\t\t\t lib.ethdev.flow.table_resize_complete)\ndiff --git a/lib/ethdev/rte_flow.c b/lib/ethdev/rte_flow.c\nindex f49d1d3767..4f8320ec96 100644\n--- a/lib/ethdev/rte_flow.c\n+++ b/lib/ethdev/rte_flow.c\n@@ -2481,3 +2481,72 @@ rte_flow_calc_table_hash(uint16_t port_id, const struct rte_flow_template_table\n \t\t\t\t\thash, error);\n \treturn flow_err(port_id, ret, error);\n }\n+\n+int\n+rte_flow_template_table_resize(uint16_t port_id,\n+\t\t\t struct rte_flow_template_table *table,\n+\t\t\t uint32_t nb_rules,\n+\t\t\t struct rte_flow_error *error)\n+{\n+\tint ret;\n+\tstruct rte_eth_dev *dev;\n+\tconst struct rte_flow_ops *ops;\n+\n+\tRTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n+\tops = rte_flow_ops_get(port_id, error);\n+\tif (!ops || !ops->flow_template_table_resize)\n+\t\treturn rte_flow_error_set(error, ENOTSUP,\n+\t\t\t\t\t RTE_FLOW_ERROR_TYPE_UNSPECIFIED, NULL,\n+\t\t\t\t\t \"flow_template_table_resize not supported\");\n+\tdev = &rte_eth_devices[port_id];\n+\tret = ops->flow_template_table_resize(dev, table, nb_rules, error);\n+\tret = flow_err(port_id, ret, error);\n+\trte_flow_trace_template_table_resize(port_id, table, nb_rules, ret);\n+\treturn ret;\n+}\n+\n+int\n+rte_flow_async_update_resized(uint16_t port_id, uint32_t queue,\n+\t\t\t const struct rte_flow_op_attr *attr,\n+\t\t\t struct rte_flow *rule, void *user_data,\n+\t\t\t struct rte_flow_error *error)\n+{\n+\tint ret;\n+\tstruct rte_eth_dev *dev;\n+\tconst struct rte_flow_ops *ops;\n+\n+\tRTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n+\tops = rte_flow_ops_get(port_id, error);\n+\tif (!ops || !ops->flow_update_resized)\n+\t\treturn rte_flow_error_set(error, ENOTSUP,\n+\t\t\t\t\t RTE_FLOW_ERROR_TYPE_UNSPECIFIED, NULL,\n+\t\t\t\t\t \"async_flow_async_transfer not supported\");\n+\tdev = &rte_eth_devices[port_id];\n+\tret = ops->flow_update_resized(dev, queue, attr, rule, user_data, error);\n+\tret = flow_err(port_id, ret, error);\n+\trte_flow_trace_async_update_resized(port_id, queue, attr,\n+\t\t\t\t\t rule, user_data, ret);\n+\treturn ret;\n+}\n+\n+int\n+rte_flow_template_table_resize_complete(uint16_t port_id,\n+\t\t\t\t\tstruct rte_flow_template_table *table,\n+\t\t\t\t\tstruct rte_flow_error *error)\n+{\n+\tint ret;\n+\tstruct rte_eth_dev *dev;\n+\tconst struct rte_flow_ops *ops;\n+\n+\tRTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n+\tops = rte_flow_ops_get(port_id, error);\n+\tif (!ops || !ops->flow_template_table_resize_complete)\n+\t\treturn rte_flow_error_set(error, ENOTSUP,\n+\t\t\t\t\t RTE_FLOW_ERROR_TYPE_UNSPECIFIED, NULL,\n+\t\t\t\t\t \"flow_template_table_transfer_complete not supported\");\n+\tdev = &rte_eth_devices[port_id];\n+\tret = ops->flow_template_table_resize_complete(dev, table, error);\n+\tret = flow_err(port_id, ret, error);\n+\trte_flow_trace_table_resize_complete(port_id, table, ret);\n+\treturn ret;\n+}\ndiff --git a/lib/ethdev/rte_flow.h b/lib/ethdev/rte_flow.h\nindex 78b6bbb159..43f29ef0d9 100644\n--- a/lib/ethdev/rte_flow.h\n+++ b/lib/ethdev/rte_flow.h\n@@ -5746,6 +5746,10 @@ struct rte_flow_template_table;\n * if the hint is supported.\n */\n #define RTE_FLOW_TABLE_SPECIALIZE_TRANSFER_VPORT_ORIG RTE_BIT32(1)\n+/**\n+ * Specialize table for resize.\n+ */\n+#define RTE_FLOW_TABLE_SPECIALIZE_RESIZABLE RTE_BIT32(2)\n /**@}*/\n \n /**\n@@ -5824,6 +5828,28 @@ struct rte_flow_template_table_attr {\n \tenum rte_flow_table_hash_func hash_func;\n };\n \n+/**\n+ * @warning\n+ * @b EXPERIMENTAL: this API may change without prior notice.\n+ *\n+ * Query if a table can be resized\n+ *\n+ * @param port_id\n+ * Port identifier of Ethernet device.\n+ * @param tbl_attr\n+ * Template table\n+ *\n+ * @return\n+ * True if the table can be resized.\n+ */\n+static __rte_always_inline bool\n+rte_flow_table_resizable(__rte_unused uint16_t port_id,\n+\t\t\t const struct rte_flow_template_table_attr *tbl_attr)\n+{\n+\treturn (tbl_attr->specialize &\n+\t\tRTE_FLOW_TABLE_SPECIALIZE_RESIZABLE) != 0;\n+}\n+\n /**\n * @warning\n * @b EXPERIMENTAL: this API may change without prior notice.\n@@ -6750,6 +6776,94 @@ rte_flow_calc_table_hash(uint16_t port_id, const struct rte_flow_template_table\n \t\t\t const struct rte_flow_item pattern[], uint8_t pattern_template_index,\n \t\t\t uint32_t *hash, struct rte_flow_error *error);\n \n+/**\n+ * @warning\n+ * @b EXPERIMENTAL: this API may change without prior notice.\n+ *\n+ * Change template table flow rules capacity.\n+ * PMD implementation must support table change to the new size.\n+ *\n+ * @param port_id\n+ * Port identifier of Ethernet device.\n+ * @param table\n+ * Template table to modify.\n+ * @param nb_rules\n+ * New flow rules capacity.\n+ * @param error\n+ * Perform verbose error reporting if not NULL.\n+ * PMDs initialize this structure in case of error only.\n+ *\n+ * @return\n+ * - (0) if success.\n+ * - (-ENODEV) if *port_id* invalid.\n+ * - (-ENOTSUP) if underlying device does not support this functionality.\n+ * - (-EINVAL) if *table* cannot be resized or resize to *nb_rules*\n+ * is not supported in PMD.\n+ */\n+__rte_experimental\n+int\n+rte_flow_template_table_resize(uint16_t port_id,\n+\t\t\t struct rte_flow_template_table *table,\n+\t\t\t uint32_t nb_rules,\n+\t\t\t struct rte_flow_error *error);\n+/**\n+ * @warning\n+ * @b EXPERIMENTAL: this API may change without prior notice.\n+ *\n+ * Following table resize, update flow resources in port.\n+ *\n+ * @param port_id\n+ * Port identifier of Ethernet device.\n+ * @param queue\n+ * Flow queue for async operation.\n+ * @param attr\n+ * Async operation attributes.\n+ * @param rule\n+ * Flow rule to update.\n+ * @param user_data\n+ * The user data that will be returned on async completion event.\n+ * @param error\n+ * Perform verbose error reporting if not NULL.\n+ * PMDs initialize this structure in case of error only.\n+ *\n+ * @return\n+ * - (0) if success.\n+ * - (-ENODEV) if *port_id* invalid.\n+ * - (-ENOTSUP) if underlying device does not support this functionality.\n+ * - (-EINVAL) if *rule* cannot be updated.\n+ */\n+__rte_experimental\n+int\n+rte_flow_async_update_resized(uint16_t port_id, uint32_t queue,\n+\t\t\t const struct rte_flow_op_attr *attr,\n+\t\t\t struct rte_flow *rule, void *user_data,\n+\t\t\t struct rte_flow_error *error);\n+\n+/**\n+ * @warning\n+ * @b EXPERIMENTAL: this API may change without prior notice.\n+ *\n+ * Following table resize, notify port that all table flows were updated.\n+ *\n+ * @param port_id\n+ * Port identifier of Ethernet device.\n+ * @param table\n+ * Template table that undergoing resize operation.\n+ * @param error\n+ * Perform verbose error reporting if not NULL.\n+ * PMDs initialize this structure in case of error only.\n+ *\n+ * @return\n+ * - (0) if success.\n+ * - (-ENODEV) if *port_id* invalid.\n+ * - (-ENOTSUP) if underlying device does not support this functionality.\n+ * - (-EINVAL) PMD cannot complete table resize.\n+ */\n+__rte_experimental\n+int\n+rte_flow_template_table_resize_complete(uint16_t port_id,\n+\t\t\t\t\tstruct rte_flow_template_table *table,\n+\t\t\t\t\tstruct rte_flow_error *error);\n #ifdef __cplusplus\n }\n #endif\ndiff --git a/lib/ethdev/rte_flow_driver.h b/lib/ethdev/rte_flow_driver.h\nindex f35f659503..53d9393575 100644\n--- a/lib/ethdev/rte_flow_driver.h\n+++ b/lib/ethdev/rte_flow_driver.h\n@@ -370,6 +370,21 @@ struct rte_flow_ops {\n \t\t(struct rte_eth_dev *dev, const struct rte_flow_template_table *table,\n \t\t const struct rte_flow_item pattern[], uint8_t pattern_template_index,\n \t\t uint32_t *hash, struct rte_flow_error *error);\n+\t/** @see rte_flow_template_table_resize() */\n+\tint (*flow_template_table_resize)(struct rte_eth_dev *dev,\n+\t\t\t\t\t struct rte_flow_template_table *table,\n+\t\t\t\t\t uint32_t nb_rules,\n+\t\t\t\t\t struct rte_flow_error *error);\n+\t/** @see rte_flow_async_update_resized() */\n+\tint (*flow_update_resized)(struct rte_eth_dev *dev, uint32_t queue,\n+\t\t\t\t const struct rte_flow_op_attr *attr,\n+\t\t\t\t struct rte_flow *rule, void *user_data,\n+\t\t\t\t struct rte_flow_error *error);\n+\t/** @see rte_flow_template_table_resize_complete() */\n+\tint (*flow_template_table_resize_complete)\n+\t\t\t(struct rte_eth_dev *dev,\n+\t\t\t struct rte_flow_template_table *table,\n+\t\t\t struct rte_flow_error *error);\n };\n \n /**\ndiff --git a/lib/ethdev/version.map b/lib/ethdev/version.map\nindex 5c4917c020..bae70eff27 100644\n--- a/lib/ethdev/version.map\n+++ b/lib/ethdev/version.map\n@@ -316,6 +316,11 @@ EXPERIMENTAL {\n \trte_eth_recycle_rx_queue_info_get;\n \trte_flow_group_set_miss_actions;\n \trte_flow_calc_table_hash;\n+\n+\t# added in 24.03\n+\trte_flow_template_table_resize;\n+\trte_flow_async_update_resized;\n+\trte_flow_template_table_resize_complete;\n };\n \n INTERNAL {\n", "prefixes": [ "v3" ] }{ "id": 136471, "url": "