get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 127693,
    "url": "http://patchwork.dpdk.org/api/patches/127693/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20230530090510.56812-6-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": "<20230530090510.56812-6-haijie1@huawei.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20230530090510.56812-6-haijie1@huawei.com",
    "date": "2023-05-30T09:05:05",
    "name": "[05/10] ethdev: support telemetry query Tx queue info",
    "commit_ref": null,
    "pull_url": null,
    "state": "changes-requested",
    "archived": true,
    "hash": "eca06f2f04517e05f2d8a266a60f17827283b8a9",
    "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/20230530090510.56812-6-haijie1@huawei.com/mbox/",
    "series": [
        {
            "id": 28245,
            "url": "http://patchwork.dpdk.org/api/series/28245/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=28245",
            "date": "2023-05-30T09:05:00",
            "name": "support telemetry query ethdev info",
            "version": 1,
            "mbox": "http://patchwork.dpdk.org/series/28245/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/127693/comments/",
    "check": "success",
    "checks": "http://patchwork.dpdk.org/api/patches/127693/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 E467042BE1;\n\tTue, 30 May 2023 11:08:03 +0200 (CEST)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 2871442D39;\n\tTue, 30 May 2023 11:07:46 +0200 (CEST)",
            "from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188])\n by mails.dpdk.org (Postfix) with ESMTP id 5947C42D0B\n for <dev@dpdk.org>; Tue, 30 May 2023 11:07:42 +0200 (CEST)",
            "from kwepemi500020.china.huawei.com (unknown [172.30.72.53])\n by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4QVmgG1Y04zLnd8;\n Tue, 30 May 2023 17:04:42 +0800 (CST)",
            "from localhost.localdomain (10.69.192.56) 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.23; Tue, 30 May 2023 17:07:40 +0800"
        ],
        "From": "Jie Hai <haijie1@huawei.com>",
        "To": "Thomas Monjalon <thomas@monjalon.net>, Ferruh Yigit\n <ferruh.yigit@amd.com>, Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>",
        "CC": "<dev@dpdk.org>, <liudongdong3@huawei.com>",
        "Subject": "[PATCH 05/10] ethdev: support telemetry query Tx queue info",
        "Date": "Tue, 30 May 2023 17:05:05 +0800",
        "Message-ID": "<20230530090510.56812-6-haijie1@huawei.com>",
        "X-Mailer": "git-send-email 2.33.0",
        "In-Reply-To": "<20230530090510.56812-1-haijie1@huawei.com>",
        "References": "<20230530090510.56812-1-haijie1@huawei.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain",
        "X-Originating-IP": "[10.69.192.56]",
        "X-ClientProxiedBy": "dggems705-chm.china.huawei.com (10.3.19.182) 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": "This patch support querying information of Tx queues.\nThe command is like:\n--> /ethdev/tx_queue,0,0\n{\n  \"/ethdev/tx_queue\": {\n    \"host_threshold\": 0,\n    \"prefetch_threshold\": 0,\n    \"writeback_threshold\": 0,\n    \"rs_threshold\": 32,\n    \"free_threshold\": 928,\n    \"deferred_start\": \"off\",\n    \"offloads\": [\n      \"MBUF_FAST_FREE\"\n    ],\n    \"queue_state\": 1,\n    \"nb_desc\": 1024,\n    \"burst_flags\": 0,\n    \"burst_mode\": \"Vector Neon\"\n  }\n}\n\nSigned-off-by: Jie Hai <haijie1@huawei.com>\n---\n lib/ethdev/rte_ethdev.c | 50 +++++++++++++++++++++++++++++++++++++++++\n 1 file changed, 50 insertions(+)",
    "diff": "diff --git a/lib/ethdev/rte_ethdev.c b/lib/ethdev/rte_ethdev.c\nindex 35c13df1c110..315334321cb3 100644\n--- a/lib/ethdev/rte_ethdev.c\n+++ b/lib/ethdev/rte_ethdev.c\n@@ -7295,6 +7295,54 @@ eth_dev_handle_port_rxq(const char *cmd __rte_unused,\n \treturn ret;\n }\n \n+static int\n+eth_dev_handle_port_txq(const char *cmd __rte_unused,\n+\t\tconst char *params,\n+\t\tstruct rte_tel_data *d)\n+{\n+\tstruct rte_eth_thresh *tx_thresh;\n+\tunsigned long port_id, queue_id;\n+\tstruct rte_eth_txconf *txconf;\n+\tstruct rte_eth_txq_info qinfo;\n+\tstruct rte_tel_data *offload;\n+\tint ret;\n+\n+\tret = parse_queue_params(params, false, &port_id, &queue_id);\n+\tif (ret != 0)\n+\t\treturn ret;\n+\n+\tret = rte_eth_tx_queue_info_get(port_id, queue_id, &qinfo);\n+\tif (ret != 0)\n+\t\treturn ret;\n+\n+\trte_tel_data_start_dict(d);\n+\ttx_thresh = &qinfo.conf.tx_thresh;\n+\ttxconf = &qinfo.conf;\n+\trte_tel_data_add_dict_uint(d, \"host_threshold\", tx_thresh->hthresh);\n+\trte_tel_data_add_dict_uint(d, \"prefetch_threshold\", tx_thresh->pthresh);\n+\trte_tel_data_add_dict_uint(d, \"writeback_threshold\", tx_thresh->wthresh);\n+\trte_tel_data_add_dict_uint(d, \"rs_threshold\", txconf->tx_rs_thresh);\n+\trte_tel_data_add_dict_uint(d, \"free_threshold\", txconf->tx_free_thresh);\n+\trte_tel_data_add_dict_string(d, \"deferred_start\",\n+\t\t\ttxconf->tx_deferred_start == 0 ? \"off\" : \"on\");\n+\n+\toffload = rte_tel_data_alloc();\n+\tif (offload == NULL)\n+\t\treturn -ENOMEM;\n+\n+\teth_dev_parse_tx_offloads(txconf->offloads, offload);\n+\trte_tel_data_add_dict_container(d, \"offloads\", offload, 0);\n+\n+\trte_tel_data_add_dict_uint(d, \"queue_state\", qinfo.queue_state);\n+\trte_tel_data_add_dict_uint(d, \"nb_desc\", qinfo.nb_desc);\n+\n+\tret = eth_dev_add_burst_mode(port_id, queue_id, false, d);\n+\tif (ret != 0)\n+\t\trte_tel_data_free(offload);\n+\n+\treturn 0;\n+}\n+\n RTE_LOG_REGISTER_DEFAULT(rte_eth_dev_logtype, INFO);\n \n RTE_INIT(ethdev_init_telemetry)\n@@ -7322,4 +7370,6 @@ RTE_INIT(ethdev_init_telemetry)\n \t\t\t\"Returns flow ctrl info for a port. Parameters: unsigned port_id\");\n \trte_telemetry_register_cmd(\"/ethdev/rx_queue\", eth_dev_handle_port_rxq,\n \t\t\t\"Returns Rx queue info for a port. Parameters: unsigned port_id, unsigned queue_id (Optional if only one queue)\");\n+\trte_telemetry_register_cmd(\"/ethdev/tx_queue\", eth_dev_handle_port_txq,\n+\t\t\t\"Returns Tx queue info for a port. Parameters: unsigned port_id, unsigned queue_id (Optional if only one queue)\");\n }\n",
    "prefixes": [
        "05/10"
    ]
}