get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 107055,
    "url": "http://patches.dpdk.org/api/patches/107055/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20220209012106.23404-1-humin29@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": "<20220209012106.23404-1-humin29@huawei.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20220209012106.23404-1-humin29@huawei.com",
    "date": "2022-02-09T01:21:06",
    "name": "[v3] ethdev: introduce dump API",
    "commit_ref": null,
    "pull_url": null,
    "state": "changes-requested",
    "archived": true,
    "hash": "29c68189ee3f363a5279615601181b7e74e9cd9c",
    "submitter": {
        "id": 1944,
        "url": "http://patches.dpdk.org/api/people/1944/?format=api",
        "name": "humin (Q)",
        "email": "humin29@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/20220209012106.23404-1-humin29@huawei.com/mbox/",
    "series": [
        {
            "id": 21537,
            "url": "http://patches.dpdk.org/api/series/21537/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=21537",
            "date": "2022-02-09T01:21:06",
            "name": "[v3] ethdev: introduce dump API",
            "version": 3,
            "mbox": "http://patches.dpdk.org/series/21537/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/107055/comments/",
    "check": "warning",
    "checks": "http://patches.dpdk.org/api/patches/107055/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 2FDB9A034E;\n\tWed,  9 Feb 2022 02:21:08 +0100 (CET)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id AFF8B410F3;\n\tWed,  9 Feb 2022 02:21:07 +0100 (CET)",
            "from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188])\n by mails.dpdk.org (Postfix) with ESMTP id D43E44067E\n for <dev@dpdk.org>; Wed,  9 Feb 2022 02:21:05 +0100 (CET)",
            "from dggeme756-chm.china.huawei.com (unknown [172.30.72.57])\n by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4JthrK2jjDzbkKx;\n Wed,  9 Feb 2022 09:20:01 +0800 (CST)",
            "from localhost.localdomain (10.69.192.56) by\n dggeme756-chm.china.huawei.com (10.3.19.102) with Microsoft SMTP Server\n (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id\n 15.1.2308.21; Wed, 9 Feb 2022 09:21:02 +0800"
        ],
        "From": "\"Min Hu (Connor)\" <humin29@huawei.com>",
        "To": "<dev@dpdk.org>",
        "CC": "\"Min Hu (Connor)\" <humin29@huawei.com>,\n =?utf-8?q?Morten_Br=C3=B8rup?= <mb@smartsharesystems.com>,\n Ray Kinsella <mdr@ashroe.eu>, Ajit Khaparde <ajit.khaparde@broadcom.com>,\n Thomas Monjalon <thomas@monjalon.net>, Ferruh Yigit <ferruh.yigit@intel.com>,\n Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>",
        "Subject": "[PATCH v3] ethdev: introduce dump API",
        "Date": "Wed, 9 Feb 2022 09:21:06 +0800",
        "Message-ID": "<20220209012106.23404-1-humin29@huawei.com>",
        "X-Mailer": "git-send-email 2.33.0",
        "In-Reply-To": "<20220111115437.32855-1-humin29@huawei.com>",
        "References": "<20220111115437.32855-1-humin29@huawei.com>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=\"UTF-8\"",
        "Content-Transfer-Encoding": "8bit",
        "X-Originating-IP": "[10.69.192.56]",
        "X-ClientProxiedBy": "dggems705-chm.china.huawei.com (10.3.19.182) To\n dggeme756-chm.china.huawei.com (10.3.19.102)",
        "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": "Added the ethdev dump API which provides querying private info from ethdev.\nThere exists many private properties in different PMD drivers, such as\nadapter state, Rx/Tx func algorithm in hns3 PMD. The information of these\nproperties is important for debug. As the information is private, the new\nAPI is introduced.\n\nSigned-off-by: Min Hu (Connor) <humin29@huawei.com>\nAcked-by: Morten Brørup <mb@smartsharesystems.com>\nAcked-by: Ray Kinsella <mdr@ashroe.eu>\nAcked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>\n---\nv3:\n* change 'ethdev' to 'device'\nv2:\n* fixed comments from Ferruh.\n---\n doc/guides/rel_notes/release_22_03.rst |  7 +++++++\n lib/ethdev/ethdev_driver.h             | 23 +++++++++++++++++++++++\n lib/ethdev/rte_ethdev.c                | 17 +++++++++++++++++\n lib/ethdev/rte_ethdev.h                | 20 ++++++++++++++++++++\n lib/ethdev/version.map                 |  3 +++\n 5 files changed, 70 insertions(+)",
    "diff": "diff --git a/doc/guides/rel_notes/release_22_03.rst b/doc/guides/rel_notes/release_22_03.rst\nindex b20716c521..0e3d3ae365 100644\n--- a/doc/guides/rel_notes/release_22_03.rst\n+++ b/doc/guides/rel_notes/release_22_03.rst\n@@ -64,6 +64,13 @@ New Features\n     - ``rte_ipv6_udptcp_cksum_mbuf()``\n     - ``rte_ipv6_udptcp_cksum_mbuf_verify()``\n \n+* **Added the private dump API, for query private info from device.**\n+\n+  Added the private dump API which provides querying private info from device.\n+  There exists many private properties in different PMD drivers. The\n+  information of these properties is important for debug. As the information\n+  is private, the new API is introduced.\n+\n * **Updated AF_XDP PMD**\n \n   * Added support for libxdp >=v1.2.2.\ndiff --git a/lib/ethdev/ethdev_driver.h b/lib/ethdev/ethdev_driver.h\nindex 7d27781f7d..a0bd066ab3 100644\n--- a/lib/ethdev/ethdev_driver.h\n+++ b/lib/ethdev/ethdev_driver.h\n@@ -990,6 +990,26 @@ typedef int (*eth_representor_info_get_t)(struct rte_eth_dev *dev,\n typedef int (*eth_rx_metadata_negotiate_t)(struct rte_eth_dev *dev,\n \t\t\t\t       uint64_t *features);\n \n+/**\n+ * @internal\n+ * Dump private info from device to a file.\n+ *\n+ * @param dev\n+ *   Port (ethdev) handle.\n+ * @param file\n+ *   A pointer to a file for output.\n+ *\n+ * @retval 0\n+ *   Success\n+ * @retval -EINVAL\n+ *   Invalid file\n+ * @retval -ENOTSUP\n+ *   Not supported\n+ * @retval -ENODEV\n+ *   Invalid port_id\n+ */\n+typedef int (*eth_dev_priv_dump_t)(struct rte_eth_dev *dev, FILE *file);\n+\n /**\n  * @internal A structure containing the functions exported by an Ethernet driver.\n  */\n@@ -1186,6 +1206,9 @@ struct eth_dev_ops {\n \t * kinds of metadata to the PMD\n \t */\n \teth_rx_metadata_negotiate_t rx_metadata_negotiate;\n+\n+\t/** Dump private info from device */\n+\teth_dev_priv_dump_t eth_dev_priv_dump;\n };\n \n /**\ndiff --git a/lib/ethdev/rte_ethdev.c b/lib/ethdev/rte_ethdev.c\nindex 917a320afa..5ee316a3c0 100644\n--- a/lib/ethdev/rte_ethdev.c\n+++ b/lib/ethdev/rte_ethdev.c\n@@ -6485,6 +6485,23 @@ rte_eth_rx_metadata_negotiate(uint16_t port_id, uint64_t *features)\n \t\t       (*dev->dev_ops->rx_metadata_negotiate)(dev, features));\n }\n \n+int\n+rte_eth_dev_priv_dump(uint16_t port_id, FILE *file)\n+{\n+\tstruct rte_eth_dev *dev;\n+\n+\tRTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);\n+\tdev = &rte_eth_devices[port_id];\n+\n+\tif (file == NULL) {\n+\t\tRTE_ETHDEV_LOG(ERR, \"Invalid file (NULL)\\n\");\n+\t\treturn -EINVAL;\n+\t}\n+\n+\tRTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->eth_dev_priv_dump, -ENOTSUP);\n+\treturn eth_err(port_id, (*dev->dev_ops->eth_dev_priv_dump)(dev, file));\n+}\n+\n RTE_LOG_REGISTER_DEFAULT(rte_eth_dev_logtype, INFO);\n \n RTE_INIT(ethdev_init_telemetry)\ndiff --git a/lib/ethdev/rte_ethdev.h b/lib/ethdev/rte_ethdev.h\nindex 147cc1ced3..e6ea294402 100644\n--- a/lib/ethdev/rte_ethdev.h\n+++ b/lib/ethdev/rte_ethdev.h\n@@ -5902,6 +5902,26 @@ rte_eth_tx_buffer(uint16_t port_id, uint16_t queue_id,\n \treturn rte_eth_tx_buffer_flush(port_id, queue_id, buffer);\n }\n \n+/**\n+ * @warning\n+ * @b EXPERIMENTAL: this API may change, or be removed, without prior notice\n+ *\n+ * Dump private info from device to a file. Provided data and the order depends\n+ * on the PMD.\n+ *\n+ * @param port_id\n+ *   The port identifier of the Ethernet device.\n+ * @param file\n+ *   A pointer to a file for output.\n+ * @return\n+ *   - (-ENODEV) if *port_id* is invalid.\n+ *   - (-EINVAL) if null file.\n+ *   - (-ENOTSUP) if the device does not support this function.\n+ *   - (0) on success\n+ */\n+__rte_experimental\n+int rte_eth_dev_priv_dump(uint16_t port_id, FILE *file);\n+\n #ifdef __cplusplus\n }\n #endif\ndiff --git a/lib/ethdev/version.map b/lib/ethdev/version.map\nindex 1f7359c846..376ea139aa 100644\n--- a/lib/ethdev/version.map\n+++ b/lib/ethdev/version.map\n@@ -256,6 +256,9 @@ EXPERIMENTAL {\n \trte_flow_flex_item_create;\n \trte_flow_flex_item_release;\n \trte_flow_pick_transfer_proxy;\n+\n+\t# added in 22.03\n+\trte_eth_dev_priv_dump;\n };\n \n INTERNAL {\n",
    "prefixes": [
        "v3"
    ]
}