get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 113546,
    "url": "http://patches.dpdk.org/api/patches/113546/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20220629083451.21954-2-lihuisong@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": "<20220629083451.21954-2-lihuisong@huawei.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20220629083451.21954-2-lihuisong@huawei.com",
    "date": "2022-06-29T08:34:44",
    "name": "[V6,1/8] app/testpmd: fix supported RSS offload display",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "52d51cd8e2b58e9e01a3c149e8b9c6e9e16a98c1",
    "submitter": {
        "id": 2085,
        "url": "http://patches.dpdk.org/api/people/2085/?format=api",
        "name": "lihuisong (C)",
        "email": "lihuisong@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/20220629083451.21954-2-lihuisong@huawei.com/mbox/",
    "series": [
        {
            "id": 23824,
            "url": "http://patches.dpdk.org/api/series/23824/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=23824",
            "date": "2022-06-29T08:34:43",
            "name": "app/testpmd: fix RSS and flow type",
            "version": 6,
            "mbox": "http://patches.dpdk.org/series/23824/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/113546/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/113546/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 25A55A0545;\n\tWed, 29 Jun 2022 10:35:54 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 19F2942B76;\n\tWed, 29 Jun 2022 10:35:30 +0200 (CEST)",
            "from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187])\n by mails.dpdk.org (Postfix) with ESMTP id 7CED342905\n for <dev@dpdk.org>; Wed, 29 Jun 2022 10:35:26 +0200 (CEST)",
            "from dggemv704-chm.china.huawei.com (unknown [172.30.72.53])\n by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4LXvqS40PdzhYwH;\n Wed, 29 Jun 2022 16:33:08 +0800 (CST)",
            "from kwepemm600004.china.huawei.com (7.193.23.242) by\n dggemv704-chm.china.huawei.com (10.3.19.47) with Microsoft SMTP Server\n (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id\n 15.1.2375.24; Wed, 29 Jun 2022 16:35:18 +0800",
            "from localhost.localdomain (10.28.79.22) by\n kwepemm600004.china.huawei.com (7.193.23.242) with Microsoft SMTP Server\n (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id\n 15.1.2375.24; Wed, 29 Jun 2022 16:35:18 +0800"
        ],
        "From": "Huisong Li <lihuisong@huawei.com>",
        "To": "<aman.deep.singh@intel.com>, <yuying.zhang@intel.com>,\n <ferruh.yigit@xilinx.com>, <andrew.rybchenko@oktetlabs.ru>",
        "CC": "<dev@dpdk.org>, <thomas@monjalon.net>, <huangdaode@huawei.com>,\n <liudongdong3@huawei.com>, <lihuisong@huawei.com>",
        "Subject": "[PATCH V6 1/8] app/testpmd: fix supported RSS offload display",
        "Date": "Wed, 29 Jun 2022 16:34:44 +0800",
        "Message-ID": "<20220629083451.21954-2-lihuisong@huawei.com>",
        "X-Mailer": "git-send-email 2.22.0",
        "In-Reply-To": "<20220629083451.21954-1-lihuisong@huawei.com>",
        "References": "<20220429102445.23711-1-lihuisong@huawei.com>\n <20220629083451.21954-1-lihuisong@huawei.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain",
        "X-Originating-IP": "[10.28.79.22]",
        "X-ClientProxiedBy": "dggems703-chm.china.huawei.com (10.3.19.180) To\n kwepemm600004.china.huawei.com (7.193.23.242)",
        "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": "The rte_eth_dev_info.flow_type_rss_offloads is populated in terms of\nRTE_ETH_RSS_* bits. If PMD sets RTE_ETH_RSS_L3_SRC_ONLY to\ndev_info->flow_type_rss_offloads. testpmd will display \"user defined 63\"\nwhen run 'show port info 0'. Because testpmd use flowtype_to_str()\nto display the supported RSS offload of PMD. In fact, the function is\nused to display flow type in FDIR commands for i40e or ixgbe. This patch\nuses the RTE_ETH_RSS_* bits to display supported RSS offload of PMD.\n\nFixes: b12964f621dc (\"ethdev: unification of RSS offload types\")\nCc: stable@dpdk.org\n\nSigned-off-by: Huisong Li <lihuisong@huawei.com>\nSigned-off-by: Ferruh Yigit <ferruh.yigit@xilinx.com>\n---\n app/test-pmd/config.c  | 40 ++++++++++++++++++++++++++--------------\n app/test-pmd/testpmd.h |  2 ++\n 2 files changed, 28 insertions(+), 14 deletions(-)",
    "diff": "diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c\nindex 62833fe97c..a1183ad18e 100644\n--- a/app/test-pmd/config.c\n+++ b/app/test-pmd/config.c\n@@ -66,8 +66,6 @@\n \n #define NS_PER_SEC 1E9\n \n-static char *flowtype_to_str(uint16_t flow_type);\n-\n static const struct {\n \tenum tx_pkt_split split;\n \tconst char *name;\n@@ -675,6 +673,19 @@ print_dev_capabilities(uint64_t capabilities)\n \t}\n }\n \n+const char *\n+rsstypes_to_str(uint64_t rss_type)\n+{\n+\tuint16_t i;\n+\n+\tfor (i = 0; rss_type_table[i].str != NULL; i++) {\n+\t\tif (rss_type_table[i].rss_type == rss_type)\n+\t\t\treturn rss_type_table[i].str;\n+\t}\n+\n+\treturn NULL;\n+}\n+\n void\n port_infos_display(portid_t port_id)\n {\n@@ -779,19 +790,20 @@ port_infos_display(portid_t port_id)\n \tif (!dev_info.flow_type_rss_offloads)\n \t\tprintf(\"No RSS offload flow type is supported.\\n\");\n \telse {\n+\t\tuint64_t rss_offload_types = dev_info.flow_type_rss_offloads;\n \t\tuint16_t i;\n-\t\tchar *p;\n \n \t\tprintf(\"Supported RSS offload flow types:\\n\");\n-\t\tfor (i = RTE_ETH_FLOW_UNKNOWN + 1;\n-\t\t     i < sizeof(dev_info.flow_type_rss_offloads) * CHAR_BIT; i++) {\n-\t\t\tif (!(dev_info.flow_type_rss_offloads & (1ULL << i)))\n-\t\t\t\tcontinue;\n-\t\t\tp = flowtype_to_str(i);\n-\t\t\tif (p)\n-\t\t\t\tprintf(\"  %s\\n\", p);\n-\t\t\telse\n-\t\t\t\tprintf(\"  user defined %d\\n\", i);\n+\t\tfor (i = 0; i < sizeof(rss_offload_types) * CHAR_BIT; i++) {\n+\t\t\tuint64_t rss_offload = RTE_BIT64(i);\n+\t\t\tif ((rss_offload_types & rss_offload) != 0) {\n+\t\t\t\tconst char *p = rsstypes_to_str(rss_offload);\n+\t\t\t\tif (p)\n+\t\t\t\t\tprintf(\"  %s\\n\", p);\n+\t\t\t\telse\n+\t\t\t\t\tprintf(\"  user defined %u\\n\",\n+\t\t\t\t\t       i);\n+\t\t\t}\n \t\t}\n \t}\n \n@@ -5604,6 +5616,8 @@ set_record_burst_stats(uint8_t on_off)\n \trecord_burst_stats = on_off;\n }\n \n+#if defined(RTE_NET_I40E) || defined(RTE_NET_IXGBE)\n+\n static char*\n flowtype_to_str(uint16_t flow_type)\n {\n@@ -5647,8 +5661,6 @@ flowtype_to_str(uint16_t flow_type)\n \treturn NULL;\n }\n \n-#if defined(RTE_NET_I40E) || defined(RTE_NET_IXGBE)\n-\n static inline void\n print_fdir_mask(struct rte_eth_fdir_masks *mask)\n {\ndiff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h\nindex eeefb5e70f..195488b602 100644\n--- a/app/test-pmd/testpmd.h\n+++ b/app/test-pmd/testpmd.h\n@@ -1199,6 +1199,8 @@ extern int flow_parse(const char *src, void *result, unsigned int size,\n \t\t      struct rte_flow_item **pattern,\n \t\t      struct rte_flow_action **actions);\n \n+const char *rsstypes_to_str(uint64_t rss_type);\n+\n /* For registering driver specific testpmd commands. */\n struct testpmd_driver_commands {\n \tTAILQ_ENTRY(testpmd_driver_commands) next;\n",
    "prefixes": [
        "V6",
        "1/8"
    ]
}