get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 95424,
    "url": "https://patches.dpdk.org/api/patches/95424/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20210706202841.661302-4-bruce.richardson@intel.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": "<20210706202841.661302-4-bruce.richardson@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20210706202841.661302-4-bruce.richardson@intel.com",
    "date": "2021-07-06T20:28:35",
    "name": "[RFC,UPDATE,3/9] dmadev: add dump function",
    "commit_ref": null,
    "pull_url": null,
    "state": "rfc",
    "archived": true,
    "hash": "ee75b3ceefd2a720e26e849cf79953dcab6786b6",
    "submitter": {
        "id": 20,
        "url": "https://patches.dpdk.org/api/people/20/?format=api",
        "name": "Bruce Richardson",
        "email": "bruce.richardson@intel.com"
    },
    "delegate": null,
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/20210706202841.661302-4-bruce.richardson@intel.com/mbox/",
    "series": [
        {
            "id": 17674,
            "url": "https://patches.dpdk.org/api/series/17674/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=17674",
            "date": "2021-07-06T20:28:32",
            "name": "dmadev rfc suggested updates",
            "version": 1,
            "mbox": "https://patches.dpdk.org/series/17674/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/95424/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/95424/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 B54FDA0C48;\n\tTue,  6 Jul 2021 22:29:20 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 5D79E413C1;\n\tTue,  6 Jul 2021 22:29:13 +0200 (CEST)",
            "from mga18.intel.com (mga18.intel.com [134.134.136.126])\n by mails.dpdk.org (Postfix) with ESMTP id B2B474132E\n for <dev@dpdk.org>; Tue,  6 Jul 2021 22:29:10 +0200 (CEST)",
            "from fmsmga003.fm.intel.com ([10.253.24.29])\n by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 06 Jul 2021 13:29:09 -0700",
            "from silpixa00399126.ir.intel.com ([10.237.223.29])\n by FMSMGA003.fm.intel.com with ESMTP; 06 Jul 2021 13:29:07 -0700"
        ],
        "X-IronPort-AV": [
            "E=McAfee;i=\"6200,9189,10037\"; a=\"196470321\"",
            "E=Sophos;i=\"5.83,329,1616482800\"; d=\"scan'208\";a=\"196470321\"",
            "E=Sophos;i=\"5.83,329,1616482800\"; d=\"scan'208\";a=\"486522068\""
        ],
        "X-ExtLoop1": "1",
        "From": "Bruce Richardson <bruce.richardson@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "Chengwen Feng <fengchengwen@huawei.com>,\n Jerin Jacob <jerinjacobk@gmail.com>, Jerin Jacob <jerinj@marvell.com>,\n\t=?utf-8?q?Morten_Br=C3=B8rup?= <mb@smartsharesystems.com>,\n Bruce Richardson <bruce.richardson@intel.com>",
        "Date": "Tue,  6 Jul 2021 21:28:35 +0100",
        "Message-Id": "<20210706202841.661302-4-bruce.richardson@intel.com>",
        "X-Mailer": "git-send-email 2.30.2",
        "In-Reply-To": "<20210706202841.661302-1-bruce.richardson@intel.com>",
        "References": "<1625231891-2963-1-git-send-email-fengchengwen@huawei.com>\n <20210706202841.661302-1-bruce.richardson@intel.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[dpdk-dev] [RFC UPDATE PATCH 3/9] dmadev: add dump function",
        "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",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "a dump() function to print the state of a device to a file (e.g. sterr\nor stdout) is very useful for debugging drivers.\n\nSigned-off-by: Bruce Richardson <bruce.richardson@intel.com>\n---\n lib/dmadev/rte_dmadev.c     | 17 +++++++++++++++++\n lib/dmadev/rte_dmadev.h     | 19 +++++++++++++++++++\n lib/dmadev/rte_dmadev_pmd.h |  5 +++++\n lib/dmadev/version.map      |  1 +\n 4 files changed, 42 insertions(+)",
    "diff": "diff --git a/lib/dmadev/rte_dmadev.c b/lib/dmadev/rte_dmadev.c\nindex 855f4d272..ffd7c5b97 100644\n--- a/lib/dmadev/rte_dmadev.c\n+++ b/lib/dmadev/rte_dmadev.c\n@@ -345,6 +345,23 @@ rte_dmadev_xstats_reset(uint16_t dev_id, const uint32_t ids[], uint32_t nb_ids)\n \treturn (*dev->dev_ops->xstats_reset)(dev, ids, nb_ids);\n }\n \n+int\n+rte_dmadev_dump(uint16_t dev_id, FILE *f)\n+{\n+\tstruct rte_dmadev *dev = &rte_dmadevices[dev_id];\n+\n+\tRTE_DMADEV_VALID_DEVID_OR_ERR_RET(dev_id, -EINVAL);\n+\n+\tfprintf(f, \"DMA Dev %u, '%s' [%s]\\n\", dev->dev_id, dev->name,\n+\t\t\tdev->started ? \"started\" : \"stopped\");\n+\tfprintf(f, \"  Driver: %s\\n\", dev->driver_name);\n+\tfprintf(f, \"  Socket Id: %d\\n\", dev->socket_id);\n+\n+\tif (dev->dev_ops->dump != NULL)\n+\t\treturn (*dev->dev_ops->dump)(dev, f);\n+\treturn 0;\n+}\n+\n int\n rte_dmadev_selftest(uint16_t dev_id)\n {\ndiff --git a/lib/dmadev/rte_dmadev.h b/lib/dmadev/rte_dmadev.h\nindex 1659ceaf2..d64df17bd 100644\n--- a/lib/dmadev/rte_dmadev.h\n+++ b/lib/dmadev/rte_dmadev.h\n@@ -357,6 +357,25 @@ __rte_experimental\n int\n rte_dmadev_close(uint16_t dev_id);\n \n+/**\n+ * @warning\n+ * @b EXPERIMENTAL: this API may change without prior notice.\n+ *\n+ * Dump DMA device info.\n+ *\n+ * @param dev_id\n+ *   The identifier of the device.\n+ *\n+ * @param f\n+ *   The file to write the output to.\n+ *\n+ * @return\n+ *   0 on success. Non-zero otherwise.\n+ */\n+__rte_experimental\n+int\n+rte_dmadev_dump(uint16_t dev_id, FILE *f);\n+\n /**\n  * @warning\n  * @b EXPERIMENTAL: this API may change without prior notice.\ndiff --git a/lib/dmadev/rte_dmadev_pmd.h b/lib/dmadev/rte_dmadev_pmd.h\nindex ef03cf7cd..428ddc943 100644\n--- a/lib/dmadev/rte_dmadev_pmd.h\n+++ b/lib/dmadev/rte_dmadev_pmd.h\n@@ -99,6 +99,9 @@ typedef int (*dmadev_close_t)(struct rte_dmadev *dev);\n typedef int (*dmadev_reset_t)(struct rte_dmadev *dev);\n /**< @internal Function used to reset a configured device. */\n \n+typedef int (*dmadev_dump_t)(struct rte_dmadev *dev, FILE *f);\n+/**< @internal Function used to dump out the state of a device for debugging. */\n+\n typedef int (*dmadev_queue_setup_t)(struct rte_dmadev *dev,\n \t\t\t\t    const struct rte_dmadev_queue_conf *conf);\n /**< @internal Function used to allocate and set up a virt queue. */\n@@ -147,6 +150,8 @@ struct rte_dmadev_ops {\n \tdmadev_close_t dev_close;\n \t/**< Reset device. */\n \tdmadev_reset_t dev_reset;\n+\t/**< Dump device info for debugging */\n+\tdmadev_dump_t dump;\n \n \t/**< Allocate and set up a virt queue. */\n \tdmadev_queue_setup_t queue_setup;\ndiff --git a/lib/dmadev/version.map b/lib/dmadev/version.map\nindex a0a121f3a..ed051d54f 100644\n--- a/lib/dmadev/version.map\n+++ b/lib/dmadev/version.map\n@@ -4,6 +4,7 @@ EXPERIMENTAL {\n \trte_dmadevices;\n \trte_dmadev_pmd_allocate;\n \trte_dmadev_count;\n+\trte_dmadev_dump;\n \trte_dmadev_get_dev_id;\n \trte_dmadev_socket_id;\n \trte_dmadev_info_get;\n",
    "prefixes": [
        "RFC",
        "UPDATE",
        "3/9"
    ]
}