get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 54255,
    "url": "http://patches.dpdk.org/api/patches/54255/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/1559583160-13944-32-git-send-email-anoobj@marvell.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": "<1559583160-13944-32-git-send-email-anoobj@marvell.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1559583160-13944-32-git-send-email-anoobj@marvell.com",
    "date": "2019-06-03T17:32:31",
    "name": "[31/39] eventdev: add routine to access event queue for eth Tx",
    "commit_ref": null,
    "pull_url": null,
    "state": "changes-requested",
    "archived": true,
    "hash": "8955f2e5b317d164169a72ee20cb7d6dda38d50e",
    "submitter": {
        "id": 1205,
        "url": "http://patches.dpdk.org/api/people/1205/?format=api",
        "name": "Anoob Joseph",
        "email": "anoobj@marvell.com"
    },
    "delegate": {
        "id": 310,
        "url": "http://patches.dpdk.org/api/users/310/?format=api",
        "username": "jerin",
        "first_name": "Jerin",
        "last_name": "Jacob",
        "email": "jerinj@marvell.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/1559583160-13944-32-git-send-email-anoobj@marvell.com/mbox/",
    "series": [
        {
            "id": 4868,
            "url": "http://patches.dpdk.org/api/series/4868/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=4868",
            "date": "2019-06-03T17:32:00",
            "name": "adding eventmode helper library",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/4868/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/54255/comments/",
    "check": "fail",
    "checks": "http://patches.dpdk.org/api/patches/54255/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 86D4C1BB2A;\n\tMon,  3 Jun 2019 19:36:37 +0200 (CEST)",
            "from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com\n\t[67.231.148.174]) by dpdk.org (Postfix) with ESMTP id 76E191BAC7\n\tfor <dev@dpdk.org>; Mon,  3 Jun 2019 19:36:35 +0200 (CEST)",
            "from pps.filterd (m0045849.ppops.net [127.0.0.1])\n\tby mx0a-0016f401.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id\n\tx53HKXvx000361; Mon, 3 Jun 2019 10:36:34 -0700",
            "from sc-exch04.marvell.com ([199.233.58.184])\n\tby mx0a-0016f401.pphosted.com with ESMTP id 2sw2wmhduf-1\n\t(version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); \n\tMon, 03 Jun 2019 10:36:34 -0700",
            "from SC-EXCH03.marvell.com (10.93.176.83) by SC-EXCH04.marvell.com\n\t(10.93.176.84) with Microsoft SMTP Server (TLS) id 15.0.1367.3;\n\tMon, 3 Jun 2019 10:36:33 -0700",
            "from maili.marvell.com (10.93.176.43) by SC-EXCH03.marvell.com\n\t(10.93.176.83) with Microsoft SMTP Server id 15.0.1367.3 via Frontend\n\tTransport; Mon, 3 Jun 2019 10:36:31 -0700",
            "from ajoseph83.caveonetworks.com.com (unknown [10.29.45.56])\n\tby maili.marvell.com (Postfix) with ESMTP id 66AAB3F703F;\n\tMon,  3 Jun 2019 10:36:26 -0700 (PDT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com;\n\th=from : to : cc :\n\tsubject : date : message-id : in-reply-to : references : mime-version\n\t: content-transfer-encoding : content-type; s=pfpt0818;\n\tbh=j3lxGIdDVDDcvxRcOGv7QnqbrhYhTE+6DLuLuWzoSXY=;\n\tb=s4dCsaqrmAXIplamlTw265Doo4qQ7ieAiMu5vJUNEAp9q7+tdJzRFl15bDeGUgKLMwra\n\tSvcvMcR/nLF67uyLJiBxn1f5fmUUSHVQCm/2+jeTd4maPF3Q0SMfndTC35tyy2jH28oC\n\t4jUuNFuAGoPb25pUXYjfymXIYqx/DrVdNrVW985MCsFE76y+FJ6LKz9dKRS9+pDJMJpv\n\tY+CIacR1JKtFNVkLJz28NPq8jT9+3rvCM8QTmRvgOe+R7N09y3k9JFf2+JppLfItlXoz\n\tzXgDkiH1iQ9FV4JIh7+ZykGAc/VMZG50zaUvsRFZNGRDLu5xhIlof69Je5iUA+AmN3BS\n\t1Q== ",
        "From": "Anoob Joseph <anoobj@marvell.com>",
        "To": "Jerin Jacob <jerinj@marvell.com>, Nikhil Rao <nikhil.rao@intel.com>,\n\t\"Erik Gabriel Carrillo\" <erik.g.carrillo@intel.com>, Abhinandan Gujjar\n\t<abhinandan.gujjar@intel.com>,\n\tBruce Richardson <bruce.richardson@intel.com>,\n\tPablo de Lara <pablo.de.lara.guarch@intel.com>",
        "CC": "Anoob Joseph <anoobj@marvell.com>, Narayana Prasad <pathreya@marvell.com>,\n\t<dev@dpdk.org>, Lukasz Bartosik <lbartosik@marvell.com>, Pavan Nikhilesh\n\t<pbhagavatula@marvell.com>, Hemant Agrawal <hemant.agrawal@nxp.com>,\n\t\"Nipun  Gupta\" <nipun.gupta@nxp.com>, Harry van Haaren\n\t<harry.van.haaren@intel.com>, =?utf-8?q?Mattias_R=C3=B6nnblom?=\n\t<mattias.ronnblom@ericsson.com>,  Liang Ma <liang.j.ma@intel.com>",
        "Date": "Mon, 3 Jun 2019 23:02:31 +0530",
        "Message-ID": "<1559583160-13944-32-git-send-email-anoobj@marvell.com>",
        "X-Mailer": "git-send-email 2.7.4",
        "In-Reply-To": "<1559583160-13944-1-git-send-email-anoobj@marvell.com>",
        "References": "<1559583160-13944-1-git-send-email-anoobj@marvell.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain",
        "X-Proofpoint-Virus-Version": "vendor=fsecure engine=2.50.10434:, ,\n\tdefinitions=2019-06-03_13:, , signatures=0",
        "Subject": "[dpdk-dev] [PATCH 31/39] eventdev: add routine to access event\n\tqueue for eth Tx",
        "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": "When the application is drafted for single stage eventmode, it will be\nefficient to have the loop in the application space, rather than passing\nit on to the helper.\n\nWhen the application's stage is in ORDERED sched mode, the application\nwill have to change the sched type of the event to ATOMIC before sending\nit, to ensure ingress ordering is maintained. Since, it is application\nwho would do the tx, this info is required in it's space.\n\nSigned-off-by: Anoob Joseph <anoobj@marvell.com>\nSigned-off-by: Lukasz Bartosik <lbartosik@marvell.com>\n---\n lib/librte_eventdev/rte_eventdev_version.map |  1 +\n lib/librte_eventdev/rte_eventmode_helper.c   | 53 ++++++++++++++++++++++++++++\n lib/librte_eventdev/rte_eventmode_helper.h   | 21 +++++++++++\n 3 files changed, 75 insertions(+)",
    "diff": "diff --git a/lib/librte_eventdev/rte_eventdev_version.map b/lib/librte_eventdev/rte_eventdev_version.map\nindex 8137cb5..3cf926a 100644\n--- a/lib/librte_eventdev/rte_eventdev_version.map\n+++ b/lib/librte_eventdev/rte_eventdev_version.map\n@@ -134,4 +134,5 @@ EXPERIMENTAL {\n \trte_eventmode_helper_initialize_devs;\n \trte_eventmode_helper_display_conf;\n \trte_eventmode_helper_get_event_lcore_links;\n+\trte_eventmode_helper_get_tx_queue;\n };\ndiff --git a/lib/librte_eventdev/rte_eventmode_helper.c b/lib/librte_eventdev/rte_eventmode_helper.c\nindex 6c853f6..e7670e0 100644\n--- a/lib/librte_eventdev/rte_eventmode_helper.c\n+++ b/lib/librte_eventdev/rte_eventmode_helper.c\n@@ -93,6 +93,24 @@ internal_get_next_active_core(struct eventmode_conf *em_conf,\n \treturn next_core;\n }\n \n+static struct eventdev_params *\n+internal_get_eventdev_params(struct eventmode_conf *em_conf,\n+\t\tuint8_t eventdev_id)\n+{\n+\tint i;\n+\n+\tfor (i = 0; i < em_conf->nb_eventdev; i++) {\n+\t\tif (em_conf->eventdev_config[i].eventdev_id == eventdev_id)\n+\t\t\tbreak;\n+\t}\n+\n+\t/* No match */\n+\tif (i == em_conf->nb_eventdev)\n+\t\treturn NULL;\n+\n+\treturn &(em_conf->eventdev_config[i]);\n+}\n+\n /* Global functions */\n \n void __rte_experimental\n@@ -927,3 +945,38 @@ rte_eventmode_helper_get_event_lcore_links(uint32_t lcore_id,\n \treturn lcore_nb_link;\n }\n \n+uint8_t __rte_experimental\n+rte_eventmode_helper_get_tx_queue(struct rte_eventmode_helper_conf *mode_conf,\n+\t\tuint8_t eventdev_id)\n+{\n+\tstruct eventdev_params *eventdev_config;\n+\tstruct eventmode_conf *em_conf;\n+\n+\tif (mode_conf == NULL) {\n+\t\tRTE_EM_HLPR_LOG_ERR(\"Invalid conf\");\n+\t\treturn (uint8_t)(-1);\n+\t}\n+\n+\tif (mode_conf->mode_params == NULL) {\n+\t\tRTE_EM_HLPR_LOG_ERR(\"Invalid mode params\");\n+\t\treturn (uint8_t)(-1);\n+\t}\n+\n+\t/* Get eventmode conf */\n+\tem_conf = (struct eventmode_conf *)(mode_conf->mode_params);\n+\n+\t/* Get event device conf */\n+\teventdev_config = internal_get_eventdev_params(em_conf, eventdev_id);\n+\n+\tif (eventdev_config == NULL) {\n+\t\tRTE_EM_HLPR_LOG_ERR(\"Error reading eventdev conf\");\n+\t\treturn (uint8_t)(-1);\n+\t}\n+\n+\t/*\n+\t * The last queue would be reserved to be used as atomic queue for the\n+\t * last stage (eth packet tx stage)\n+\t */\n+\treturn eventdev_config->nb_eventqueue - 1;\n+}\n+\ndiff --git a/lib/librte_eventdev/rte_eventmode_helper.h b/lib/librte_eventdev/rte_eventmode_helper.h\nindex 925b660..cd6d708 100644\n--- a/lib/librte_eventdev/rte_eventmode_helper.h\n+++ b/lib/librte_eventdev/rte_eventmode_helper.h\n@@ -136,6 +136,27 @@ rte_eventmode_helper_get_event_lcore_links(uint32_t lcore_id,\n \t\tstruct rte_eventmode_helper_conf *mode_conf,\n \t\tstruct rte_eventmode_helper_event_link_info **links);\n \n+/**\n+ * Get eventdev tx queue\n+ *\n+ * If the application uses event device which does not support internal port\n+ * then it needs to submit the events to an atomic Tx queue before final\n+ * transmission. The Tx queue will be atomic to make sure that ingress order of\n+ * the packets is maintained. This Tx queue will be created internally by the\n+ * eventmode helper subsystem, and application will need it's queue ID when it\n+ * is running the execution loop.\n+ *\n+ * @param mode_conf\n+ *   Configuration of the mode in which app is doing packet handling\n+ * @param eventdev_id\n+ *   Event device ID\n+ * @return\n+ *   Tx queue ID\n+ */\n+uint8_t __rte_experimental\n+rte_eventmode_helper_get_tx_queue(struct rte_eventmode_helper_conf *mode_conf,\n+\t\tuint8_t eventdev_id);\n+\n #ifdef __cplusplus\n }\n #endif\n",
    "prefixes": [
        "31/39"
    ]
}