get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 128279,
    "url": "https://patches.dpdk.org/api/patches/128279/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20230607074209.4798-9-haijie1@huawei.com/",
    "project": {
        "id": 1,
        "url": "https://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": "<20230607074209.4798-9-haijie1@huawei.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20230607074209.4798-9-haijie1@huawei.com",
    "date": "2023-06-07T07:42:03",
    "name": "[v2,08/13] ethdev: support telemetry query Tx queue info",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "275b3369d6b38c2507923212849e37aa47b98c8a",
    "submitter": {
        "id": 2935,
        "url": "https://patches.dpdk.org/api/people/2935/?format=api",
        "name": "Jie Hai",
        "email": "haijie1@huawei.com"
    },
    "delegate": {
        "id": 319,
        "url": "https://patches.dpdk.org/api/users/319/?format=api",
        "username": "fyigit",
        "first_name": "Ferruh",
        "last_name": "Yigit",
        "email": "ferruh.yigit@amd.com"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/20230607074209.4798-9-haijie1@huawei.com/mbox/",
    "series": [
        {
            "id": 28386,
            "url": "https://patches.dpdk.org/api/series/28386/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=28386",
            "date": "2023-06-07T07:41:55",
            "name": "support telemetry query ethdev info",
            "version": 2,
            "mbox": "https://patches.dpdk.org/series/28386/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/128279/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/128279/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 C081E42C4A;\n\tWed,  7 Jun 2023 09:46:06 +0200 (CEST)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 430D742D3F;\n\tWed,  7 Jun 2023 09:45:34 +0200 (CEST)",
            "from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187])\n by mails.dpdk.org (Postfix) with ESMTP id 1FEB241153\n for <dev@dpdk.org>; Wed,  7 Jun 2023 09:45:27 +0200 (CEST)",
            "from kwepemi500020.china.huawei.com (unknown [172.30.72.55])\n by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4QbfQY4p8HzqTqH;\n Wed,  7 Jun 2023 15:40:37 +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; Wed, 7 Jun 2023 15:45:25 +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 v2 08/13] ethdev: support telemetry query Tx queue info",
        "Date": "Wed, 7 Jun 2023 15:42:03 +0800",
        "Message-ID": "<20230607074209.4798-9-haijie1@huawei.com>",
        "X-Mailer": "git-send-email 2.33.0",
        "In-Reply-To": "<20230607074209.4798-1-haijie1@huawei.com>",
        "References": "<20230530090510.56812-1-haijie1@huawei.com>\n <20230607074209.4798-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": "dggems704-chm.china.huawei.com (10.3.19.181) 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_telemetry.c | 50 +++++++++++++++++++++++++++++++\n 1 file changed, 50 insertions(+)",
    "diff": "diff --git a/lib/ethdev/rte_ethdev_telemetry.c b/lib/ethdev/rte_ethdev_telemetry.c\nindex d1875dbe110e..f69bcedac86f 100644\n--- a/lib/ethdev/rte_ethdev_telemetry.c\n+++ b/lib/ethdev/rte_ethdev_telemetry.c\n@@ -575,6 +575,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+\tstruct rte_eth_txconf *txconf;\n+\tstruct rte_eth_txq_info qinfo;\n+\tstruct rte_tel_data *offload;\n+\tuint16_t port_id, queue_id;\n+\tint ret;\n+\n+\tret = ethdev_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_INIT(ethdev_init_telemetry)\n {\n \trte_telemetry_register_cmd(\"/ethdev/list\", eth_dev_handle_port_list,\n@@ -600,4 +648,6 @@ RTE_INIT(ethdev_init_telemetry)\n \t\t\t\"Returns flow ctrl info for a port. Parameters: int 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: int port_id, int 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: int port_id, int queue_id (Optional if only one queue)\");\n }\n",
    "prefixes": [
        "v2",
        "08/13"
    ]
}