get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 59842,
    "url": "http://patchwork.dpdk.org/api/patches/59842/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20190926100558.24348-3-pbhagavatula@marvell.com/",
    "project": {
        "id": 1,
        "url": "http://patchwork.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": "<20190926100558.24348-3-pbhagavatula@marvell.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20190926100558.24348-3-pbhagavatula@marvell.com",
    "date": "2019-09-26T10:05:49",
    "name": "[02/11] examples/l3fwd: split pipelines based on capability",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "da35c93d86b2fb4cc4388b4f66ee7a44371e1943",
    "submitter": {
        "id": 1183,
        "url": "http://patchwork.dpdk.org/api/people/1183/?format=api",
        "name": "Pavan Nikhilesh Bhagavatula",
        "email": "pbhagavatula@marvell.com"
    },
    "delegate": {
        "id": 1,
        "url": "http://patchwork.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/20190926100558.24348-3-pbhagavatula@marvell.com/mbox/",
    "series": [
        {
            "id": 6542,
            "url": "http://patchwork.dpdk.org/api/series/6542/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=6542",
            "date": "2019-09-26T10:05:47",
            "name": "example/l3fwd: introduce event device support",
            "version": 1,
            "mbox": "http://patchwork.dpdk.org/series/6542/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/59842/comments/",
    "check": "success",
    "checks": "http://patchwork.dpdk.org/api/patches/59842/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 6F4C51BF41;\n\tThu, 26 Sep 2019 12:06:14 +0200 (CEST)",
            "from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com\n\t[67.231.156.173]) by dpdk.org (Postfix) with ESMTP id 4DEAD1BF2A\n\tfor <dev@dpdk.org>; Thu, 26 Sep 2019 12:06:12 +0200 (CEST)",
            "from pps.filterd (m0045851.ppops.net [127.0.0.1])\n\tby mx0b-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id\n\tx8QA5PsF000795; Thu, 26 Sep 2019 03:06:11 -0700",
            "from sc-exch04.marvell.com ([199.233.58.184])\n\tby mx0b-0016f401.pphosted.com with ESMTP id 2v8u5dr196-1\n\t(version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); \n\tThu, 26 Sep 2019 03:06:11 -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\tThu, 26 Sep 2019 03:06:09 -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; Thu, 26 Sep 2019 03:06:09 -0700",
            "from BG-LT7430.marvell.com (unknown [10.28.17.15])\n\tby maili.marvell.com (Postfix) with ESMTP id A17E03F7041;\n\tThu, 26 Sep 2019 03:06:06 -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=vPUbzA3mcZfxzIfEbAjIKbuTvPVGD3iZBQvadLhpwe0=;\n\tb=GV36bVBStA26W+LbZ+WnbanyT+Qr2s63Z3PT5PwXwcAOwmXNpVDGiGNPDP/VtC/cW6jE\n\tTsX8Ra0Q3LftUi1Hb/+QCnlbf37ZzlIa5bdh+DioO/aTWtrhxlEyWIlwNoeHiiVYP+rA\n\tsAdqFa+De2X+5lBjioCmeXiM4cL+pPQ9JV7boZ8DS/bS/9vEwTyO7zPnXIPqx/eJXn1V\n\tWo86R+HGTyJa1zrovtzcmKzxadKSQTTI63Hd82FOsZdIOdaPFf8UyTVMscgkJeKW3yTQ\n\t63Z2mHfgO0mLGtsX1dhl3mSFEbbOid7pHPl71t3DBeWmvk26ptLKgvDzeTcicoIj1SOV\n\tdg== ",
        "From": "<pbhagavatula@marvell.com>",
        "To": "<jerinj@marvell.com>, <akhil.goyal@nxp.com>, Marko Kovacevic\n\t<marko.kovacevic@intel.com>, Ori Kam <orika@mellanox.com>,\n\tBruce Richardson\n\t<bruce.richardson@intel.com>, Radu Nicolau <radu.nicolau@intel.com>, \n\t\"Tomasz Kantecki\" <tomasz.kantecki@intel.com>",
        "CC": "<dev@dpdk.org>, Sunil Kumar Kori <skori@marvell.com>",
        "Date": "Thu, 26 Sep 2019 15:35:49 +0530",
        "Message-ID": "<20190926100558.24348-3-pbhagavatula@marvell.com>",
        "X-Mailer": "git-send-email 2.17.1",
        "In-Reply-To": "<20190926100558.24348-1-pbhagavatula@marvell.com>",
        "References": "<20190926100558.24348-1-pbhagavatula@marvell.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Content-Type": "text/plain",
        "X-Proofpoint-Virus-Version": "vendor=fsecure engine=2.50.10434:6.0.95,1.0.8\n\tdefinitions=2019-09-26_04:2019-09-25,2019-09-26 signatures=0",
        "Subject": "[dpdk-dev] [PATCH 02/11] examples/l3fwd: split pipelines based on\n\tcapability",
        "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": "From: Sunil Kumar Kori <skori@marvell.com>\n\nAdd infra to split eventdev framework based on event Tx adapter\ncapability.\nIf event Tx adapter has internal port capability then we use\n`rte_event_eth_tx_adapter_enqueue` to transmitting packets else\nwe use a SINGLE_LINK event queue to enqueue packets to a service\ncore which is responsible for transmitting packets.\n\nSigned-off-by: Sunil Kumar Kori <skori@marvell.com>\n---\n examples/l3fwd/Makefile                       |  1 +\n examples/l3fwd/l3fwd_eventdev.c               | 31 +++++++++++++++++++\n examples/l3fwd/l3fwd_eventdev.h               | 21 +++++++++++++\n examples/l3fwd/l3fwd_eventdev_generic.c       | 12 +++++++\n examples/l3fwd/l3fwd_eventdev_internal_port.c | 12 +++++++\n examples/l3fwd/meson.build                    |  3 +-\n 6 files changed, 79 insertions(+), 1 deletion(-)\n create mode 100644 examples/l3fwd/l3fwd_eventdev_generic.c\n create mode 100644 examples/l3fwd/l3fwd_eventdev_internal_port.c",
    "diff": "diff --git a/examples/l3fwd/Makefile b/examples/l3fwd/Makefile\nindex 4d20f3790..42d3f0bb6 100644\n--- a/examples/l3fwd/Makefile\n+++ b/examples/l3fwd/Makefile\n@@ -6,6 +6,7 @@ APP = l3fwd\n \n # all source are stored in SRCS-y\n SRCS-y := main.c l3fwd_lpm.c l3fwd_em.c l3fwd_eventdev.c\n+SRCS-y += l3fwd_eventdev_generic.c l3fwd_eventdev_internal_port.c\n \n # Build using pkg-config variables if possible\n ifeq ($(shell pkg-config --exists libdpdk && echo 0),0)\ndiff --git a/examples/l3fwd/l3fwd_eventdev.c b/examples/l3fwd/l3fwd_eventdev.c\nindex 319a20746..fa464626d 100644\n--- a/examples/l3fwd/l3fwd_eventdev.c\n+++ b/examples/l3fwd/l3fwd_eventdev.c\n@@ -66,6 +66,31 @@ l3fwd_parse_eventdev_args(char **argv, int argc)\n \treturn 0;\n }\n \n+static void\n+l3fwd_eventdev_capability_setup(void)\n+{\n+\tstruct l3fwd_eventdev_resources *evdev_rsrc = l3fwd_get_eventdev_rsrc();\n+\tuint32_t caps = 0;\n+\tuint16_t i;\n+\tint ret;\n+\n+\tRTE_ETH_FOREACH_DEV(i) {\n+\t\tret = rte_event_eth_tx_adapter_caps_get(0, i, &caps);\n+\t\tif (ret)\n+\t\t\trte_exit(EXIT_FAILURE,\n+\t\t\t\t \"Invalid capability for Tx adptr port %d\\n\",\n+\t\t\t\t i);\n+\n+\t\tevdev_rsrc->tx_mode_q |= !(caps &\n+\t\t\t\t   RTE_EVENT_ETH_TX_ADAPTER_CAP_INTERNAL_PORT);\n+\t}\n+\n+\tif (evdev_rsrc->tx_mode_q)\n+\t\tl3fwd_eventdev_set_generic_ops(&evdev_rsrc->ops);\n+\telse\n+\t\tl3fwd_eventdev_set_internal_port_ops(&evdev_rsrc->ops);\n+}\n+\n void\n l3fwd_eventdev_resource_setup(void)\n {\n@@ -76,4 +101,10 @@ l3fwd_eventdev_resource_setup(void)\n \tret = l3fwd_parse_eventdev_args(evdev_rsrc->args, evdev_rsrc->nb_args);\n \tif (ret < 0 || !evdev_rsrc->enabled)\n \t\treturn;\n+\n+\tif (!rte_event_dev_count())\n+\t\trte_exit(EXIT_FAILURE, \"No Eventdev found\");\n+\n+\t/* Setup eventdev capability callbacks */\n+\tl3fwd_eventdev_capability_setup();\n }\ndiff --git a/examples/l3fwd/l3fwd_eventdev.h b/examples/l3fwd/l3fwd_eventdev.h\nindex 64d9207a3..61a537864 100644\n--- a/examples/l3fwd/l3fwd_eventdev.h\n+++ b/examples/l3fwd/l3fwd_eventdev.h\n@@ -7,6 +7,7 @@\n \n #include <rte_common.h>\n #include <rte_eventdev.h>\n+#include <rte_event_eth_tx_adapter.h>\n #include <rte_spinlock.h>\n \n #include \"l3fwd.h\"\n@@ -19,8 +20,26 @@ enum {\n \tCMD_LINE_OPT_EVENTQ_SYNC_NUM,\n };\n \n+typedef void (*event_queue_setup_cb)(uint16_t ethdev_count,\n+\t\t\t\t     uint32_t event_queue_cfg);\n+typedef uint32_t (*eventdev_setup_cb)(uint16_t ethdev_count);\n+typedef void (*adapter_setup_cb)(uint16_t ethdev_count);\n+typedef void (*event_port_setup_cb)(void);\n+typedef void (*service_setup_cb)(void);\n+typedef int (*event_loop_cb)(void *);\n+\n+struct l3fwd_eventdev_setup_ops {\n+\tevent_queue_setup_cb event_queue_setup;\n+\tevent_port_setup_cb event_port_setup;\n+\tadapter_setup_cb adapter_setup;\n+\tevent_loop_cb lpm_event_loop;\n+\tevent_loop_cb em_event_loop;\n+};\n+\n struct l3fwd_eventdev_resources {\n+\tstruct l3fwd_eventdev_setup_ops ops;\n \tuint8_t sync_mode;\n+\tuint8_t tx_mode_q;\n \tuint8_t enabled;\n \tuint8_t nb_args;\n \tchar **args;\n@@ -50,5 +69,7 @@ l3fwd_get_eventdev_rsrc(void)\n }\n \n void l3fwd_eventdev_resource_setup(void);\n+void l3fwd_eventdev_set_generic_ops(struct l3fwd_eventdev_setup_ops *ops);\n+void l3fwd_eventdev_set_internal_port_ops(struct l3fwd_eventdev_setup_ops *ops);\n \n #endif /* __L3FWD_EVENTDEV_H__ */\ndiff --git a/examples/l3fwd/l3fwd_eventdev_generic.c b/examples/l3fwd/l3fwd_eventdev_generic.c\nnew file mode 100644\nindex 000000000..35e655fc0\n--- /dev/null\n+++ b/examples/l3fwd/l3fwd_eventdev_generic.c\n@@ -0,0 +1,12 @@\n+/* SPDX-License-Identifier: BSD-3-Clause\n+ * Copyright(C) 2019 Marvell International Ltd.\n+ */\n+\n+#include \"l3fwd.h\"\n+#include \"l3fwd_eventdev.h\"\n+\n+void\n+l3fwd_eventdev_set_generic_ops(struct l3fwd_eventdev_setup_ops *ops)\n+{\n+\tRTE_SET_USED(ops);\n+}\ndiff --git a/examples/l3fwd/l3fwd_eventdev_internal_port.c b/examples/l3fwd/l3fwd_eventdev_internal_port.c\nnew file mode 100644\nindex 000000000..f698a0ce1\n--- /dev/null\n+++ b/examples/l3fwd/l3fwd_eventdev_internal_port.c\n@@ -0,0 +1,12 @@\n+/* SPDX-License-Identifier: BSD-3-Clause\n+ * Copyright(C) 2019 Marvell International Ltd.\n+ */\n+\n+#include \"l3fwd.h\"\n+#include \"l3fwd_eventdev.h\"\n+\n+void\n+l3fwd_eventdev_set_internal_port_ops(struct l3fwd_eventdev_setup_ops *ops)\n+{\n+\tRTE_SET_USED(ops);\n+}\ndiff --git a/examples/l3fwd/meson.build b/examples/l3fwd/meson.build\nindex c88676817..dccea0b02 100644\n--- a/examples/l3fwd/meson.build\n+++ b/examples/l3fwd/meson.build\n@@ -8,5 +8,6 @@\n \n deps += ['hash', 'lpm', 'eventdev']\n sources = files(\n-\t'l3fwd_em.c', 'l3fwd_lpm.c', 'l3fwd_eventdev.c', 'main.c'\n+\t'l3fwd_em.c', 'l3fwd_lpm.c', 'l3fwd_eventdev.c',\n+\t'l3fwd_eventdev_internal_port.c', 'l3fwd_eventdev_generic.c', 'main.c'\n )\n",
    "prefixes": [
        "02/11"
    ]
}