get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/133778/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 133778,
    "url": "http://patchwork.dpdk.org/api/patches/133778/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20231102082020.2588392-10-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": "<20231102082020.2588392-10-haijie1@huawei.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20231102082020.2588392-10-haijie1@huawei.com",
    "date": "2023-11-02T08:20:20",
    "name": "[v9,9/9] app/testpmd: add RSS hash algorithms display",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "daa29d9b31a9b943b113b9ebed766bab9f060745",
    "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/20231102082020.2588392-10-haijie1@huawei.com/mbox/",
    "series": [
        {
            "id": 30113,
            "url": "http://patchwork.dpdk.org/api/series/30113/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=30113",
            "date": "2023-11-02T08:20:14",
            "name": "support setting and querying RSS algorithms",
            "version": 9,
            "mbox": "http://patchwork.dpdk.org/series/30113/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/133778/comments/",
    "check": "success",
    "checks": "http://patchwork.dpdk.org/api/patches/133778/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 4303B4326B;\n\tThu,  2 Nov 2023 09:25:01 +0100 (CET)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 50A4C42D0B;\n\tThu,  2 Nov 2023 09:24:08 +0100 (CET)",
            "from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187])\n by mails.dpdk.org (Postfix) with ESMTP id CFB6D40282\n for <dev@dpdk.org>; Thu,  2 Nov 2023 09:23:58 +0100 (CET)",
            "from kwepemi500020.china.huawei.com (unknown [172.30.72.53])\n by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4SLcNC2pJGzvQRw\n for <dev@dpdk.org>; Thu,  2 Nov 2023 16:23:55 +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; Thu, 2 Nov 2023 16:23:57 +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 v9 9/9] app/testpmd: add RSS hash algorithms display",
        "Date": "Thu, 2 Nov 2023 16:20:20 +0800",
        "Message-ID": "<20231102082020.2588392-10-haijie1@huawei.com>",
        "X-Mailer": "git-send-email 2.30.0",
        "In-Reply-To": "<20231102082020.2588392-1-haijie1@huawei.com>",
        "References": "<20230315110033.30143-1-liudongdong3@huawei.com>\n <20231102082020.2588392-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": "dggems704-chm.china.huawei.com (10.3.19.181) 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>\nAcked-by: Chengwen Feng <fengchengwen@huawei.com>\n---\n app/test-pmd/cmdline.c                      | 29 +++++++++++++++++----\n app/test-pmd/config.c                       | 10 ++++++-\n app/test-pmd/testpmd.h                      |  2 +-\n doc/guides/testpmd_app_ug/testpmd_funcs.rst |  4 +--\n 4 files changed, 36 insertions(+), 9 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 a3e32aa852d8..23fb4f8aa781 100644\n--- a/app/test-pmd/config.c\n+++ b/app/test-pmd/config.c\n@@ -4469,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@@ -4519,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);\ndiff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst b/doc/guides/testpmd_app_ug/testpmd_funcs.rst\nindex 3d242c85345f..b51e459998b0 100644\n--- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst\n+++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst\n@@ -235,9 +235,9 @@ size is used to indicate the hardware supported reta size\n show port rss-hash\n ~~~~~~~~~~~~~~~~~~\n \n-Display the RSS hash functions and RSS hash key of a port::\n+Display the RSS hash functions and RSS hash key or RSS hash algorithm of a port::\n \n-   testpmd> show port (port_id) rss-hash [key]\n+   testpmd> show port (port_id) rss-hash [key | algorithm]\n \n clear port\n ~~~~~~~~~~\n",
    "prefixes": [
        "v9",
        "9/9"
    ]
}