Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/133491/?format=api
http://patches.dpdk.org/api/patches/133491/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20231027092836.445224-10-haijie1@huawei.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": "<20231027092836.445224-10-haijie1@huawei.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20231027092836.445224-10-haijie1@huawei.com", "date": "2023-10-27T09:28:36", "name": "[9/9] app/testpmd: add RSS hash algorithms display", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "179052dbc17c68d72d09ae78744ef9f5674c1a84", "submitter": { "id": 2935, "url": "http://patches.dpdk.org/api/people/2935/?format=api", "name": "Jie Hai", "email": "haijie1@huawei.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/20231027092836.445224-10-haijie1@huawei.com/mbox/", "series": [ { "id": 30023, "url": "http://patches.dpdk.org/api/series/30023/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=30023", "date": "2023-10-27T09:28:29", "name": "support setting and querying RSS algorithms", "version": 1, "mbox": "http://patches.dpdk.org/series/30023/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/133491/comments/", "check": "fail", "checks": "http://patches.dpdk.org/api/patches/133491/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 C96C843214;\n\tFri, 27 Oct 2023 11:33:24 +0200 (CEST)", "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 3933C42E16;\n\tFri, 27 Oct 2023 11:32:49 +0200 (CEST)", "from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187])\n by mails.dpdk.org (Postfix) with ESMTP id 956F140E6E\n for <dev@dpdk.org>; Fri, 27 Oct 2023 11:32:35 +0200 (CEST)", "from kwepemi500020.china.huawei.com (unknown [172.30.72.55])\n by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4SGy4X40YDzpWXD\n for <dev@dpdk.org>; Fri, 27 Oct 2023 17:27:40 +0800 (CST)", "from localhost.localdomain (10.67.165.2) by\n kwepemi500020.china.huawei.com (7.221.188.8) with Microsoft SMTP Server\n (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id\n 15.1.2507.31; Fri, 27 Oct 2023 17:32:34 +0800" ], "From": "Jie Hai <haijie1@huawei.com>", "To": "<dev@dpdk.org>, Aman Singh <aman.deep.singh@intel.com>, Yuying Zhang\n <yuying.zhang@intel.com>", "CC": "<lihuisong@huawei.com>, <fengchengwen@huawei.com>,\n <liudongdong3@huawei.com>", "Subject": "[PATCH 9/9] app/testpmd: add RSS hash algorithms display", "Date": "Fri, 27 Oct 2023 17:28:36 +0800", "Message-ID": "<20231027092836.445224-10-haijie1@huawei.com>", "X-Mailer": "git-send-email 2.30.0", "In-Reply-To": "<20231027092836.445224-1-haijie1@huawei.com>", "References": "<20231011092805.693171-1-haijie1@huawei.com>\n <20231027092836.445224-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 kwepemi500020.china.huawei.com (7.221.188.8)", "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": "Add the command \"show port X rss-hash algorithm\" to display\nthe RSS hash algorithms of port X. An example is shown:\n\ntestpmd> show port 0 rss-hash algorithm\nRSS algorithms:\n toeplitz\n\nSigned-off-by: Jie Hai <haijie1@huawei.com>\n---\n app/test-pmd/cmdline.c | 29 ++++++++++++++++++++++++-----\n app/test-pmd/config.c | 29 ++++++++++-------------------\n app/test-pmd/testpmd.h | 2 +-\n 3 files changed, 35 insertions(+), 25 deletions(-)", "diff": "diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c\nindex 679ca47b9401..d0eafd7f1254 100644\n--- a/app/test-pmd/cmdline.c\n+++ b/app/test-pmd/cmdline.c\n@@ -174,8 +174,8 @@ static void cmd_help_long_parsed(void *parsed_result,\n \t\t\t\" by masks on port X. size is used to indicate the\"\n \t\t\t\" hardware supported reta size\\n\\n\"\n \n-\t\t\t\"show port (port_id) rss-hash [key]\\n\"\n-\t\t\t\" Display the RSS hash functions and RSS hash key of port\\n\\n\"\n+\t\t\t\"show port (port_id) rss-hash [key | algorithm]\\n\"\n+\t\t\t\" Display the RSS hash functions, RSS hash key and RSS hash algorithms of port\\n\\n\"\n \n \t\t\t\"clear port (info|stats|xstats|fdir) (port_id|all)\\n\"\n \t\t\t\" Clear information for port_id, or all.\\n\\n\"\n@@ -3026,15 +3026,17 @@ struct cmd_showport_rss_hash {\n \tcmdline_fixed_string_t rss_hash;\n \tcmdline_fixed_string_t rss_type;\n \tcmdline_fixed_string_t key; /* optional argument */\n+\tcmdline_fixed_string_t algorithm; /* optional argument */\n };\n \n static void cmd_showport_rss_hash_parsed(void *parsed_result,\n \t\t\t\t__rte_unused struct cmdline *cl,\n-\t\t\t\tvoid *show_rss_key)\n+\t\t\t\t__rte_unused void *data)\n {\n \tstruct cmd_showport_rss_hash *res = parsed_result;\n \n-\tport_rss_hash_conf_show(res->port_id, show_rss_key != NULL);\n+\tport_rss_hash_conf_show(res->port_id,\n+\t\t!strcmp(res->key, \"key\"), !strcmp(res->algorithm, \"algorithm\"));\n }\n \n static cmdline_parse_token_string_t cmd_showport_rss_hash_show =\n@@ -3049,6 +3051,8 @@ static cmdline_parse_token_string_t cmd_showport_rss_hash_rss_hash =\n \t\t\t\t \"rss-hash\");\n static cmdline_parse_token_string_t cmd_showport_rss_hash_rss_key =\n \tTOKEN_STRING_INITIALIZER(struct cmd_showport_rss_hash, key, \"key\");\n+static cmdline_parse_token_string_t cmd_showport_rss_hash_rss_algo =\n+\tTOKEN_STRING_INITIALIZER(struct cmd_showport_rss_hash, algorithm, \"algorithm\");\n \n static cmdline_parse_inst_t cmd_showport_rss_hash = {\n \t.f = cmd_showport_rss_hash_parsed,\n@@ -3065,7 +3069,7 @@ static cmdline_parse_inst_t cmd_showport_rss_hash = {\n \n static cmdline_parse_inst_t cmd_showport_rss_hash_key = {\n \t.f = cmd_showport_rss_hash_parsed,\n-\t.data = (void *)1,\n+\t.data = NULL,\n \t.help_str = \"show port <port_id> rss-hash key\",\n \t.tokens = {\n \t\t(void *)&cmd_showport_rss_hash_show,\n@@ -3077,6 +3081,20 @@ static cmdline_parse_inst_t cmd_showport_rss_hash_key = {\n \t},\n };\n \n+static cmdline_parse_inst_t cmd_showport_rss_hash_algo = {\n+\t.f = cmd_showport_rss_hash_parsed,\n+\t.data = NULL,\n+\t.help_str = \"show port <port_id> rss-hash algorithm\",\n+\t.tokens = {\n+\t\t(void *)&cmd_showport_rss_hash_show,\n+\t\t(void *)&cmd_showport_rss_hash_port,\n+\t\t(void *)&cmd_showport_rss_hash_port_id,\n+\t\t(void *)&cmd_showport_rss_hash_rss_hash,\n+\t\t(void *)&cmd_showport_rss_hash_rss_algo,\n+\t\tNULL,\n+\t},\n+};\n+\n /* *** Configure DCB *** */\n struct cmd_config_dcb {\n \tcmdline_fixed_string_t port;\n@@ -12953,6 +12971,7 @@ static cmdline_parse_ctx_t builtin_ctx[] = {\n \t(cmdline_parse_inst_t *)&cmd_tunnel_udp_config,\n \t(cmdline_parse_inst_t *)&cmd_showport_rss_hash,\n \t(cmdline_parse_inst_t *)&cmd_showport_rss_hash_key,\n+\t(cmdline_parse_inst_t *)&cmd_showport_rss_hash_algo,\n \t(cmdline_parse_inst_t *)&cmd_config_rss_hash_key,\n \t(cmdline_parse_inst_t *)&cmd_cleanup_txq_mbufs,\n \t(cmdline_parse_inst_t *)&cmd_dump,\ndiff --git a/app/test-pmd/config.c b/app/test-pmd/config.c\nindex b9fdb7e8f162..c090b77b536c 100644\n--- a/app/test-pmd/config.c\n+++ b/app/test-pmd/config.c\n@@ -1504,24 +1504,7 @@ rss_config_display(struct rte_flow_action_rss *rss_conf)\n \t\tprintf(\" %d\", rss_conf->queue[i]);\n \tprintf(\"\\n\");\n \n-\tprintf(\" function: \");\n-\tswitch (rss_conf->func) {\n-\tcase RTE_ETH_HASH_FUNCTION_DEFAULT:\n-\t\tprintf(\"default\\n\");\n-\t\tbreak;\n-\tcase RTE_ETH_HASH_FUNCTION_TOEPLITZ:\n-\t\tprintf(\"toeplitz\\n\");\n-\t\tbreak;\n-\tcase RTE_ETH_HASH_FUNCTION_SIMPLE_XOR:\n-\t\tprintf(\"simple_xor\\n\");\n-\t\tbreak;\n-\tcase RTE_ETH_HASH_FUNCTION_SYMMETRIC_TOEPLITZ:\n-\t\tprintf(\"symmetric_toeplitz\\n\");\n-\t\tbreak;\n-\tdefault:\n-\t\tprintf(\"Unknown function\\n\");\n-\t\treturn;\n-\t}\n+\tprintf(\" function: %s\\n\", rte_eth_dev_rss_algo_name(rss_conf->func));\n \n \tprintf(\" RSS key:\\n\");\n \tif (rss_conf->key_len == 0) {\n@@ -4486,7 +4469,7 @@ port_rss_reta_info(portid_t port_id,\n * key of the port.\n */\n void\n-port_rss_hash_conf_show(portid_t port_id, int show_rss_key)\n+port_rss_hash_conf_show(portid_t port_id, int show_rss_key, int show_rss_algo)\n {\n \tstruct rte_eth_rss_conf rss_conf = {0};\n \tuint8_t rss_key[RSS_HASH_KEY_LENGTH];\n@@ -4536,8 +4519,16 @@ port_rss_hash_conf_show(portid_t port_id, int show_rss_key)\n \t\tprintf(\"RSS disabled\\n\");\n \t\treturn;\n \t}\n+\n+\tif (show_rss_algo) {\n+\t\tprintf(\"RSS algorithms:\\n %s\\n\",\n+\t\t\trte_eth_dev_rss_algo_name(rss_conf.algorithm));\n+\t\treturn;\n+\t}\n+\n \tprintf(\"RSS functions:\\n\");\n \trss_types_display(rss_hf, TESTPMD_RSS_TYPES_CHAR_NUM_PER_LINE);\n+\n \tif (!show_rss_key)\n \t\treturn;\n \tprintf(\"RSS key:\\n\");\ndiff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h\nindex 09a36b90b806..9b10a9ea1cf2 100644\n--- a/app/test-pmd/testpmd.h\n+++ b/app/test-pmd/testpmd.h\n@@ -1153,7 +1153,7 @@ int set_vf_rate_limit(portid_t port_id, uint16_t vf, uint32_t rate,\n int set_rxq_avail_thresh(portid_t port_id, uint16_t queue_id,\n \t\t\t uint8_t avail_thresh);\n \n-void port_rss_hash_conf_show(portid_t port_id, int show_rss_key);\n+void port_rss_hash_conf_show(portid_t port_id, int show_rss_key, int show_rss_algo);\n void port_rss_hash_key_update(portid_t port_id, char rss_type[],\n \t\t\t uint8_t *hash_key, uint8_t hash_key_len);\n int rx_queue_id_is_invalid(queueid_t rxq_id);\n", "prefixes": [ "9/9" ] }{ "id": 133491, "url": "