get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 99149,
    "url": "http://patchwork.dpdk.org/api/patches/99149/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20210917133056.90326-2-bruce.richardson@intel.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": "<20210917133056.90326-2-bruce.richardson@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20210917133056.90326-2-bruce.richardson@intel.com",
    "date": "2021-09-17T13:30:48",
    "name": "[v4,1/9] dmadev: add channel status check for testing use",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "ef313100f8a5f0364e4995cb9031eea90e9c9dc7",
    "submitter": {
        "id": 20,
        "url": "http://patchwork.dpdk.org/api/people/20/?format=api",
        "name": "Bruce Richardson",
        "email": "bruce.richardson@intel.com"
    },
    "delegate": {
        "id": 1,
        "url": "http://patchwork.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/20210917133056.90326-2-bruce.richardson@intel.com/mbox/",
    "series": [
        {
            "id": 19016,
            "url": "http://patchwork.dpdk.org/api/series/19016/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=19016",
            "date": "2021-09-17T13:30:47",
            "name": "add test suite for DMA drivers",
            "version": 4,
            "mbox": "http://patchwork.dpdk.org/series/19016/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/99149/comments/",
    "check": "success",
    "checks": "http://patchwork.dpdk.org/api/patches/99149/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 94416A0C46;\n\tFri, 17 Sep 2021 15:31:12 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 44CA1410E9;\n\tFri, 17 Sep 2021 15:31:11 +0200 (CEST)",
            "from mga06.intel.com (mga06.intel.com [134.134.136.31])\n by mails.dpdk.org (Postfix) with ESMTP id DA85B410E9\n for <dev@dpdk.org>; Fri, 17 Sep 2021 15:31:08 +0200 (CEST)",
            "from fmsmga005.fm.intel.com ([10.253.24.32])\n by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 17 Sep 2021 06:31:08 -0700",
            "from silpixa00399126.ir.intel.com ([10.237.223.29])\n by fmsmga005.fm.intel.com with ESMTP; 17 Sep 2021 06:31:06 -0700"
        ],
        "X-IronPort-AV": [
            "E=McAfee;i=\"6200,9189,10109\"; a=\"283805288\"",
            "E=Sophos;i=\"5.85,301,1624345200\"; d=\"scan'208\";a=\"283805288\"",
            "E=Sophos;i=\"5.85,301,1624345200\"; d=\"scan'208\";a=\"701256263\""
        ],
        "X-ExtLoop1": "1",
        "From": "Bruce Richardson <bruce.richardson@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "conor.walsh@intel.com, kevin.laatz@intel.com, fengchengwen@huawei.com,\n jerinj@marvell.com, Bruce Richardson <bruce.richardson@intel.com>",
        "Date": "Fri, 17 Sep 2021 14:30:48 +0100",
        "Message-Id": "<20210917133056.90326-2-bruce.richardson@intel.com>",
        "X-Mailer": "git-send-email 2.30.2",
        "In-Reply-To": "<20210917133056.90326-1-bruce.richardson@intel.com>",
        "References": "<20210826183301.333442-1-bruce.richardson@intel.com>\n <20210917133056.90326-1-bruce.richardson@intel.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[dpdk-dev] [PATCH v4 1/9] dmadev: add channel status check for\n testing use",
        "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": "Add in a function to check if a device or vchan has completed all jobs\nassigned to it, without gathering in the results. This is primarily for\nuse in testing, to allow the hardware to be in a known-state prior to\ngathering completions.\n\nSigned-off-by: Bruce Richardson <bruce.richardson@intel.com>\n---\n lib/dmadev/rte_dmadev.c      | 15 +++++++++++++++\n lib/dmadev/rte_dmadev.h      | 33 +++++++++++++++++++++++++++++++++\n lib/dmadev/rte_dmadev_core.h |  6 ++++++\n lib/dmadev/version.map       |  1 +\n 4 files changed, 55 insertions(+)",
    "diff": "diff --git a/lib/dmadev/rte_dmadev.c b/lib/dmadev/rte_dmadev.c\nindex 544937acf8..859958fff8 100644\n--- a/lib/dmadev/rte_dmadev.c\n+++ b/lib/dmadev/rte_dmadev.c\n@@ -716,3 +716,18 @@ rte_dma_dump(int16_t dev_id, FILE *f)\n \n \treturn 0;\n }\n+\n+int\n+rte_dma_vchan_status(uint16_t dev_id, uint16_t vchan, enum rte_dma_vchan_status *status)\n+{\n+\tstruct rte_dma_dev *dev = &rte_dma_devices[dev_id];\n+\n+\tRTE_DMA_VALID_DEV_ID_OR_ERR_RET(dev_id, -EINVAL);\n+\tif (vchan >= dev->data->dev_conf.nb_vchans) {\n+\t\tRTE_DMA_LOG(ERR, \"Device %u vchan %u out of range\\n\", dev_id, vchan);\n+\t\treturn -EINVAL;\n+\t}\n+\n+\tRTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->vchan_status, -ENOTSUP);\n+\treturn (*dev->dev_ops->vchan_status)(dev, vchan, status);\n+}\ndiff --git a/lib/dmadev/rte_dmadev.h b/lib/dmadev/rte_dmadev.h\nindex be54f2cb9d..86c4a38f83 100644\n--- a/lib/dmadev/rte_dmadev.h\n+++ b/lib/dmadev/rte_dmadev.h\n@@ -660,6 +660,39 @@ int rte_dma_stats_get(int16_t dev_id, uint16_t vchan,\n __rte_experimental\n int rte_dma_stats_reset(int16_t dev_id, uint16_t vchan);\n \n+/**\n+ * device vchannel status\n+ *\n+ * Enum with the options for the channel status, either idle, active or halted due to error\n+ */\n+enum rte_dma_vchan_status {\n+\tRTE_DMA_VCHAN_IDLE,          /**< not processing, awaiting ops */\n+\tRTE_DMA_VCHAN_ACTIVE,        /**< currently processing jobs */\n+\tRTE_DMA_VCHAN_HALTED_ERROR,  /**< not processing due to error, cannot accept new ops */\n+};\n+\n+/**\n+ * @warning\n+ * @b EXPERIMENTAL: this API may change without prior notice.\n+ *\n+ * Determine if all jobs have completed on a device channel.\n+ * This function is primarily designed for testing use, as it allows a process to check if\n+ * all jobs are completed, without actually gathering completions from those jobs.\n+ *\n+ * @param dev_id\n+ *   The identifier of the device.\n+ * @param vchan\n+ *   The identifier of virtual DMA channel.\n+ * @param[out] status\n+ *   The vchan status\n+ * @return\n+ *   0 - call completed successfully\n+ *   < 0 - error code indicating there was a problem calling the API\n+ */\n+__rte_experimental\n+int\n+rte_dma_vchan_status(uint16_t dev_id, uint16_t vchan, enum rte_dma_vchan_status *status);\n+\n /**\n  * @warning\n  * @b EXPERIMENTAL: this API may change without prior notice.\ndiff --git a/lib/dmadev/rte_dmadev_core.h b/lib/dmadev/rte_dmadev_core.h\nindex edb3286cbb..0eec1aa43b 100644\n--- a/lib/dmadev/rte_dmadev_core.h\n+++ b/lib/dmadev/rte_dmadev_core.h\n@@ -46,6 +46,10 @@ typedef int (*rte_dma_vchan_setup_t)(struct rte_dma_dev *dev, uint16_t vchan,\n \t\t\t\tconst struct rte_dma_vchan_conf *conf,\n \t\t\t\tuint32_t conf_sz);\n \n+/** @internal Used to check if a virtual channel has finished all jobs. */\n+typedef int (*rte_dma_vchan_status_t)(const struct rte_dma_dev *dev, uint16_t vchan,\n+\t\tenum rte_dma_vchan_status *status);\n+\n /** @internal Used to retrieve basic statistics. */\n typedef int (*rte_dma_stats_get_t)(const struct rte_dma_dev *dev,\n \t\t\tuint16_t vchan, struct rte_dma_stats *stats,\n@@ -119,6 +123,8 @@ struct rte_dma_dev_ops {\n \trte_dma_stats_reset_t    stats_reset;\n \n \trte_dma_dump_t           dev_dump;\n+\trte_dma_vchan_status_t   vchan_status;\n+\n };\n \n /**\ndiff --git a/lib/dmadev/version.map b/lib/dmadev/version.map\nindex c780463bb2..40ea517016 100644\n--- a/lib/dmadev/version.map\n+++ b/lib/dmadev/version.map\n@@ -20,6 +20,7 @@ EXPERIMENTAL {\n \trte_dma_stop;\n \trte_dma_submit;\n \trte_dma_vchan_setup;\n+\trte_dma_vchan_status;\n \n \tlocal: *;\n };\n",
    "prefixes": [
        "v4",
        "1/9"
    ]
}