get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 98214,
    "url": "http://patches.dpdk.org/api/patches/98214/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20210907164925.291904-3-bruce.richardson@intel.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": "<20210907164925.291904-3-bruce.richardson@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20210907164925.291904-3-bruce.richardson@intel.com",
    "date": "2021-09-07T16:49:19",
    "name": "[v3,2/8] dmadev: add burst capacity API",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "3a76020dc16974b1efba2fd0129aebd251d1f64e",
    "submitter": {
        "id": 20,
        "url": "http://patches.dpdk.org/api/people/20/?format=api",
        "name": "Bruce Richardson",
        "email": "bruce.richardson@intel.com"
    },
    "delegate": {
        "id": 1,
        "url": "http://patches.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20210907164925.291904-3-bruce.richardson@intel.com/mbox/",
    "series": [
        {
            "id": 18744,
            "url": "http://patches.dpdk.org/api/series/18744/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=18744",
            "date": "2021-09-07T16:49:24",
            "name": "add test suite for DMA drivers",
            "version": 3,
            "mbox": "http://patches.dpdk.org/series/18744/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/98214/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/98214/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 988B8A0C47;\n\tTue,  7 Sep 2021 18:55:27 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 03C4A411BD;\n\tTue,  7 Sep 2021 18:55:16 +0200 (CEST)",
            "from mga03.intel.com (mga03.intel.com [134.134.136.65])\n by mails.dpdk.org (Postfix) with ESMTP id D2CEE411CB\n for <dev@dpdk.org>; Tue,  7 Sep 2021 18:55:13 +0200 (CEST)",
            "from orsmga007.jf.intel.com ([10.7.209.58])\n by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 07 Sep 2021 09:49:44 -0700",
            "from silpixa00399126.ir.intel.com ([10.237.223.29])\n by orsmga007.jf.intel.com with ESMTP; 07 Sep 2021 09:49:42 -0700"
        ],
        "X-IronPort-AV": [
            "E=McAfee;i=\"6200,9189,10099\"; a=\"220311377\"",
            "E=Sophos;i=\"5.85,274,1624345200\"; d=\"scan'208\";a=\"220311377\"",
            "E=Sophos;i=\"5.85,274,1624345200\"; d=\"scan'208\";a=\"469268713\""
        ],
        "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": "Tue,  7 Sep 2021 17:49:19 +0100",
        "Message-Id": "<20210907164925.291904-3-bruce.richardson@intel.com>",
        "X-Mailer": "git-send-email 2.30.2",
        "In-Reply-To": "<20210907164925.291904-1-bruce.richardson@intel.com>",
        "References": "<20210826183301.333442-1-bruce.richardson@intel.com>\n <20210907164925.291904-1-bruce.richardson@intel.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[dpdk-dev] [PATCH v3 2/8] 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>\n---\n lib/dmadev/rte_dmadev.c      | 11 +++++++++++\n lib/dmadev/rte_dmadev.h      | 19 +++++++++++++++++++\n lib/dmadev/rte_dmadev_core.h |  5 +++++\n lib/dmadev/version.map       |  1 +\n 4 files changed, 36 insertions(+)",
    "diff": "diff --git a/lib/dmadev/rte_dmadev.c b/lib/dmadev/rte_dmadev.c\nindex ab45928efb..6494871f05 100644\n--- a/lib/dmadev/rte_dmadev.c\n+++ b/lib/dmadev/rte_dmadev.c\n@@ -573,6 +573,17 @@ dmadev_dump_capability(FILE *f, uint64_t dev_capa)\n \tfprintf(f, \"\\n\");\n }\n \n+int\n+rte_dmadev_burst_capacity(uint16_t dev_id, uint16_t vchan)\n+{\n+\tconst struct rte_dmadev *dev = &rte_dmadevices[dev_id];\n+\n+\tRTE_DMADEV_VALID_DEV_ID_OR_ERR_RET(dev_id, -EINVAL);\n+\n+\tRTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->burst_capacity, -ENOTSUP);\n+\treturn (*dev->dev_ops->burst_capacity)(dev, vchan);\n+}\n+\n int\n rte_dmadev_dump(uint16_t dev_id, FILE *f)\n {\ndiff --git a/lib/dmadev/rte_dmadev.h b/lib/dmadev/rte_dmadev.h\nindex 39d73872c8..8b84914810 100644\n--- a/lib/dmadev/rte_dmadev.h\n+++ b/lib/dmadev/rte_dmadev.h\n@@ -673,6 +673,25 @@ __rte_experimental\n int\n rte_dmadev_vchan_status(uint16_t dev_id, uint16_t vchan, enum rte_dmadev_vchan_status *status);\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 on success.\n+ *   - -ENOTSUP: if not supported by the device.\n+ */\n+__rte_experimental\n+int\n+rte_dmadev_burst_capacity(uint16_t dev_id, uint16_t vchan);\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 3c9d698044..2756936798 100644\n--- a/lib/dmadev/rte_dmadev_core.h\n+++ b/lib/dmadev/rte_dmadev_core.h\n@@ -52,6 +52,10 @@ typedef int (*rte_dmadev_stats_get_t)(const struct rte_dmadev *dev,\n typedef int (*rte_dmadev_stats_reset_t)(struct rte_dmadev *dev, uint16_t vchan);\n /**< @internal Used to reset basic statistics. */\n \n+typedef uint16_t (*rte_dmadev_burst_capacity_t)(const struct rte_dmadev *dev,\n+\t\t\tuint16_t vchan);\n+/** < @internal Used to check the remaining space in descriptor ring. */\n+\n typedef int (*rte_dmadev_dump_t)(const struct rte_dmadev *dev, FILE *f);\n /**< @internal Used to dump internal information. */\n \n@@ -114,6 +118,7 @@ struct rte_dmadev_ops {\n \trte_dmadev_stats_get_t      stats_get;\n \trte_dmadev_stats_reset_t    stats_reset;\n \n+\trte_dmadev_burst_capacity_t burst_capacity;\n \trte_dmadev_vchan_status_t   vchan_status;\n \n \trte_dmadev_dump_t           dev_dump;\ndiff --git a/lib/dmadev/version.map b/lib/dmadev/version.map\nindex 10eeb0f7a3..56cb279e8f 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_dmadev_burst_capacity;\n \trte_dmadev_close;\n \trte_dmadev_completed;\n \trte_dmadev_completed_status;\n",
    "prefixes": [
        "v3",
        "2/8"
    ]
}