get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 65171,
    "url": "http://patches.dpdk.org/api/patches/65171/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20200128053506.2173-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": "<20200128053506.2173-4-pbhagavatula@marvell.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20200128053506.2173-4-pbhagavatula@marvell.com",
    "date": "2020-01-28T05:34:57",
    "name": "[v6,03/11] examples/l3fwd: add event device configuration",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "0fe551ca45b4a5248742acd36293a01e3261a704",
    "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/20200128053506.2173-4-pbhagavatula@marvell.com/mbox/",
    "series": [
        {
            "id": 8312,
            "url": "http://patches.dpdk.org/api/series/8312/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=8312",
            "date": "2020-01-28T05:34:54",
            "name": "example/l3fwd: introduce event device support",
            "version": 6,
            "mbox": "http://patches.dpdk.org/series/8312/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/65171/comments/",
    "check": "fail",
    "checks": "http://patches.dpdk.org/api/patches/65171/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 2000FA04B3;\n\tTue, 28 Jan 2020 06:35:42 +0100 (CET)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 64DB01C014;\n\tTue, 28 Jan 2020 06:35:31 +0100 (CET)",
            "from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com\n [67.231.156.173]) by dpdk.org (Postfix) with ESMTP id 1EB9F1C012\n for <dev@dpdk.org>; Tue, 28 Jan 2020 06:35:30 +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 00S5ZITb020142; Mon, 27 Jan 2020 21:35:29 -0800",
            "from sc-exch03.marvell.com ([199.233.58.183])\n by mx0b-0016f401.pphosted.com with ESMTP id 2xrp2t2fv2-1\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT);\n Mon, 27 Jan 2020 21:35:29 -0800",
            "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.1497.2; Mon, 27 Jan\n 2020 21:35:26 -0800",
            "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.1497.2 via Frontend\n Transport; Mon, 27 Jan 2020 21:35:27 -0800",
            "from BG-LT7430.marvell.com (unknown [10.28.17.49])\n by maili.marvell.com (Postfix) with ESMTP id D13813F703F;\n Mon, 27 Jan 2020 21:35:22 -0800 (PST)"
        ],
        "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=Ql5AUkcaBSIuBLGxvJtqk9ppJSAZAM51E1uq70Z382c=;\n b=jIE5yHxSU1h+aGIn1Zx1MdiONcHwoDCnShVBYjHLElMDL0wgDKfKILLgzidB5+Yk8Vj4\n qTpc0GAJQSULqYomLdGciCkPgPovj+gcXbfhXKEthrfgEZF6c75iCbq2fOkL1YCZXTx5\n XZjxT3/lcDh65jbs6Cgu4IOYbIRL9WKXAg2Zh1/5cvlVkP153KimCwxpk/1EpmKpzlVc\n +yDPhbN3S9+pCV7NDUPyInOPj0TVaEgxVRVOJBR3zjAauu2FNFbktOjsoulBX/6INDY7\n DG9gch1MpXZU7PDo5iStEpU0gNKQEzIuOJFYqe9Qn+yydeSzb4oySzOqnyrx7ztj2GYh rg==",
        "From": "<pbhagavatula@marvell.com>",
        "To": "<jerinj@marvell.com>, <konstantin.ananyev@intel.com>, Marko Kovacevic\n <marko.kovacevic@intel.com>, Ori Kam <orika@mellanox.com>, Bruce Richardson\n <bruce.richardson@intel.com>, Radu Nicolau <radu.nicolau@intel.com>, \"Akhil\n Goyal\" <akhil.goyal@nxp.com>, Tomasz Kantecki <tomasz.kantecki@intel.com>,\n Sunil Kumar Kori <skori@marvell.com>, Pavan Nikhilesh\n <pbhagavatula@marvell.com>",
        "CC": "<dev@dpdk.org>",
        "Date": "Tue, 28 Jan 2020 11:04:57 +0530",
        "Message-ID": "<20200128053506.2173-4-pbhagavatula@marvell.com>",
        "X-Mailer": "git-send-email 2.17.1",
        "In-Reply-To": "<20200128053506.2173-1-pbhagavatula@marvell.com>",
        "References": "<20200124040542.2360--1-pbhagavatula@marvell.com>\n <20200128053506.2173-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.138, 18.0.572\n definitions=2020-01-27_08:2020-01-24,\n 2020-01-27 signatures=0",
        "Subject": "[dpdk-dev] [PATCH v6 03/11] examples/l3fwd: add event device\n\tconfiguration",
        "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: Pavan Nikhilesh <pbhagavatula@marvell.com>\n\nAdd event device configuration based on the capabilities of the\nprobed event device.\n\nSigned-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>\n---\n examples/l3fwd/l3fwd_event.c               |  3 +\n examples/l3fwd/l3fwd_event.h               | 36 ++++++++++\n examples/l3fwd/l3fwd_event_generic.c       | 76 +++++++++++++++++++++-\n examples/l3fwd/l3fwd_event_internal_port.c | 76 +++++++++++++++++++++-\n 4 files changed, 189 insertions(+), 2 deletions(-)",
    "diff": "diff --git a/examples/l3fwd/l3fwd_event.c b/examples/l3fwd/l3fwd_event.c\nindex 62218f3ca..9cb46c711 100644\n--- a/examples/l3fwd/l3fwd_event.c\n+++ b/examples/l3fwd/l3fwd_event.c\n@@ -68,4 +68,7 @@ l3fwd_event_resource_setup(void)\n \n \t/* Setup eventdev capability callbacks */\n \tl3fwd_event_capability_setup();\n+\n+\t/* Event device configuration */\n+\tevt_rsrc->ops.event_device_setup();\n }\ndiff --git a/examples/l3fwd/l3fwd_event.h b/examples/l3fwd/l3fwd_event.h\nindex d25c8d222..fc3862ec1 100644\n--- a/examples/l3fwd/l3fwd_event.h\n+++ b/examples/l3fwd/l3fwd_event.h\n@@ -8,6 +8,7 @@\n #include <rte_common.h>\n #include <rte_eventdev.h>\n #include <rte_event_eth_tx_adapter.h>\n+#include <rte_service.h>\n #include <rte_spinlock.h>\n \n #include \"l3fwd.h\"\n@@ -18,6 +19,29 @@ typedef void (*event_port_setup_cb)(void);\n typedef void (*adapter_setup_cb)(void);\n typedef int (*event_loop_cb)(void *);\n \n+struct l3fwd_event_queues {\n+\tuint8_t *event_q_id;\n+\tuint8_t\tnb_queues;\n+};\n+\n+struct l3fwd_event_ports {\n+\tuint8_t *event_p_id;\n+\tuint8_t\tnb_ports;\n+\trte_spinlock_t lock;\n+};\n+\n+struct l3fwd_event_rx_adptr {\n+\tuint32_t service_id;\n+\tuint8_t\tnb_rx_adptr;\n+\tuint8_t *rx_adptr;\n+};\n+\n+struct l3fwd_event_tx_adptr {\n+\tuint32_t service_id;\n+\tuint8_t\tnb_tx_adptr;\n+\tuint8_t *tx_adptr;\n+};\n+\n struct l3fwd_event_setup_ops {\n \tevent_device_setup_cb event_device_setup;\n \tevent_queue_setup_cb event_queue_setup;\n@@ -28,9 +52,21 @@ struct l3fwd_event_setup_ops {\n };\n \n struct l3fwd_event_resources {\n+\tstruct rte_event_port_conf def_p_conf;\n+\tstruct l3fwd_event_rx_adptr rx_adptr;\n+\tstruct l3fwd_event_tx_adptr tx_adptr;\n+\tuint8_t disable_implicit_release;\n \tstruct l3fwd_event_setup_ops ops;\n+\tstruct rte_mempool * (*pkt_pool)[NB_SOCKETS];\n+\tstruct l3fwd_event_queues evq;\n+\tstruct l3fwd_event_ports evp;\n+\tuint32_t port_mask;\n+\tuint8_t per_port_pool;\n+\tuint8_t event_d_id;\n \tuint8_t sched_type;\n \tuint8_t tx_mode_q;\n+\tuint8_t deq_depth;\n+\tuint8_t has_burst;\n \tuint8_t enabled;\n \tuint8_t eth_rx_queues;\n };\ndiff --git a/examples/l3fwd/l3fwd_event_generic.c b/examples/l3fwd/l3fwd_event_generic.c\nindex 7fff850e5..ce06fa0e4 100644\n--- a/examples/l3fwd/l3fwd_event_generic.c\n+++ b/examples/l3fwd/l3fwd_event_generic.c\n@@ -7,8 +7,82 @@\n #include \"l3fwd.h\"\n #include \"l3fwd_event.h\"\n \n+static uint32_t\n+l3fwd_event_device_setup_generic(void)\n+{\n+\tstruct l3fwd_event_resources *evt_rsrc = l3fwd_get_eventdev_rsrc();\n+\tstruct rte_event_dev_config event_d_conf = {\n+\t\t.nb_events_limit  = 4096,\n+\t\t.nb_event_queue_flows = 1024,\n+\t\t.nb_event_port_dequeue_depth = 128,\n+\t\t.nb_event_port_enqueue_depth = 128\n+\t};\n+\tstruct rte_event_dev_info dev_info;\n+\tconst uint8_t event_d_id = 0; /* Always use first event device only */\n+\tuint32_t event_queue_cfg = 0;\n+\tuint16_t ethdev_count = 0;\n+\tuint16_t num_workers = 0;\n+\tuint16_t port_id;\n+\tint ret;\n+\n+\tRTE_ETH_FOREACH_DEV(port_id) {\n+\t\tif ((evt_rsrc->port_mask & (1 << port_id)) == 0)\n+\t\t\tcontinue;\n+\t\tethdev_count++;\n+\t}\n+\n+\t/* Event device configuration */\n+\trte_event_dev_info_get(event_d_id, &dev_info);\n+\t/* Enable implicit release */\n+\tif (dev_info.event_dev_cap & RTE_EVENT_DEV_CAP_IMPLICIT_RELEASE_DISABLE)\n+\t\tevt_rsrc->disable_implicit_release = 0;\n+\n+\tif (dev_info.event_dev_cap & RTE_EVENT_DEV_CAP_QUEUE_ALL_TYPES)\n+\t\tevent_queue_cfg |= RTE_EVENT_QUEUE_CFG_ALL_TYPES;\n+\n+\t/* One queue for each ethdev port + one Tx adapter Single link queue. */\n+\tevent_d_conf.nb_event_queues = ethdev_count + 1;\n+\tif (dev_info.max_event_queues < event_d_conf.nb_event_queues)\n+\t\tevent_d_conf.nb_event_queues = dev_info.max_event_queues;\n+\n+\tif (dev_info.max_num_events < event_d_conf.nb_events_limit)\n+\t\tevent_d_conf.nb_events_limit = dev_info.max_num_events;\n+\n+\tif (dev_info.max_event_queue_flows < event_d_conf.nb_event_queue_flows)\n+\t\tevent_d_conf.nb_event_queue_flows =\n+\t\t\t\t\t\tdev_info.max_event_queue_flows;\n+\n+\tif (dev_info.max_event_port_dequeue_depth <\n+\t\t\t\tevent_d_conf.nb_event_port_dequeue_depth)\n+\t\tevent_d_conf.nb_event_port_dequeue_depth =\n+\t\t\t\tdev_info.max_event_port_dequeue_depth;\n+\n+\tif (dev_info.max_event_port_enqueue_depth <\n+\t\t\t\tevent_d_conf.nb_event_port_enqueue_depth)\n+\t\tevent_d_conf.nb_event_port_enqueue_depth =\n+\t\t\t\tdev_info.max_event_port_enqueue_depth;\n+\n+\tnum_workers = rte_lcore_count() - rte_service_lcore_count();\n+\tif (dev_info.max_event_ports < num_workers)\n+\t\tnum_workers = dev_info.max_event_ports;\n+\n+\tevent_d_conf.nb_event_ports = num_workers;\n+\tevt_rsrc->evp.nb_ports = num_workers;\n+\tevt_rsrc->evq.nb_queues = event_d_conf.nb_event_queues;\n+\n+\tevt_rsrc->has_burst = !!(dev_info.event_dev_cap &\n+\t\t\t\t    RTE_EVENT_DEV_CAP_BURST_MODE);\n+\n+\tret = rte_event_dev_configure(event_d_id, &event_d_conf);\n+\tif (ret < 0)\n+\t\trte_panic(\"Error in configuring event device\\n\");\n+\n+\tevt_rsrc->event_d_id = event_d_id;\n+\treturn event_queue_cfg;\n+}\n+\n void\n l3fwd_event_set_generic_ops(struct l3fwd_event_setup_ops *ops)\n {\n-\tRTE_SET_USED(ops);\n+\tops->event_device_setup = l3fwd_event_device_setup_generic;\n }\ndiff --git a/examples/l3fwd/l3fwd_event_internal_port.c b/examples/l3fwd/l3fwd_event_internal_port.c\nindex 085e9c825..242bd0f48 100644\n--- a/examples/l3fwd/l3fwd_event_internal_port.c\n+++ b/examples/l3fwd/l3fwd_event_internal_port.c\n@@ -7,8 +7,82 @@\n #include \"l3fwd.h\"\n #include \"l3fwd_event.h\"\n \n+static uint32_t\n+l3fwd_event_device_setup_internal_port(void)\n+{\n+\tstruct l3fwd_event_resources *evt_rsrc = l3fwd_get_eventdev_rsrc();\n+\tstruct rte_event_dev_config event_d_conf = {\n+\t\t.nb_events_limit  = 4096,\n+\t\t.nb_event_queue_flows = 1024,\n+\t\t.nb_event_port_dequeue_depth = 128,\n+\t\t.nb_event_port_enqueue_depth = 128\n+\t};\n+\tstruct rte_event_dev_info dev_info;\n+\tconst uint8_t event_d_id = 0; /* Always use first event device only */\n+\tuint32_t event_queue_cfg = 0;\n+\tuint16_t ethdev_count = 0;\n+\tuint16_t num_workers = 0;\n+\tuint16_t port_id;\n+\tint ret;\n+\n+\tRTE_ETH_FOREACH_DEV(port_id) {\n+\t\tif ((evt_rsrc->port_mask & (1 << port_id)) == 0)\n+\t\t\tcontinue;\n+\t\tethdev_count++;\n+\t}\n+\n+\t/* Event device configuration */\n+\trte_event_dev_info_get(event_d_id, &dev_info);\n+\n+\t/* Enable implicit release */\n+\tif (dev_info.event_dev_cap & RTE_EVENT_DEV_CAP_IMPLICIT_RELEASE_DISABLE)\n+\t\tevt_rsrc->disable_implicit_release = 0;\n+\n+\tif (dev_info.event_dev_cap & RTE_EVENT_DEV_CAP_QUEUE_ALL_TYPES)\n+\t\tevent_queue_cfg |= RTE_EVENT_QUEUE_CFG_ALL_TYPES;\n+\n+\tevent_d_conf.nb_event_queues = ethdev_count;\n+\tif (dev_info.max_event_queues < event_d_conf.nb_event_queues)\n+\t\tevent_d_conf.nb_event_queues = dev_info.max_event_queues;\n+\n+\tif (dev_info.max_num_events < event_d_conf.nb_events_limit)\n+\t\tevent_d_conf.nb_events_limit = dev_info.max_num_events;\n+\n+\tif (dev_info.max_event_queue_flows < event_d_conf.nb_event_queue_flows)\n+\t\tevent_d_conf.nb_event_queue_flows =\n+\t\t\t\t\t\tdev_info.max_event_queue_flows;\n+\n+\tif (dev_info.max_event_port_dequeue_depth <\n+\t\t\t\tevent_d_conf.nb_event_port_dequeue_depth)\n+\t\tevent_d_conf.nb_event_port_dequeue_depth =\n+\t\t\t\tdev_info.max_event_port_dequeue_depth;\n+\n+\tif (dev_info.max_event_port_enqueue_depth <\n+\t\t\t\tevent_d_conf.nb_event_port_enqueue_depth)\n+\t\tevent_d_conf.nb_event_port_enqueue_depth =\n+\t\t\t\tdev_info.max_event_port_enqueue_depth;\n+\n+\tnum_workers = rte_lcore_count();\n+\tif (dev_info.max_event_ports < num_workers)\n+\t\tnum_workers = dev_info.max_event_ports;\n+\n+\tevent_d_conf.nb_event_ports = num_workers;\n+\tevt_rsrc->evp.nb_ports = num_workers;\n+\tevt_rsrc->evq.nb_queues = event_d_conf.nb_event_queues;\n+\tevt_rsrc->has_burst = !!(dev_info.event_dev_cap &\n+\t\t\t\t    RTE_EVENT_DEV_CAP_BURST_MODE);\n+\n+\tret = rte_event_dev_configure(event_d_id, &event_d_conf);\n+\tif (ret < 0)\n+\t\trte_panic(\"Error in configuring event device\\n\");\n+\n+\tevt_rsrc->event_d_id = event_d_id;\n+\treturn event_queue_cfg;\n+}\n+\n+\n void\n l3fwd_event_set_internal_port_ops(struct l3fwd_event_setup_ops *ops)\n {\n-\tRTE_SET_USED(ops);\n+\tops->event_device_setup = l3fwd_event_device_setup_internal_port;\n }\n",
    "prefixes": [
        "v6",
        "03/11"
    ]
}