get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 54519,
    "url": "http://patches.dpdk.org/api/patches/54519/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20190606182957.56596-3-vipin.varghese@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": "<20190606182957.56596-3-vipin.varghese@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20190606182957.56596-3-vipin.varghese@intel.com",
    "date": "2019-06-06T18:29:57",
    "name": "[v1,2/2] examples/event: add callback handle",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "444ec4462e2ca75d6fda8868b00b2201442a4679",
    "submitter": {
        "id": 882,
        "url": "http://patches.dpdk.org/api/people/882/?format=api",
        "name": "Varghese, Vipin",
        "email": "vipin.varghese@intel.com"
    },
    "delegate": null,
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20190606182957.56596-3-vipin.varghese@intel.com/mbox/",
    "series": [
        {
            "id": 4941,
            "url": "http://patches.dpdk.org/api/series/4941/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=4941",
            "date": "2019-06-06T18:29:55",
            "name": "event enqueue-dequeue callback handler",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/4941/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/54519/comments/",
    "check": "fail",
    "checks": "http://patches.dpdk.org/api/patches/54519/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@dpdk.org",
        "Delivered-To": "patchwork@dpdk.org",
        "Received": [
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id AD6BB1B99D;\n\tThu,  6 Jun 2019 20:29:34 +0200 (CEST)",
            "from mga11.intel.com (mga11.intel.com [192.55.52.93])\n\tby dpdk.org (Postfix) with ESMTP id C3E011B99C\n\tfor <dev@dpdk.org>; Thu,  6 Jun 2019 20:29:32 +0200 (CEST)",
            "from orsmga005.jf.intel.com ([10.7.209.41])\n\tby fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t06 Jun 2019 11:29:32 -0700",
            "from unknown (HELO saesrv02-S2600CWR.intel.com) ([10.224.122.203])\n\tby orsmga005.jf.intel.com with ESMTP; 06 Jun 2019 11:29:29 -0700"
        ],
        "X-Amp-Result": "SKIPPED(no attachment in message)",
        "X-Amp-File-Uploaded": "False",
        "X-ExtLoop1": "1",
        "From": "Vipin Varghese <vipin.varghese@intel.com>",
        "To": "marko.kovacevic@intel.com, john.mcnamara@intel.com, jerinj@marvell.com, \n\tharry.van.haaren@intel.com, keith.wiles@intel.com, gage.eads@intel.com, \n\tdev@dpdk.org",
        "Cc": "sanjay.padubidri@intel.com, narender.vangati@intel.com,\n\tilia.kurakin@intel.com, Vipin Varghese <vipin.varghese@intel.com>",
        "Date": "Thu,  6 Jun 2019 23:59:57 +0530",
        "Message-Id": "<20190606182957.56596-3-vipin.varghese@intel.com>",
        "X-Mailer": "git-send-email 2.17.1",
        "In-Reply-To": "<20190606182957.56596-1-vipin.varghese@intel.com>",
        "References": "<20190606182957.56596-1-vipin.varghese@intel.com>",
        "Subject": "[dpdk-dev] [PATCH v1 2/2] examples/event: add callback handle",
        "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\t<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\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "To add register and unregister for event pre-enqueue and\npost-dequeue callback handler.\n\nSigned-off-by: Vipin Varghese <vipin.varghese@intel.com>\n---\n examples/eventdev_pipeline/main.c | 49 +++++++++++++++++++++++++++++++\n 1 file changed, 49 insertions(+)",
    "diff": "diff --git a/examples/eventdev_pipeline/main.c b/examples/eventdev_pipeline/main.c\nindex f4e57f541..469951463 100644\n--- a/examples/eventdev_pipeline/main.c\n+++ b/examples/eventdev_pipeline/main.c\n@@ -20,6 +20,37 @@ struct config_data cdata = {\n \t.worker_cq_depth = 16\n };\n \n+#ifdef RTE_EVENTDEV_ENQDEQ_CALLBACKS\n+uint16_t\n+dump_flowid_events(uint8_t dev_id, uint8_t port_id,\n+\t\t__rte_unused struct rte_event *ev,\n+\t\t__rte_unused uint16_t nb_events,\n+\t\t__rte_unused void *cb_arg);\n+\n+uint16_t\n+dump_flowid_events(uint8_t dev_id, uint8_t port_id,\n+\t\t__rte_unused struct rte_event *ev,\n+\t\t__rte_unused uint16_t nb_events,\n+\t\t__rte_unused void *cb_arg)\n+{\n+\tif (unlikely(nb_events == 0))\n+\t\treturn 0;\n+\n+\tfor (int i = 0; i < nb_events; i++)\n+\t\tprintf(\" dev_id (%u) port_id (%u)\\n \"\n+\t\t\t\t\"- ev(%p) nb_events (%u)\\n\"\n+\t\t\t\t\"- flow_id (%u)\\n\"\n+\t\t\t\t\"- sub_event_type (%u) event_type (%u)\\n\",\n+\t\t\t\tdev_id, port_id,\n+\t\t\t\tev, nb_events,\n+\t\t\t\tev[i].flow_id,\n+\t\t\t\tev[i].sub_event_type,\n+\t\t\t\tev[i].event_type);\n+\n+\treturn nb_events;\n+}\n+#endif\n+\n static bool\n core_in_use(unsigned int lcore_id) {\n \treturn (fdata->rx_core[lcore_id] || fdata->sched_core[lcore_id] ||\n@@ -398,6 +429,14 @@ signal_handler(int signum)\n \tif ((signum == SIGINT || signum == SIGTERM) && !once) {\n \t\tprintf(\"\\n\\nSignal %d received, preparing to exit...\\n\",\n \t\t\t\tsignum);\n+\n+#ifdef RTE_EVENTDEV_ENQDEQ_CALLBACKS\n+\t\trte_eventdev_preenq_callback_unregister(0, 0,\n+\t\t\t\tdump_flowid_events, NULL);\n+\t\trte_eventdev_pstdeq_callback_unregister(0, 0,\n+\t\t\t\tdump_flowid_events, NULL);\n+#endif\n+\n \t\tif (cdata.dump_dev)\n \t\t\trte_event_dev_dump(0, stdout);\n \t\tonce = 1;\n@@ -559,6 +598,16 @@ main(int argc, char **argv)\n \tif (core_in_use(lcore_id))\n \t\tfdata->cap.worker(&worker_data[worker_idx++]);\n \n+#ifdef RTE_EVENTDEV_ENQDEQ_CALLBACKS\n+\tif (rte_eventdev_preenq_callback_register(0, 0,\n+\t\t\tdump_flowid_events, NULL))\n+\t\tprintf(\" Failed to register enq callback\\n\");\n+\n+\tif (rte_eventdev_pstdeq_callback_register(0, 0,\n+\t\t\tdump_flowid_events, NULL))\n+\t\tprintf(\" Failed to register deq callback\\n\");\n+#endif\n+\n \trte_eal_mp_wait_lcore();\n \n \tif (!cdata.quiet && (port_stat(dev_id, worker_data[0].port_id) !=\n",
    "prefixes": [
        "v1",
        "2/2"
    ]
}