get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 54219,
    "url": "https://patches.dpdk.org/api/patches/54219/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/1559580584-5728-38-git-send-email-anoobj@marvell.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": "<1559580584-5728-38-git-send-email-anoobj@marvell.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1559580584-5728-38-git-send-email-anoobj@marvell.com",
    "date": "2019-06-03T16:49:42",
    "name": "[37/39] examples/l2fwd-event: add eventmode worker",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "5422eea8a5d0562fd46cc0c04cc3ea184b0bd75c",
    "submitter": {
        "id": 1205,
        "url": "https://patches.dpdk.org/api/people/1205/?format=api",
        "name": "Anoob Joseph",
        "email": "anoobj@marvell.com"
    },
    "delegate": null,
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/1559580584-5728-38-git-send-email-anoobj@marvell.com/mbox/",
    "series": [
        {
            "id": 4867,
            "url": "https://patches.dpdk.org/api/series/4867/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=4867",
            "date": "2019-06-03T16:49:08",
            "name": null,
            "version": 1,
            "mbox": "https://patches.dpdk.org/series/4867/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/54219/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/54219/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 2AAE31BA4D;\n\tMon,  3 Jun 2019 18:53:07 +0200 (CEST)",
            "from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com\n\t[67.231.148.174]) by dpdk.org (Postfix) with ESMTP id BF3561B94F\n\tfor <dev@dpdk.org>; Mon,  3 Jun 2019 18:53:04 +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\tx53Ge4n3031766; Mon, 3 Jun 2019 09:53:04 -0700",
            "from sc-exch01.marvell.com ([199.233.58.181])\n\tby mx0a-0016f401.pphosted.com with ESMTP id 2sw2wmh7e8-1\n\t(version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); \n\tMon, 03 Jun 2019 09:53:03 -0700",
            "from SC-EXCH01.marvell.com (10.93.176.81) by SC-EXCH01.marvell.com\n\t(10.93.176.81) with Microsoft SMTP Server (TLS) id 15.0.1367.3;\n\tMon, 3 Jun 2019 09:53:03 -0700",
            "from maili.marvell.com (10.93.176.43) by SC-EXCH01.marvell.com\n\t(10.93.176.81) with Microsoft SMTP Server id 15.0.1367.3 via Frontend\n\tTransport; Mon, 3 Jun 2019 09:53:03 -0700",
            "from ajoseph83.caveonetworks.com.com (unknown [10.29.45.56])\n\tby maili.marvell.com (Postfix) with ESMTP id 932923F703F;\n\tMon,  3 Jun 2019 09:52:58 -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=4g/jX3/ue+O6MBYSgVhpI1l1tNoULdHCY7A5t3lOtRo=;\n\tb=nNUjRAFk96SDjOYaY5tApBXJxOSk61t/VuXkpKjkZwe9CB8v3gn0qjSkPtAIcn7cvONN\n\tupMCyq7ltJeNB2i+wUn7YL5R4Ejq6jZJAFc9Frt7MEtPq2Z4g0nVMAf6jfvoCbaCy2bH\n\tJ0UrNlYFaMhA06VrEyqkqfJEZVIFGOo0/8FP6yaMwLAT2tj2Az8AiqpqLC/vsyViPkfn\n\tN0HqHJpW/ow9Ws5ZrtEGawmvGr8xP2z+3rJ0oDCqIdbZW2/fp0MTslV4DUF/LrEOinXp\n\t0k9XpMT46bXF/SKe+vjrfYvXQRkQq+P4PhheDxCy3cB+abg9agQhhum4/ZYMifO2JKCy\n\t+Q== ",
        "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": "Narayana Prasad <pathreya@marvell.com>, <dev@dpdk.org>, Lukasz Bartosik\n\t<lbartosik@marvell.com>, Pavan Nikhilesh <pbhagavatula@marvell.com>, \n\t\"Hemant Agrawal\" <hemant.agrawal@nxp.com>, \n\tNipun 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>,\n\t\"Anoob Joseph\" <anoobj@marvell.com>",
        "Date": "Mon, 3 Jun 2019 22:19:42 +0530",
        "Message-ID": "<1559580584-5728-38-git-send-email-anoobj@marvell.com>",
        "X-Mailer": "git-send-email 2.7.4",
        "In-Reply-To": "<1559580584-5728-1-git-send-email-anoobj@marvell.com>",
        "References": "<1559580584-5728-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 37/39] examples/l2fwd-event: add eventmode worker",
        "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": "Adding non-burst Tx internal-port eventmode worker.\n\nSigned-off-by: Anoob Joseph <anoobj@marvell.com>\nSigned-off-by: Lukasz Bartosik <lbartosik@marvell.com>\n---\n examples/l2fwd-event/l2fwd_worker.c | 164 +++++++++++++++++++++++++++++++++++-\n 1 file changed, 163 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/examples/l2fwd-event/l2fwd_worker.c b/examples/l2fwd-event/l2fwd_worker.c\nindex 92eae02..0a413a4 100644\n--- a/examples/l2fwd-event/l2fwd_worker.c\n+++ b/examples/l2fwd-event/l2fwd_worker.c\n@@ -315,7 +315,7 @@ l2fwd_poll_mode_worker(void)\n  */\n \n /* Workers registered */\n-#define L2FWD_EVENTMODE_WORKERS\t\t1\n+#define L2FWD_EVENTMODE_WORKERS\t\t2\n \n /*\n  * Event mode worker\n@@ -486,6 +486,159 @@ l2fwd_eventmode_non_burst_no_internal_port(void *args)\n \t\trte_free(links);\n }\n \n+/*\n+ * Event mode worker\n+ * Operating mode : non-burst tx internal port\n+ */\n+static void\n+l2fwd_eventmode_non_burst_tx_internal_port(void *args)\n+{\n+\tstruct rte_event ev;\n+\tstruct rte_mbuf *pkt;\n+\tstruct rte_eventmode_helper_conf *mode_conf;\n+\tstruct rte_eventmode_helper_event_link_info *links = NULL;\n+\tunsigned int lcore_nb_link = 0;\n+\tuint32_t lcore_id;\n+\tunsigned int i, nb_rx = 0;\n+\tunsigned int portid;\n+\tstruct lcore_queue_conf *qconf;\n+\tint is_master_core;\n+\tstruct tsc_tracker tsc = {0};\n+\n+\t/* Get core ID */\n+\tlcore_id = rte_lcore_id();\n+\n+\tRTE_LOG(INFO, L2FWD,\n+\t\t\"Launching event mode non-burst worker internal port \"\n+\t\t\"on lcore %d\\n\", lcore_id);\n+\n+\t/* Set the flag if master core */\n+\tis_master_core = (lcore_id == rte_get_master_lcore()) ? 1 : 0;\n+\n+\t/* Get qconf for this core */\n+\tqconf = &lcore_queue_conf[lcore_id];\n+\n+\t/* Set drain tsc */\n+\ttsc.drain_tsc = (rte_get_tsc_hz() + US_PER_S - 1) /\n+\t\t\tUS_PER_S * BURST_TX_DRAIN_US;\n+\n+\t/* Mode conf will be passed as args */\n+\tmode_conf = (struct rte_eventmode_helper_conf *)args;\n+\n+\t/* Get the links configured for this lcore */\n+\tlcore_nb_link = rte_eventmode_helper_get_event_lcore_links(lcore_id,\n+\t\t\tmode_conf, &links);\n+\n+\t/* Check if we have links registered for this lcore */\n+\tif (lcore_nb_link == 0) {\n+\t\t/* No links registered. The core could do periodic drains */\n+\t\tl2fwd_drain_loop(qconf, &tsc, is_master_core);\n+\t\tgoto clean_and_exit;\n+\t}\n+\n+\t/* We have valid links */\n+\n+\t/* Reset stats before proceeding */\n+\treset_eth_stats(is_master_core);\n+\n+\t/* See if it's single link */\n+\tif (lcore_nb_link == 1)\n+\t\tgoto single_link_loop;\n+\telse\n+\t\tgoto multi_link_loop;\n+\n+single_link_loop:\n+\n+\tRTE_LOG(INFO, L2FWD, \" -- lcoreid=%u event_port_id=%u\\n\", lcore_id,\n+\t\tlinks[0].event_portid);\n+\n+\twhile (!force_quit) {\n+\n+\t\t/* Do periodic operations (buffer drain & stats monitor) */\n+\t\tl2fwd_periodic_drain_stats_monitor(qconf, &tsc, is_master_core);\n+\n+\t\t/* Read packet from event queues */\n+\t\tnb_rx = rte_event_dequeue_burst(links[0].eventdev_id,\n+\t\t\t\tlinks[0].event_portid,\n+\t\t\t\t&ev,     /* events */\n+\t\t\t\t1,       /* nb_events */\n+\t\t\t\t0        /* timeout_ticks */);\n+\n+\t\tif (nb_rx == 0)\n+\t\t\tcontinue;\n+\n+\t\tportid = ev.queue_id;\n+\t\tport_statistics[portid].rx++;\n+\t\tpkt = ev.mbuf;\n+\n+\t\trte_prefetch0(rte_pktmbuf_mtod(pkt, void *));\n+\n+\t\t/* Process packet */\n+\t\tl2fwd_event_pre_forward(&ev, portid);\n+\n+\t\t/*\n+\t\t * Since tx internal port is available, events can be\n+\t\t * directly enqueued to the adapter and it would be\n+\t\t * internally submitted to the eth device.\n+\t\t */\n+\t\trte_event_eth_tx_adapter_enqueue(links[0].eventdev_id,\n+\t\t\t\tlinks[0].event_portid,\n+\t\t\t\t&ev,\t/* events */\n+\t\t\t\t1\t/* nb_events */);\n+\t}\n+\tgoto clean_and_exit;\n+\n+multi_link_loop:\n+\n+\tfor (i = 0; i < lcore_nb_link; i++) {\n+\t\tRTE_LOG(INFO, L2FWD, \" -- lcoreid=%u event_port_id=%u\\n\",\n+\t\t\tlcore_id, links[i].event_portid);\n+\t}\n+\n+\twhile (!force_quit) {\n+\n+\t\t/* Do periodic operations (buffer drain & stats monitor) */\n+\t\tl2fwd_periodic_drain_stats_monitor(qconf, &tsc, is_master_core);\n+\n+\t\tfor (i = 0; i < lcore_nb_link; i++) {\n+\t\t\t/* Read packet from event queues */\n+\t\t\tnb_rx = rte_event_dequeue_burst(links[i].eventdev_id,\n+\t\t\t\t\tlinks[i].event_portid,\n+\t\t\t\t\t&ev,     /* events */\n+\t\t\t\t\t1,       /* nb_events */\n+\t\t\t\t\t0        /* timeout_ticks */);\n+\n+\t\t\tif (nb_rx == 0)\n+\t\t\t\tcontinue;\n+\n+\t\t\tportid = ev.queue_id;\n+\t\t\tport_statistics[portid].rx++;\n+\t\t\tpkt = ev.mbuf;\n+\n+\t\t\trte_prefetch0(rte_pktmbuf_mtod(pkt, void *));\n+\n+\t\t\t/* Process packet */\n+\t\t\tl2fwd_event_pre_forward(&ev, portid);\n+\n+\t\t\t/*\n+\t\t\t * Since tx internal port is available, events can be\n+\t\t\t * directly enqueued to the adapter and it would be\n+\t\t\t * internally submitted to the eth device.\n+\t\t\t */\n+\t\t\trte_event_eth_tx_adapter_enqueue(links[i].eventdev_id,\n+\t\t\t\t\tlinks[i].event_portid,\n+\t\t\t\t\t&ev,\t/* events */\n+\t\t\t\t\t1\t/* nb_events */);\n+\n+\t\t}\n+\t}\n+\tgoto clean_and_exit;\n+\n+clean_and_exit:\n+\tif (links != NULL)\n+\t\trte_free(links);\n+}\n+\n static uint8_t\n l2fwd_eventmode_populate_wrkr_params(\n \t\tstruct rte_eventmode_helper_app_worker_params *wrkrs)\n@@ -503,6 +656,15 @@ l2fwd_eventmode_populate_wrkr_params(\n \twrkr->worker_thread = l2fwd_eventmode_non_burst_no_internal_port;\n \n \tnb_wrkr_param++;\n+\twrkr++;\n+\n+\t/* Non-burst tx internal port */\n+\twrkr->cap.burst = RTE_EVENTMODE_HELPER_RX_TYPE_NON_BURST;\n+\twrkr->cap.tx_internal_port =\n+\t\t\tRTE_EVENTMODE_HELPER_TX_TYPE_INTERNAL_PORT;\n+\twrkr->worker_thread = l2fwd_eventmode_non_burst_tx_internal_port;\n+\n+\tnb_wrkr_param++;\n \treturn nb_wrkr_param;\n }\n \n",
    "prefixes": [
        "37/39"
    ]
}