Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/134525/?format=api
http://patchwork.dpdk.org/api/patches/134525/?format=api", "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20231122094900.788126-2-haijie1@huawei.com/", "project": { "id": 1, "url": "http://patchwork.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": "<20231122094900.788126-2-haijie1@huawei.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20231122094900.788126-2-haijie1@huawei.com", "date": "2023-11-22T09:48:58", "name": "[1/2] ethdev: add new API to get RSS hash algorithm by name", "commit_ref": null, "pull_url": null, "state": "changes-requested", "archived": true, "hash": "9b93b01cc598e960ad965afe136f639650b22e07", "submitter": { "id": 2935, "url": "http://patchwork.dpdk.org/api/people/2935/?format=api", "name": "Jie Hai", "email": "haijie1@huawei.com" }, "delegate": { "id": 319, "url": "http://patchwork.dpdk.org/api/users/319/?format=api", "username": "fyigit", "first_name": "Ferruh", "last_name": "Yigit", "email": "ferruh.yigit@amd.com" }, "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/20231122094900.788126-2-haijie1@huawei.com/mbox/", "series": [ { "id": 30355, "url": "http://patchwork.dpdk.org/api/series/30355/?format=api", "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=30355", "date": "2023-11-22T09:48:57", "name": "app/testpmd: support set RSS hash algorithm", "version": 1, "mbox": "http://patchwork.dpdk.org/series/30355/mbox/" } ], "comments": "http://patchwork.dpdk.org/api/patches/134525/comments/", "check": "success", "checks": "http://patchwork.dpdk.org/api/patches/134525/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 5D43A4339B;\n\tWed, 22 Nov 2023 10:53:08 +0100 (CET)", "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 236D740A77;\n\tWed, 22 Nov 2023 10:53:01 +0100 (CET)", "from szxga08-in.huawei.com (szxga08-in.huawei.com [45.249.212.255])\n by mails.dpdk.org (Postfix) with ESMTP id 9FA2D4028C\n for <dev@dpdk.org>; Wed, 22 Nov 2023 10:52:57 +0100 (CET)", "from kwepemd100004.china.huawei.com (unknown [172.30.72.55])\n by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4SZxKf0rZTz1P8kn;\n Wed, 22 Nov 2023 17:49:26 +0800 (CST)", "from localhost.localdomain (10.67.165.2) by\n kwepemd100004.china.huawei.com (7.221.188.31) with Microsoft SMTP Server\n (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id\n 15.2.1258.28; Wed, 22 Nov 2023 17:52:54 +0800" ], "From": "Jie Hai <haijie1@huawei.com>", "To": "<dev@dpdk.org>, Thomas Monjalon <thomas@monjalon.net>, Ferruh Yigit\n <ferruh.yigit@amd.com>, Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>", "CC": "<lihuisong@huawei.com>, <fengchengwen@huawei.com>,\n <liudongdong3@huawei.com>, <haijie1@huawei.com>", "Subject": "[PATCH 1/2] ethdev: add new API to get RSS hash algorithm by name", "Date": "Wed, 22 Nov 2023 17:48:58 +0800", "Message-ID": "<20231122094900.788126-2-haijie1@huawei.com>", "X-Mailer": "git-send-email 2.30.0", "In-Reply-To": "<20231122094900.788126-1-haijie1@huawei.com>", "References": "<20231122094900.788126-1-haijie1@huawei.com>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Content-Type": "text/plain", "X-Originating-IP": "[10.67.165.2]", "X-ClientProxiedBy": "dggems705-chm.china.huawei.com (10.3.19.182) To\n kwepemd100004.china.huawei.com (7.221.188.31)", "X-CFilter-Loop": "Reflected", "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": "This patch supports conversion from names to hash algorithms(see\nRTE_ETH_HASH_FUNCTION_XXX).\n\nSigned-off-by: Jie Hai <haijie1@huawei.com>\nReviewed-by: Huisong Li <lihuisong@huawei.com>\n---\n doc/guides/rel_notes/release_23_11.rst | 3 +++\n lib/ethdev/rte_ethdev.c | 15 +++++++++++++++\n lib/ethdev/rte_ethdev.h | 20 ++++++++++++++++++++\n lib/ethdev/version.map | 1 +\n 4 files changed, 39 insertions(+)", "diff": "diff --git a/doc/guides/rel_notes/release_23_11.rst b/doc/guides/rel_notes/release_23_11.rst\nindex 520321c71e9c..b157fb9d307e 100644\n--- a/doc/guides/rel_notes/release_23_11.rst\n+++ b/doc/guides/rel_notes/release_23_11.rst\n@@ -124,6 +124,9 @@ New Features\n * Added new function ``rte_eth_dev_rss_algo_name``\n to get name of RSS hash algorithm.\n \n+ * Added new function ``rte_eth_find_rss_algo``\n+ to get RSS hash algorithm by its name.\n+\n * **Added packet type flow matching criteria.**\n \n Added ``RTE_FLOW_ITEM_TYPE_PTYPE`` to allow matching on L2/L3/L4\ndiff --git a/lib/ethdev/rte_ethdev.c b/lib/ethdev/rte_ethdev.c\nindex 3858983fcc80..c0398d945502 100644\n--- a/lib/ethdev/rte_ethdev.c\n+++ b/lib/ethdev/rte_ethdev.c\n@@ -4826,6 +4826,21 @@ rte_eth_dev_rss_algo_name(enum rte_eth_hash_function rss_algo)\n \treturn name;\n }\n \n+int\n+rte_eth_find_rss_algo(const char *name, uint32_t *algo)\n+{\n+\tunsigned int i;\n+\n+\tfor (i = 0; i < RTE_DIM(rte_eth_dev_rss_algo_names); i++) {\n+\t\tif (strcmp(name, rte_eth_dev_rss_algo_names[i].name) == 0) {\n+\t\t\t*algo = rte_eth_dev_rss_algo_names[i].algo;\n+\t\t\treturn 0;\n+\t\t}\n+\t}\n+\n+\treturn -EINVAL;\n+}\n+\n int\n rte_eth_dev_udp_tunnel_port_add(uint16_t port_id,\n \t\t\t\tstruct rte_eth_udp_tunnel *udp_tunnel)\ndiff --git a/lib/ethdev/rte_ethdev.h b/lib/ethdev/rte_ethdev.h\nindex 77331ce6525e..3bde5c4c17a6 100644\n--- a/lib/ethdev/rte_ethdev.h\n+++ b/lib/ethdev/rte_ethdev.h\n@@ -4667,6 +4667,26 @@ __rte_experimental\n const char *\n rte_eth_dev_rss_algo_name(enum rte_eth_hash_function rss_algo);\n \n+/**\n+ * @warning\n+ * @b EXPERIMENTAL: this API may change, or be removed, without prior notice.\n+ *\n+ * Get RSS hash algorithm by its name.\n+ *\n+ * @param name\n+ * RSS hash algorithm.\n+ *\n+ * @param algo\n+ * return the RSS hash algorithm found, @see rte_eth_hash_function.\n+ *\n+ * @return\n+ * - (0) if successful.\n+ * - (-EINVAL) if not found.\n+ */\n+__rte_experimental\n+int\n+rte_eth_find_rss_algo(const char *name, uint32_t *algo);\n+\n /**\n * Add UDP tunneling port for a type of tunnel.\n *\ndiff --git a/lib/ethdev/version.map b/lib/ethdev/version.map\nindex 5c4917c020dc..d585c12c0110 100644\n--- a/lib/ethdev/version.map\n+++ b/lib/ethdev/version.map\n@@ -313,6 +313,7 @@ EXPERIMENTAL {\n \n \t# added in 23.11\n \trte_eth_dev_rss_algo_name;\n+\trte_eth_find_rss_algo;\n \trte_eth_recycle_rx_queue_info_get;\n \trte_flow_group_set_miss_actions;\n \trte_flow_calc_table_hash;\n", "prefixes": [ "1/2" ] }{ "id": 134525, "url": "