Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/133722/?format=api
http://patchwork.dpdk.org/api/patches/133722/?format=api", "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20231101074039.3088716-11-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": "<20231101074039.3088716-11-haijie1@huawei.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20231101074039.3088716-11-haijie1@huawei.com", "date": "2023-11-01T07:40:39", "name": "[v8,10/10] app/testpmd: add RSS hash algorithms display", "commit_ref": null, "pull_url": null, "state": "changes-requested", "archived": true, "hash": "78e00e837d2c0f3f55be8e2a53f1fbae205422d9", "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/20231101074039.3088716-11-haijie1@huawei.com/mbox/", "series": [ { "id": 30092, "url": "http://patchwork.dpdk.org/api/series/30092/?format=api", "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=30092", "date": "2023-11-01T07:40:32", "name": "support setting and querying RSS algorithms", "version": 8, "mbox": "http://patchwork.dpdk.org/series/30092/mbox/" } ], "comments": "http://patchwork.dpdk.org/api/patches/133722/comments/", "check": "success", "checks": "http://patchwork.dpdk.org/api/patches/133722/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 A098E4325D;\n\tWed, 1 Nov 2023 08:45:30 +0100 (CET)", "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 37F3642DC5;\n\tWed, 1 Nov 2023 08:44:35 +0100 (CET)", "from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188])\n by mails.dpdk.org (Postfix) with ESMTP id E77F540647\n for <dev@dpdk.org>; Wed, 1 Nov 2023 08:44:24 +0100 (CET)", "from kwepemi500020.china.huawei.com (unknown [172.30.72.56])\n by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4SKzY16QqzzVk6H\n for <dev@dpdk.org>; Wed, 1 Nov 2023 15:44:21 +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; Wed, 1 Nov 2023 15:44:23 +0800" ], "From": "Jie Hai <haijie1@huawei.com>", "To": "<haijie1@huawei.com>, <dev@dpdk.org>, Aman Singh\n <aman.deep.singh@intel.com>, Yuying Zhang <yuying.zhang@intel.com>", "CC": "<lihuisong@huawei.com>, <fengchengwen@huawei.com>,\n <liudongdong3@huawei.com>", "Subject": "[PATCH v8 10/10] app/testpmd: add RSS hash algorithms display", "Date": "Wed, 1 Nov 2023 15:40:39 +0800", "Message-ID": "<20231101074039.3088716-11-haijie1@huawei.com>", "X-Mailer": "git-send-email 2.30.0", "In-Reply-To": "<20231101074039.3088716-1-haijie1@huawei.com>", "References": "<20230315110033.30143-1-liudongdong3@huawei.com>\n <20231101074039.3088716-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": "dggems706-chm.china.huawei.com (10.3.19.183) 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 algorithm:\n toeplitz\n\nSigned-off-by: Jie Hai <haijie1@huawei.com>\nAcked-by: Huisong Li <lihuisong@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 35f5e4bbc002..912bf3355c10 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@@ -12969,6 +12987,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..23fb4f8aa781 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 algorithm:\\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": [ "v8", "10/10" ] }{ "id": 133722, "url": "