get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 134109,
    "url": "http://patches.dpdk.org/api/patches/134109/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20231111045944.46378-3-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-3-lihuisong@huawei.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20231111045944.46378-3-lihuisong@huawei.com",
    "date": "2023-11-11T04:59:42",
    "name": "[v2,2/3] app/testpmd: add the explicit check for tunnel TSO offload",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "6ca09dbd217cdf7b834676d44b7acf21c20550d3",
    "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-3-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/134109/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/134109/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 1C373432FA;\n\tSat, 11 Nov 2023 05:59:36 +0100 (CET)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 9C8E44025C;\n\tSat, 11 Nov 2023 05:59:35 +0100 (CET)",
            "from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187])\n by mails.dpdk.org (Postfix) with ESMTP id E60EA4021E\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 4SS3LT158BzrSML;\n Sat, 11 Nov 2023 12:56:17 +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:31 +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>, Wenzhuo\n Lu <wenzhuo.lu@intel.com>, Shahaf Shuler <shahafs@nvidia.com>",
        "CC": "<andrew.rybchenko@oktetlabs.ru>, <liuyonglong@huawei.com>,\n <lihuisong@huawei.com>",
        "Subject": "[PATCH v2 2/3] app/testpmd: add the explicit check for tunnel TSO\n offload",
        "Date": "Sat, 11 Nov 2023 12:59:42 +0800",
        "Message-ID": "<20231111045944.46378-3-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": "If port don't support TSO of tunnel packets, tell user in advance and\nno need to change other configuration of this port in case of fault spread.\n\nIn addition, if some tunnel offloads don't support, which is not an error\ncase, the log about this shouldn't be to stderr.\n\nFixes: 3926dd2b6668 (\"app/testpmd: enforce offload capabilities check\")\nCc: stable@dpdk.org\n\nSigned-off-by: Huisong Li <lihuisong@huawei.com>\n---\n app/test-pmd/cmdline.c | 55 ++++++++++++++++++------------------------\n 1 file changed, 24 insertions(+), 31 deletions(-)",
    "diff": "diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c\nindex 25462bdbfc..7a85cb0024 100644\n--- a/app/test-pmd/cmdline.c\n+++ b/app/test-pmd/cmdline.c\n@@ -5039,28 +5039,22 @@ static void\n check_tunnel_tso_nic_support(portid_t port_id, uint64_t tx_offload_capa)\n {\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\tprintf(\"Warning: VXLAN TUNNEL TSO not supported therefore not enabled for port %d\\n\",\n \t\t\tport_id);\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\tprintf(\"Warning: GRE TUNNEL TSO not supported therefore not enabled for port %d\\n\",\n \t\t\tport_id);\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\tprintf(\"Warning: IPIP TUNNEL TSO not supported therefore not enabled for port %d\\n\",\n \t\t\tport_id);\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\tprintf(\"Warning: GENEVE TUNNEL TSO not supported therefore not enabled for port %d\\n\",\n \t\t\tport_id);\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\tprintf(\"Warning: IP TUNNEL TSO not supported therefore not enabled for port %d\\n\",\n \t\t\tport_id);\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\tprintf(\"Warning: UDP TUNNEL TSO not supported therefore not enabled for port %d\\n\",\n \t\t\tport_id);\n }\n \n@@ -5071,6 +5065,12 @@ 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+\tuint64_t all_tunnel_tso = RTE_ETH_TX_OFFLOAD_VXLAN_TNL_TSO |\n+\t\t\t\tRTE_ETH_TX_OFFLOAD_GRE_TNL_TSO |\n+\t\t\t\tRTE_ETH_TX_OFFLOAD_IPIP_TNL_TSO |\n+\t\t\t\tRTE_ETH_TX_OFFLOAD_GENEVE_TNL_TSO |\n+\t\t\t\tRTE_ETH_TX_OFFLOAD_IP_TNL_TSO |\n+\t\t\t\tRTE_ETH_TX_OFFLOAD_UDP_TNL_TSO;\n \tint ret;\n \n \tif (port_id_is_invalid(res->port_id, ENABLED_WARN))\n@@ -5083,30 +5083,23 @@ 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-\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-\t\t\t  RTE_ETH_TX_OFFLOAD_GRE_TNL_TSO |\n-\t\t\t  RTE_ETH_TX_OFFLOAD_IPIP_TNL_TSO |\n-\t\t\t  RTE_ETH_TX_OFFLOAD_GENEVE_TNL_TSO |\n-\t\t\t  RTE_ETH_TX_OFFLOAD_IP_TNL_TSO |\n-\t\t\t  RTE_ETH_TX_OFFLOAD_UDP_TNL_TSO);\n+\t\tports[res->port_id].dev_conf.txmode.offloads &= ~all_tunnel_tso;\n \t\tprintf(\"TSO for tunneled packets is disabled\\n\");\n \t} else {\n-\t\tuint64_t tso_offloads = (RTE_ETH_TX_OFFLOAD_VXLAN_TNL_TSO |\n-\t\t\t\t\t RTE_ETH_TX_OFFLOAD_GRE_TNL_TSO |\n-\t\t\t\t\t RTE_ETH_TX_OFFLOAD_IPIP_TNL_TSO |\n-\t\t\t\t\t RTE_ETH_TX_OFFLOAD_GENEVE_TNL_TSO |\n-\t\t\t\t\t RTE_ETH_TX_OFFLOAD_IP_TNL_TSO |\n-\t\t\t\t\t RTE_ETH_TX_OFFLOAD_UDP_TNL_TSO);\n+\t\tret = eth_dev_info_get_print_err(res->port_id, &dev_info);\n+\t\tif (ret != 0)\n+\t\t\treturn;\n+\n+\t\tif ((all_tunnel_tso & dev_info.tx_offload_capa) == 0) {\n+\t\t\tfprintf(stderr, \"Error: port=%u don't support tunnel TSO offloads.\\n\",\n+\t\t\t\tres->port_id);\n+\t\t\treturn;\n+\t\t}\n+\t\tcheck_tunnel_tso_nic_support(res->port_id, dev_info.tx_offload_capa);\n \n \t\tports[res->port_id].dev_conf.txmode.offloads |=\n-\t\t\t(tso_offloads & dev_info.tx_offload_capa);\n+\t\t\t(all_tunnel_tso & dev_info.tx_offload_capa);\n \t\tprintf(\"TSO segment size for tunneled packets is %d\\n\",\n \t\t\tports[res->port_id].tunnel_tso_segsz);\n \n",
    "prefixes": [
        "v2",
        "2/3"
    ]
}