get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 134111,
    "url": "http://patches.dpdk.org/api/patches/134111/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20231111045944.46378-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": "<20231111045944.46378-2-lihuisong@huawei.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20231111045944.46378-2-lihuisong@huawei.com",
    "date": "2023-11-11T04:59:41",
    "name": "[v2,1/3] app/testpmd: fix random value to set tunnel TSO",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "57e80c7e5ff34cffd6aeb25162776344e6dae0a9",
    "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/20231111045944.46378-2-lihuisong@huawei.com/mbox/",
    "series": [
        {
            "id": 30249,
            "url": "http://patches.dpdk.org/api/series/30249/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=30249",
            "date": "2023-11-11T04:59:42",
            "name": "app/testpmd: fix the command to set tunnel TSO",
            "version": 2,
            "mbox": "http://patches.dpdk.org/series/30249/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/134111/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/134111/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 82789432FA;\n\tSat, 11 Nov 2023 05:59:47 +0100 (CET)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id D5D8E402DF;\n\tSat, 11 Nov 2023 05:59:37 +0100 (CET)",
            "from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187])\n by mails.dpdk.org (Postfix) with ESMTP id EB9AF4025C\n for <dev@dpdk.org>; Sat, 11 Nov 2023 05:59:33 +0100 (CET)",
            "from kwepemm000004.china.huawei.com (unknown [172.30.72.54])\n by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4SS3Pz2c4PzvQ6B;\n Sat, 11 Nov 2023 12:59:19 +0800 (CST)",
            "from localhost.localdomain (10.69.192.56) by\n kwepemm000004.china.huawei.com (7.193.23.18) with Microsoft SMTP Server\n (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id\n 15.1.2507.31; Sat, 11 Nov 2023 12:59:30 +0800"
        ],
        "From": "Huisong Li <lihuisong@huawei.com>",
        "To": "<dev@dpdk.org>, <ferruh.yigit@amd.com>, Aman Singh\n <aman.deep.singh@intel.com>, Yuying Zhang <yuying.zhang@intel.com>, Bernard\n Iremonger <bernard.iremonger@intel.com>, Ivan Ilchenko\n <ivan.ilchenko@oktetlabs.ru>, Andrew Rybchenko\n <andrew.rybchenko@oktetlabs.ru>",
        "CC": "<liuyonglong@huawei.com>, <lihuisong@huawei.com>",
        "Subject": "[PATCH v2 1/3] app/testpmd: fix random value to set tunnel TSO",
        "Date": "Sat, 11 Nov 2023 12:59:41 +0800",
        "Message-ID": "<20231111045944.46378-2-lihuisong@huawei.com>",
        "X-Mailer": "git-send-email 2.33.0",
        "In-Reply-To": "<20231111045944.46378-1-lihuisong@huawei.com>",
        "References": "<20231110081925.14142-1-lihuisong@huawei.com>\n <20231111045944.46378-1-lihuisong@huawei.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain",
        "X-Originating-IP": "[10.69.192.56]",
        "X-ClientProxiedBy": "dggems701-chm.china.huawei.com (10.3.19.178) To\n kwepemm000004.china.huawei.com (7.193.23.18)",
        "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": "Currently, testpmd set tunnel TSO offload even if fail to get dev_info.\nIn this case, the 'tx_offload_capa' in dev_info is a random value,\n\nFixes: 6f51deb903b2 (\"app/testpmd: check status of getting ethdev info\")\nCc: stable@dpdk.org\n\nSigned-off-by: Huisong Li <lihuisong@huawei.com>\n---\n app/test-pmd/cmdline.c | 29 ++++++++++++++---------------\n 1 file changed, 14 insertions(+), 15 deletions(-)",
    "diff": "diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c\nindex 05078f8377..25462bdbfc 100644\n--- a/app/test-pmd/cmdline.c\n+++ b/app/test-pmd/cmdline.c\n@@ -5035,39 +5035,33 @@ struct cmd_tunnel_tso_set_result {\n \tportid_t port_id;\n };\n \n-static struct rte_eth_dev_info\n-check_tunnel_tso_nic_support(portid_t port_id)\n+static void\n+check_tunnel_tso_nic_support(portid_t port_id, uint64_t tx_offload_capa)\n {\n-\tstruct rte_eth_dev_info dev_info;\n-\n-\tif (eth_dev_info_get_print_err(port_id, &dev_info) != 0)\n-\t\treturn dev_info;\n-\n-\tif (!(dev_info.tx_offload_capa & RTE_ETH_TX_OFFLOAD_VXLAN_TNL_TSO))\n+\tif (!(tx_offload_capa & RTE_ETH_TX_OFFLOAD_VXLAN_TNL_TSO))\n \t\tfprintf(stderr,\n \t\t\t\"Warning: VXLAN TUNNEL TSO not supported therefore not enabled for port %d\\n\",\n \t\t\tport_id);\n-\tif (!(dev_info.tx_offload_capa & RTE_ETH_TX_OFFLOAD_GRE_TNL_TSO))\n+\tif (!(tx_offload_capa & RTE_ETH_TX_OFFLOAD_GRE_TNL_TSO))\n \t\tfprintf(stderr,\n \t\t\t\"Warning: GRE TUNNEL TSO not supported therefore not enabled for port %d\\n\",\n \t\t\tport_id);\n-\tif (!(dev_info.tx_offload_capa & RTE_ETH_TX_OFFLOAD_IPIP_TNL_TSO))\n+\tif (!(tx_offload_capa & RTE_ETH_TX_OFFLOAD_IPIP_TNL_TSO))\n \t\tfprintf(stderr,\n \t\t\t\"Warning: IPIP TUNNEL TSO not supported therefore not enabled for port %d\\n\",\n \t\t\tport_id);\n-\tif (!(dev_info.tx_offload_capa & RTE_ETH_TX_OFFLOAD_GENEVE_TNL_TSO))\n+\tif (!(tx_offload_capa & RTE_ETH_TX_OFFLOAD_GENEVE_TNL_TSO))\n \t\tfprintf(stderr,\n \t\t\t\"Warning: GENEVE TUNNEL TSO not supported therefore not enabled for port %d\\n\",\n \t\t\tport_id);\n-\tif (!(dev_info.tx_offload_capa & RTE_ETH_TX_OFFLOAD_IP_TNL_TSO))\n+\tif (!(tx_offload_capa & RTE_ETH_TX_OFFLOAD_IP_TNL_TSO))\n \t\tfprintf(stderr,\n \t\t\t\"Warning: IP TUNNEL TSO not supported therefore not enabled for port %d\\n\",\n \t\t\tport_id);\n-\tif (!(dev_info.tx_offload_capa & RTE_ETH_TX_OFFLOAD_UDP_TNL_TSO))\n+\tif (!(tx_offload_capa & RTE_ETH_TX_OFFLOAD_UDP_TNL_TSO))\n \t\tfprintf(stderr,\n \t\t\t\"Warning: UDP TUNNEL TSO not supported therefore not enabled for port %d\\n\",\n \t\t\tport_id);\n-\treturn dev_info;\n }\n \n static void\n@@ -5077,6 +5071,7 @@ cmd_tunnel_tso_set_parsed(void *parsed_result,\n {\n \tstruct cmd_tunnel_tso_set_result *res = parsed_result;\n \tstruct rte_eth_dev_info dev_info;\n+\tint ret;\n \n \tif (port_id_is_invalid(res->port_id, ENABLED_WARN))\n \t\treturn;\n@@ -5088,7 +5083,11 @@ cmd_tunnel_tso_set_parsed(void *parsed_result,\n \tif (!strcmp(res->mode, \"set\"))\n \t\tports[res->port_id].tunnel_tso_segsz = res->tso_segsz;\n \n-\tdev_info = check_tunnel_tso_nic_support(res->port_id);\n+\tret = eth_dev_info_get_print_err(res->port_id, &dev_info);\n+\tif (ret != 0)\n+\t\treturn;\n+\n+\tcheck_tunnel_tso_nic_support(res->port_id, dev_info.tx_offload_capa);\n \tif (ports[res->port_id].tunnel_tso_segsz == 0) {\n \t\tports[res->port_id].dev_conf.txmode.offloads &=\n \t\t\t~(RTE_ETH_TX_OFFLOAD_VXLAN_TNL_TSO |\n",
    "prefixes": [
        "v2",
        "1/3"
    ]
}