Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/62235/?format=api
http://patches.dpdk.org/api/patches/62235/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20191030162651.3001-4-pbhagavatula@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": "<20191030162651.3001-4-pbhagavatula@marvell.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20191030162651.3001-4-pbhagavatula@marvell.com", "date": "2019-10-30T16:26:44", "name": "[v8,03/10] examples/l2fwd-event: add infra to split eventdev framework", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "377f75b7da9903a56a10590c789cf5c262bbe2ef", "submitter": { "id": 1183, "url": "http://patches.dpdk.org/api/people/1183/?format=api", "name": "Pavan Nikhilesh Bhagavatula", "email": "pbhagavatula@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/20191030162651.3001-4-pbhagavatula@marvell.com/mbox/", "series": [ { "id": 7162, "url": "http://patches.dpdk.org/api/series/7162/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=7162", "date": "2019-10-30T16:26:41", "name": "example/l2fwd-event: introduce l2fwd-event example", "version": 8, "mbox": "http://patches.dpdk.org/series/7162/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/62235/comments/", "check": "fail", "checks": "http://patches.dpdk.org/api/patches/62235/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 20F85A00BE;\n\tWed, 30 Oct 2019 17:27:31 +0100 (CET)", "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id DEA541C0B7;\n\tWed, 30 Oct 2019 17:27:11 +0100 (CET)", "from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com\n [67.231.156.173]) by dpdk.org (Postfix) with ESMTP id 904EE1C0AA\n for <dev@dpdk.org>; Wed, 30 Oct 2019 17:27:09 +0100 (CET)", "from pps.filterd (m0045851.ppops.net [127.0.0.1])\n by mx0b-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id\n x9UGF32i006802; Wed, 30 Oct 2019 09:27:09 -0700", "from sc-exch03.marvell.com ([199.233.58.183])\n by mx0b-0016f401.pphosted.com with ESMTP id 2vxwjqbamt-1\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT);\n Wed, 30 Oct 2019 09:27:08 -0700", "from SC-EXCH01.marvell.com (10.93.176.81) by SC-EXCH03.marvell.com\n (10.93.176.83) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Wed, 30 Oct\n 2019 09:27:07 -0700", "from maili.marvell.com (10.93.176.43) by SC-EXCH01.marvell.com\n (10.93.176.81) with Microsoft SMTP Server id 15.0.1367.3 via Frontend\n Transport; Wed, 30 Oct 2019 09:27:06 -0700", "from BG-LT7430.marvell.com (unknown [10.28.17.33])\n by maili.marvell.com (Postfix) with ESMTP id 01CCC3F7041;\n Wed, 30 Oct 2019 09:27:03 -0700 (PDT)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com;\n h=from : to : cc :\n subject : date : message-id : in-reply-to : references : mime-version :\n content-transfer-encoding : content-type; s=pfpt0818;\n bh=Q/EDPG7bDhU8dOpd6gzr4IauRMvPEdQkFBNKm4wKxEs=;\n b=hBfCqNz22pu2hmspMjWsdyy4jAosoxhpdX2A28zG2fPPD9tGM9Is150L2LDuqf8t9M2+\n FDV203KE+kYq11fJFVz+jDtBhZtFua6JVdIG5xW/tGw2sBzJtYCO3W+SPkAq2OeRFIKH\n BngAZkNTjXN6tT1n35aZ/+6ITB/i0z3m27nwfC3apTnCJp/NVzKVDYJf2Z7y7QpDQtTX\n HlpL4lkhWjdExmufA9wQVPqRENKnndakpyJ0aEShH7TYEz3DHWme1LnuPkOXQ/2eHWEm\n nrzSlX4TadNTVy1TNouOQChC9OSNa1n1k81yDe/VDHVgLj8Qhx3UKmXSzfkI895idE6i QQ==", "From": "<pbhagavatula@marvell.com>", "To": "<jerinj@marvell.com>, Marko Kovacevic <marko.kovacevic@intel.com>, Ori Kam\n <orika@mellanox.com>, Bruce Richardson <bruce.richardson@intel.com>, \"Radu\n Nicolau\" <radu.nicolau@intel.com>, Akhil Goyal <akhil.goyal@nxp.com>,\n \"Tomasz Kantecki\" <tomasz.kantecki@intel.com>,\n Sunil Kumar Kori <skori@marvell.com>,\n Pavan Nikhilesh <pbhagavatula@marvell.com>", "CC": "<dev@dpdk.org>", "Date": "Wed, 30 Oct 2019 21:56:44 +0530", "Message-ID": "<20191030162651.3001-4-pbhagavatula@marvell.com>", "X-Mailer": "git-send-email 2.17.1", "In-Reply-To": "<20191030162651.3001-1-pbhagavatula@marvell.com>", "References": "<20191030162651.3001-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 definitions=2019-10-30_07:2019-10-30,2019-10-30 signatures=0", "Subject": "[dpdk-dev] [PATCH v8 03/10] examples/l2fwd-event: add infra to\n\tsplit eventdev framework", "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": "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>\nSigned-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>\n---\n examples/l2fwd-event/Makefile | 2 ++\n examples/l2fwd-event/l2fwd_event.c | 26 +++++++++++++++++++\n examples/l2fwd-event/l2fwd_event.h | 7 +++++\n examples/l2fwd-event/l2fwd_event_generic.c | 23 ++++++++++++++++\n .../l2fwd-event/l2fwd_event_internal_port.c | 23 ++++++++++++++++\n examples/l2fwd-event/meson.build | 2 ++\n 6 files changed, 83 insertions(+)\n create mode 100644 examples/l2fwd-event/l2fwd_event_generic.c\n create mode 100644 examples/l2fwd-event/l2fwd_event_internal_port.c", "diff": "diff --git a/examples/l2fwd-event/Makefile b/examples/l2fwd-event/Makefile\nindex 08ba1835d..6f4176882 100644\n--- a/examples/l2fwd-event/Makefile\n+++ b/examples/l2fwd-event/Makefile\n@@ -10,6 +10,8 @@ SRCS-y := main.c\n SRCS-y += l2fwd_poll.c\n SRCS-y += l2fwd_event.c\n SRCS-y += l2fwd_common.c\n+SRCS-y += l2fwd_event_generic.c\n+SRCS-y += l2fwd_event_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/l2fwd-event/l2fwd_event.c b/examples/l2fwd-event/l2fwd_event.c\nindex 48d32d718..7f90e6311 100644\n--- a/examples/l2fwd-event/l2fwd_event.c\n+++ b/examples/l2fwd-event/l2fwd_event.c\n@@ -17,6 +17,29 @@\n \n #include \"l2fwd_event.h\"\n \n+static void\n+l2fwd_event_capability_setup(struct l2fwd_event_resources *evt_rsrc)\n+{\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_panic(\"Invalid capability for Tx adptr port %d\\n\",\n+\t\t\t\t i);\n+\n+\t\tevt_rsrc->tx_mode_q |= !(caps &\n+\t\t\t\t RTE_EVENT_ETH_TX_ADAPTER_CAP_INTERNAL_PORT);\n+\t}\n+\n+\tif (evt_rsrc->tx_mode_q)\n+\t\tl2fwd_event_set_generic_ops(&evt_rsrc->ops);\n+\telse\n+\t\tl2fwd_event_set_internal_port_ops(&evt_rsrc->ops);\n+}\n+\n void\n l2fwd_event_resource_setup(struct l2fwd_resources *rsrc)\n {\n@@ -31,4 +54,7 @@ l2fwd_event_resource_setup(struct l2fwd_resources *rsrc)\n \t\trte_panic(\"Failed to allocate memory\\n\");\n \n \trsrc->evt_rsrc = evt_rsrc;\n+\n+\t/* Setup eventdev capability callbacks */\n+\tl2fwd_event_capability_setup(evt_rsrc);\n }\ndiff --git a/examples/l2fwd-event/l2fwd_event.h b/examples/l2fwd-event/l2fwd_event.h\nindex 9a1bb1612..b7aaa39f9 100644\n--- a/examples/l2fwd-event/l2fwd_event.h\n+++ b/examples/l2fwd-event/l2fwd_event.h\n@@ -13,9 +13,16 @@\n \n #include \"l2fwd_common.h\"\n \n+struct event_setup_ops {\n+};\n+\n struct l2fwd_event_resources {\n+\tuint8_t tx_mode_q;\n+\tstruct event_setup_ops ops;\n };\n \n void l2fwd_event_resource_setup(struct l2fwd_resources *rsrc);\n+void l2fwd_event_set_generic_ops(struct event_setup_ops *ops);\n+void l2fwd_event_set_internal_port_ops(struct event_setup_ops *ops);\n \n #endif /* __L2FWD_EVENT_H__ */\ndiff --git a/examples/l2fwd-event/l2fwd_event_generic.c b/examples/l2fwd-event/l2fwd_event_generic.c\nnew file mode 100644\nindex 000000000..9afade7d2\n--- /dev/null\n+++ b/examples/l2fwd-event/l2fwd_event_generic.c\n@@ -0,0 +1,23 @@\n+/* SPDX-License-Identifier: BSD-3-Clause\n+ * Copyright(C) 2019 Marvell International Ltd.\n+ */\n+\n+#include <stdbool.h>\n+#include <getopt.h>\n+\n+#include <rte_cycles.h>\n+#include <rte_ethdev.h>\n+#include <rte_eventdev.h>\n+#include <rte_event_eth_rx_adapter.h>\n+#include <rte_event_eth_tx_adapter.h>\n+#include <rte_lcore.h>\n+#include <rte_spinlock.h>\n+\n+#include \"l2fwd_common.h\"\n+#include \"l2fwd_event.h\"\n+\n+void\n+l2fwd_event_set_generic_ops(struct event_setup_ops *ops)\n+{\n+\tRTE_SET_USED(ops);\n+}\ndiff --git a/examples/l2fwd-event/l2fwd_event_internal_port.c b/examples/l2fwd-event/l2fwd_event_internal_port.c\nnew file mode 100644\nindex 000000000..ce95b8e6d\n--- /dev/null\n+++ b/examples/l2fwd-event/l2fwd_event_internal_port.c\n@@ -0,0 +1,23 @@\n+/* SPDX-License-Identifier: BSD-3-Clause\n+ * Copyright(C) 2019 Marvell International Ltd.\n+ */\n+\n+#include <stdbool.h>\n+#include <getopt.h>\n+\n+#include <rte_cycles.h>\n+#include <rte_ethdev.h>\n+#include <rte_eventdev.h>\n+#include <rte_event_eth_rx_adapter.h>\n+#include <rte_event_eth_tx_adapter.h>\n+#include <rte_lcore.h>\n+#include <rte_spinlock.h>\n+\n+#include \"l2fwd_common.h\"\n+#include \"l2fwd_event.h\"\n+\n+void\n+l2fwd_event_set_internal_port_ops(struct event_setup_ops *ops)\n+{\n+\tRTE_SET_USED(ops);\n+}\ndiff --git a/examples/l2fwd-event/meson.build b/examples/l2fwd-event/meson.build\nindex c1ae2037c..4e9a069d6 100644\n--- a/examples/l2fwd-event/meson.build\n+++ b/examples/l2fwd-event/meson.build\n@@ -13,4 +13,6 @@ sources = files(\n \t'l2fwd_poll.c',\n \t'l2fwd_common.c',\n \t'l2fwd_event.c',\n+\t'l2fwd_event_internal_port.c',\n+\t'l2fwd_event_generic.c'\n )\n", "prefixes": [ "v8", "03/10" ] }{ "id": 62235, "url": "