get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 101359,
    "url": "http://patchwork.dpdk.org/api/patches/101359/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20211013151736.762378-4-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": "<20211013151736.762378-4-bruce.richardson@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20211013151736.762378-4-bruce.richardson@intel.com",
    "date": "2021-10-13T15:17:26",
    "name": "[v7,03/13] dmadev: add burst capacity API",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "629ec72930dc55e4d1c01900170ea8af9d0d69bb",
    "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/20211013151736.762378-4-bruce.richardson@intel.com/mbox/",
    "series": [
        {
            "id": 19599,
            "url": "http://patchwork.dpdk.org/api/series/19599/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=19599",
            "date": "2021-10-13T15:17:23",
            "name": "add test suite for DMA drivers",
            "version": 7,
            "mbox": "http://patchwork.dpdk.org/series/19599/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/101359/comments/",
    "check": "success",
    "checks": "http://patchwork.dpdk.org/api/patches/101359/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 49CE8A0C55;\n\tWed, 13 Oct 2021 17:18:20 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id CDFD4411FA;\n\tWed, 13 Oct 2021 17:18:06 +0200 (CEST)",
            "from mga07.intel.com (mga07.intel.com [134.134.136.100])\n by mails.dpdk.org (Postfix) with ESMTP id A5B14411EC\n for <dev@dpdk.org>; Wed, 13 Oct 2021 17:18:02 +0200 (CEST)",
            "from orsmga006.jf.intel.com ([10.7.209.51])\n by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 13 Oct 2021 08:17:55 -0700",
            "from silpixa00399126.ir.intel.com ([10.237.223.151])\n by orsmga006.jf.intel.com with ESMTP; 13 Oct 2021 08:17:53 -0700"
        ],
        "X-IronPort-AV": [
            "E=McAfee;i=\"6200,9189,10136\"; a=\"290944063\"",
            "E=Sophos;i=\"5.85,371,1624345200\"; d=\"scan'208\";a=\"290944063\"",
            "E=Sophos;i=\"5.85,371,1624345200\"; d=\"scan'208\";a=\"441682052\""
        ],
        "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",
        "Date": "Wed, 13 Oct 2021 16:17:26 +0100",
        "Message-Id": "<20211013151736.762378-4-bruce.richardson@intel.com>",
        "X-Mailer": "git-send-email 2.30.2",
        "In-Reply-To": "<20211013151736.762378-1-bruce.richardson@intel.com>",
        "References": "<20210924102942.2878051-1-bruce.richardson@intel.com>\n <20211013151736.762378-1-bruce.richardson@intel.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[dpdk-dev] [PATCH v7 03/13] dmadev: add burst capacity API",
        "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": "From: Kevin Laatz <kevin.laatz@intel.com>\n\nAdd a burst capacity check API to the dmadev library. This API is useful to\napplications which need to how many descriptors can be enqueued in the\ncurrent batch. For example, it could be used to determine whether all\nsegments of a multi-segment packet can be enqueued in the same batch or not\n(to avoid half-offload of the packet).\n\nSigned-off-by: Kevin Laatz <kevin.laatz@intel.com>\nReviewed-by: Conor Walsh <conor.walsh@intel.com>\n---\n lib/dmadev/rte_dmadev.c      |  9 +++++++++\n lib/dmadev/rte_dmadev.h      | 29 +++++++++++++++++++++++++++++\n lib/dmadev/rte_dmadev_core.h |  4 ++++\n lib/dmadev/version.map       |  1 +\n 4 files changed, 43 insertions(+)",
    "diff": "diff --git a/lib/dmadev/rte_dmadev.c b/lib/dmadev/rte_dmadev.c\nindex 3f9154e619..c737cc6cdc 100644\n--- a/lib/dmadev/rte_dmadev.c\n+++ b/lib/dmadev/rte_dmadev.c\n@@ -830,6 +830,14 @@ dummy_completed_status(__rte_unused void *dev_private,\n \treturn 0;\n }\n \n+static uint16_t\n+dummy_burst_capacity(__rte_unused const void *dev_private,\n+\t\t     __rte_unused uint16_t vchan)\n+{\n+\tRTE_DMA_LOG(ERR, \"burst_capacity is not configured or not supported.\");\n+\treturn 0;\n+}\n+\n static void\n dma_fp_object_dummy(struct rte_dma_fp_object *obj)\n {\n@@ -840,4 +848,5 @@ dma_fp_object_dummy(struct rte_dma_fp_object *obj)\n \tobj->submit           = dummy_submit;\n \tobj->completed        = dummy_completed;\n \tobj->completed_status = dummy_completed_status;\n+\tobj->burst_capacity   = dummy_burst_capacity;\n }\ndiff --git a/lib/dmadev/rte_dmadev.h b/lib/dmadev/rte_dmadev.h\nindex e35aca7d1c..a0824be20d 100644\n--- a/lib/dmadev/rte_dmadev.h\n+++ b/lib/dmadev/rte_dmadev.h\n@@ -1076,6 +1076,35 @@ rte_dma_completed_status(int16_t dev_id, uint16_t vchan,\n \t\t\t\t\tlast_idx, status);\n }\n \n+/**\n+ * @warning\n+ * @b EXPERIMENTAL: this API may change without prior notice.\n+ *\n+ * Check remaining capacity in descriptor ring for the current burst.\n+ *\n+ * @param dev_id\n+ *   The identifier of the device.\n+ * @param vchan\n+ *   The identifier of virtual DMA channel.\n+ *\n+ * @return\n+ *   - Remaining space in the descriptor ring for the current burst.\n+ *   - 0 on error\n+ */\n+__rte_experimental\n+static inline uint16_t\n+rte_dma_burst_capacity(int16_t dev_id, uint16_t vchan)\n+{\n+\tstruct rte_dma_fp_object *obj = &rte_dma_fp_objs[dev_id];\n+\n+#ifdef RTE_DMADEV_DEBUG\n+\tif (!rte_dma_is_valid(dev_id))\n+\t\treturn 0;\n+\tRTE_FUNC_PTR_OR_ERR_RET(*obbj->burst_capacity, 0);\n+#endif\n+\treturn (*obj->burst_capacity)(obj->dev_private, vchan);\n+}\n+\n #ifdef __cplusplus\n }\n #endif\ndiff --git a/lib/dmadev/rte_dmadev_core.h b/lib/dmadev/rte_dmadev_core.h\nindex 236d9d38e5..e42d8739ab 100644\n--- a/lib/dmadev/rte_dmadev_core.h\n+++ b/lib/dmadev/rte_dmadev_core.h\n@@ -47,6 +47,9 @@ typedef uint16_t (*rte_dma_completed_status_t)(void *dev_private,\n \t\t\tuint16_t vchan, const uint16_t nb_cpls,\n \t\t\tuint16_t *last_idx, enum rte_dma_status_code *status);\n \n+/** @internal Used to check the remaining space in descriptor ring. */\n+typedef uint16_t (*rte_dma_burst_capacity_t)(const void *dev_private, uint16_t vchan);\n+\n /**\n  * @internal\n  * Fast-path dmadev functions and related data are hold in a flat array.\n@@ -69,6 +72,7 @@ struct rte_dma_fp_object {\n \trte_dma_submit_t           submit;\n \trte_dma_completed_t        completed;\n \trte_dma_completed_status_t completed_status;\n+\trte_dma_burst_capacity_t   burst_capacity;\n } __rte_aligned(128);\n \n extern struct rte_dma_fp_object *rte_dma_fp_objs;\ndiff --git a/lib/dmadev/version.map b/lib/dmadev/version.map\nindex 8785e14648..4bbfdd52f6 100644\n--- a/lib/dmadev/version.map\n+++ b/lib/dmadev/version.map\n@@ -1,6 +1,7 @@\n EXPERIMENTAL {\n \tglobal:\n \n+\trte_dma_burst_capacity;\n \trte_dma_close;\n \trte_dma_completed;\n \trte_dma_completed_status;\n",
    "prefixes": [
        "v7",
        "03/13"
    ]
}