get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 134080,
    "url": "http://patches.dpdk.org/api/patches/134080/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20231110081925.14142-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": "<20231110081925.14142-3-lihuisong@huawei.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20231110081925.14142-3-lihuisong@huawei.com",
    "date": "2023-11-10T08:19:24",
    "name": "[v1,2/3] app/testpmd: add the explicit check for tunnel TSO offload",
    "commit_ref": null,
    "pull_url": null,
    "state": "changes-requested",
    "archived": true,
    "hash": "c8d5a15feba657513ccc2a1dae67e466e5f376dd",
    "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/20231110081925.14142-3-lihuisong@huawei.com/mbox/",
    "series": [
        {
            "id": 30237,
            "url": "http://patches.dpdk.org/api/series/30237/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=30237",
            "date": "2023-11-10T08:19:23",
            "name": "app/testpmd: fix the command to set tunnel TSO",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/30237/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/134080/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/134080/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 D675A432F0;\n\tFri, 10 Nov 2023 09:19:25 +0100 (CET)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id A49D042D97;\n\tFri, 10 Nov 2023 09:19:17 +0100 (CET)",
            "from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188])\n by mails.dpdk.org (Postfix) with ESMTP id F2B76402EA\n for <dev@dpdk.org>; Fri, 10 Nov 2023 09:19:13 +0100 (CET)",
            "from kwepemm000004.china.huawei.com (unknown [172.30.72.53])\n by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4SRWtn15J1zWgn9;\n Fri, 10 Nov 2023 16:18:57 +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; Fri, 10 Nov 2023 16:19:12 +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 v1 2/3] app/testpmd: add the explicit check for tunnel TSO\n offload",
        "Date": "Fri, 10 Nov 2023 16:19:24 +0800",
        "Message-ID": "<20231110081925.14142-3-lihuisong@huawei.com>",
        "X-Mailer": "git-send-email 2.33.0",
        "In-Reply-To": "<20231110081925.14142-1-lihuisong@huawei.com>",
        "References": "<20231110081925.14142-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 | 51 +++++++++++++++++++-----------------------\n 1 file changed, 23 insertions(+), 28 deletions(-)",
    "diff": "diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c\nindex 25462bdbfc..d3243d016b 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@@ -5087,26 +5087,21 @@ cmd_tunnel_tso_set_parsed(void *parsed_result,\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\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+\t}\n+\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-\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": [
        "v1",
        "2/3"
    ]
}