get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 68029,
    "url": "https://patches.dpdk.org/api/patches/68029/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20200408175655.18879-1-mattias.ronnblom@ericsson.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": "<20200408175655.18879-1-mattias.ronnblom@ericsson.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20200408175655.18879-1-mattias.ronnblom@ericsson.com",
    "date": "2020-04-08T17:56:53",
    "name": "[RFC,1/3] eventdev: allow for event devices requiring maintenance",
    "commit_ref": null,
    "pull_url": null,
    "state": "rfc",
    "archived": true,
    "hash": "a71c92d3039237b00aaa107c7cbd4eb99472427e",
    "submitter": {
        "id": 1077,
        "url": "https://patches.dpdk.org/api/people/1077/?format=api",
        "name": "Mattias Rönnblom",
        "email": "mattias.ronnblom@ericsson.com"
    },
    "delegate": {
        "id": 310,
        "url": "https://patches.dpdk.org/api/users/310/?format=api",
        "username": "jerin",
        "first_name": "Jerin",
        "last_name": "Jacob",
        "email": "jerinj@marvell.com"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/20200408175655.18879-1-mattias.ronnblom@ericsson.com/mbox/",
    "series": [
        {
            "id": 9256,
            "url": "https://patches.dpdk.org/api/series/9256/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=9256",
            "date": "2020-04-08T17:56:53",
            "name": "[RFC,1/3] eventdev: allow for event devices requiring maintenance",
            "version": 1,
            "mbox": "https://patches.dpdk.org/series/9256/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/68029/comments/",
    "check": "fail",
    "checks": "https://patches.dpdk.org/api/patches/68029/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 dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 4EF02A0597;\n\tWed,  8 Apr 2020 19:57:24 +0200 (CEST)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 1A9431C1A9;\n\tWed,  8 Apr 2020 19:57:24 +0200 (CEST)",
            "from mail.lysator.liu.se (mail.lysator.liu.se [130.236.254.3])\n by dpdk.org (Postfix) with ESMTP id 7FA551C1C0\n for <dev@dpdk.org>; Wed,  8 Apr 2020 19:57:22 +0200 (CEST)",
            "from mail.lysator.liu.se (localhost [127.0.0.1])\n by mail.lysator.liu.se (Postfix) with ESMTP id 0FCED40026\n for <dev@dpdk.org>; Wed,  8 Apr 2020 19:57:22 +0200 (CEST)",
            "by mail.lysator.liu.se (Postfix, from userid 1004)\n id EFEE040022; Wed,  8 Apr 2020 19:57:21 +0200 (CEST)",
            "from isengard.friendlyfire.se\n (host-95-205-2-251.mobileonline.telia.com [95.205.2.251])\n (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))\n (No client certificate requested)\n by mail.lysator.liu.se (Postfix) with ESMTPSA id 9088740015;\n Wed,  8 Apr 2020 19:57:18 +0200 (CEST)"
        ],
        "X-Spam-Checker-Version": "SpamAssassin 3.4.2 (2018-09-13) on\n bernadotte.lysator.liu.se",
        "X-Spam-Level": "",
        "X-Spam-Status": "No, score=-0.8 required=5.0 tests=ALL_TRUSTED,AWL\n autolearn=disabled version=3.4.2",
        "X-Spam-Score": "-0.8",
        "From": "=?utf-8?q?Mattias_R=C3=B6nnblom?= <mattias.ronnblom@ericsson.com>",
        "To": "dev@dpdk.org,\n\tJerin Jacob <jerinj@marvell.com>",
        "Cc": "Gage Eads <gage.eads@intel.com>,\n Bruce Richardson <bruce.richardson@intel.com>, =?utf-8?q?Mattias_R=C3=B6nnb?=\n\t=?utf-8?q?lom?= <mattias.ronnblom@ericsson.com>",
        "Date": "Wed,  8 Apr 2020 19:56:53 +0200",
        "Message-Id": "<20200408175655.18879-1-mattias.ronnblom@ericsson.com>",
        "X-Mailer": "git-send-email 2.20.1",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=UTF-8",
        "Content-Transfer-Encoding": "8bit",
        "X-Virus-Scanned": "ClamAV using ClamSMTP",
        "Subject": "[dpdk-dev] [RFC 1/3] eventdev: allow for event devices requiring\n\tmaintenance",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "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": "Extend Eventdev API to allow for event devices which require various\nforms of internal processing to happen, even when events are not\nenqueued to or dequeued from a port.\n\nSigned-off-by: Mattias Rönnblom <mattias.ronnblom@ericsson.com>\n---\n lib/librte_eventdev/rte_eventdev.h     | 65 ++++++++++++++++++++++++++\n lib/librte_eventdev/rte_eventdev_pmd.h | 14 ++++++\n 2 files changed, 79 insertions(+)",
    "diff": "diff --git a/lib/librte_eventdev/rte_eventdev.h b/lib/librte_eventdev/rte_eventdev.h\nindex 226f352ad..d69150792 100644\n--- a/lib/librte_eventdev/rte_eventdev.h\n+++ b/lib/librte_eventdev/rte_eventdev.h\n@@ -289,6 +289,15 @@ struct rte_event;\n  * single queue to each port or map a single queue to many port.\n  */\n \n+#define RTE_EVENT_DEV_CAP_REQUIRES_MAINT (1ULL << 9)\n+/**< Event device requires calls to rte_event_maintain() during\n+ * periods when neither rte_event_dequeue_burst() nor\n+ * rte_event_enqueue_burst() are called on a port. This will allow the\n+ * event device to perform internal processing, such as flushing\n+ * buffered events, return credits to a global pool, or process\n+ * signaling related to load balancing.\n+ */\n+\n /* Event device priority levels */\n #define RTE_EVENT_DEV_PRIORITY_HIGHEST   0\n /**< Highest priority expressed across eventdev subsystem\n@@ -1226,6 +1235,9 @@ typedef uint16_t (*event_dequeue_burst_t)(void *port, struct rte_event ev[],\n \t\tuint16_t nb_events, uint64_t timeout_ticks);\n /**< @internal Dequeue burst of events from port of a device */\n \n+typedef void (*maintain_t)(void *port);\n+/**< @internal Maintains a port */\n+\n typedef uint16_t (*event_tx_adapter_enqueue)(void *port,\n \t\t\t\tstruct rte_event ev[], uint16_t nb_events);\n /**< @internal Enqueue burst of events on port of a device */\n@@ -1301,6 +1313,8 @@ struct rte_eventdev {\n \t/**< Pointer to PMD dequeue function. */\n \tevent_dequeue_burst_t dequeue_burst;\n \t/**< Pointer to PMD dequeue burst function. */\n+\tevent_maintain_t maintain;\n+\t/**< Maintains an event port. */\n \tevent_tx_adapter_enqueue_same_dest txa_enqueue_same_dest;\n \t/**< Pointer to PMD eth Tx adapter burst enqueue function with\n \t * events destined to same Eth port & Tx queue.\n@@ -1634,6 +1648,57 @@ rte_event_dequeue_burst(uint8_t dev_id, uint8_t port_id, struct rte_event ev[],\n \t\t\t\ttimeout_ticks);\n }\n \n+/**\n+ * Maintain an event device.\n+ *\n+ * This function is only relevant for event devices which has the\n+ * RTE_EVENT_DEV_CAP_REQUIRES_MAINT flag set. Such devices requires\n+ * the application to call rte_event_maintain() on a port during periods\n+ * which it is neither enqueuing nor dequeuing events from this\n+ * port. No port may be left unattended.\n+ *\n+ * An event device's rte_event_maintain() is a low overhead function. In\n+ * situations when rte_event_maintain() must be called, the application\n+ * should do so often.\n+ *\n+ * rte_event_maintain() may be called on event devices which hasn't\n+ * set RTE_EVENT_DEV_CAP_REQUIRES_MAINT flag, in which case it is a\n+ * no-operation.\n+ *\n+ * @param dev_id\n+ *   The identifier of the device.\n+ * @param port_id\n+ *   The identifier of the event port.\n+ * @return\n+ *  - 0 on success.\n+ *  - -ENOTSUP if the device doesn't have RTE_EVENT_DEV_CAP_REQUIRES_MAINT set\n+ *  - -EINVAL if *dev_id* or *port_id* is invalid\n+ *\n+ * @see RTE_EVENT_DEV_CAP_REQUIRES_MAINT\n+ */\n+static inline void\n+rte_event_maintain(uint8_t dev_id, uint8_t port_id)\n+{\n+\tstruct rte_eventdev *dev = &rte_eventdevs[dev_id];\n+\tevent_maintain_t fn;\n+\n+#ifdef RTE_LIBRTE_EVENTDEV_DEBUG\n+\tif (dev_id >= RTE_EVENT_MAX_DEVS || !rte_eventdevs[dev_id].attached) {\n+\t\trte_errno = EINVAL;\n+\t\treturn;\n+\t}\n+\n+\tif (port_id >= dev->data->nb_ports) {\n+\t\trte_errno = EINVAL;\n+\t\treturn;\n+\t}\n+#endif\n+\tfn = *dev->maintain;\n+\n+\tif (fn != NULL)\n+\t\tfn(dev->data->ports[port_id]);\n+}\n+\n /**\n  * Link multiple source event queues supplied in *queues* to the destination\n  * event port designated by its *port_id* with associated service priority\ndiff --git a/lib/librte_eventdev/rte_eventdev_pmd.h b/lib/librte_eventdev/rte_eventdev_pmd.h\nindex d118b9e5b..327e4a2ac 100644\n--- a/lib/librte_eventdev/rte_eventdev_pmd.h\n+++ b/lib/librte_eventdev/rte_eventdev_pmd.h\n@@ -364,6 +364,20 @@ typedef int (*eventdev_port_unlinks_in_progress_t)(struct rte_eventdev *dev,\n typedef int (*eventdev_dequeue_timeout_ticks_t)(struct rte_eventdev *dev,\n \t\tuint64_t ns, uint64_t *timeout_ticks);\n \n+/**\n+ * Maintains an event port for RTE_EVENT_DEV_CAP_REQUIRES_MAINT devices.\n+ *\n+ * @param dev\n+ *   Event device pointer\n+ * @param port_id\n+ *   Event port index\n+ *\n+ * @return\n+ *   Returns 0 on success.\n+ *\n+ */\n+typedef int (*eventdev_maintain_t)(struct rte_eventdev *dev, uint8_t port_id);\n+\n /**\n  * Dump internal information\n  *\n",
    "prefixes": [
        "RFC",
        "1/3"
    ]
}