get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 61152,
    "url": "https://patches.dpdk.org/api/patches/61152/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20191014182247.961-5-pbhagavatula@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": "<20191014182247.961-5-pbhagavatula@marvell.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20191014182247.961-5-pbhagavatula@marvell.com",
    "date": "2019-10-14T18:22:41",
    "name": "[v6,04/10] examples/l2fwd-event: add event device setup",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "5eadb422f9966086a09c3a7c83891029afce13ff",
    "submitter": {
        "id": 1183,
        "url": "https://patches.dpdk.org/api/people/1183/?format=api",
        "name": "Pavan Nikhilesh Bhagavatula",
        "email": "pbhagavatula@marvell.com"
    },
    "delegate": {
        "id": 310,
        "url": "https://patches.dpdk.org/api/users/310/?format=api",
        "username": "jerin",
        "first_name": "Jerin",
        "last_name": "Jacob",
        "email": "jerinj@marvell.com"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/20191014182247.961-5-pbhagavatula@marvell.com/mbox/",
    "series": [
        {
            "id": 6839,
            "url": "https://patches.dpdk.org/api/series/6839/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=6839",
            "date": "2019-10-14T18:22:37",
            "name": "example/l2fwd-event: introduce l2fwd-event example",
            "version": 6,
            "mbox": "https://patches.dpdk.org/series/6839/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/61152/comments/",
    "check": "fail",
    "checks": "https://patches.dpdk.org/api/patches/61152/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 609021D15A;\n\tMon, 14 Oct 2019 20:23:13 +0200 (CEST)",
            "from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com\n\t[67.231.148.174]) by dpdk.org (Postfix) with ESMTP id 022171D15A\n\tfor <dev@dpdk.org>; Mon, 14 Oct 2019 20:23:11 +0200 (CEST)",
            "from pps.filterd (m0045849.ppops.net [127.0.0.1])\n\tby mx0a-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id\n\tx9EIK14P006596; Mon, 14 Oct 2019 11:23:11 -0700",
            "from sc-exch01.marvell.com ([199.233.58.181])\n\tby mx0a-0016f401.pphosted.com with ESMTP id 2vkc6r7k3f-1\n\t(version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); \n\tMon, 14 Oct 2019 11:23:10 -0700",
            "from SC-EXCH03.marvell.com (10.93.176.83) by SC-EXCH01.marvell.com\n\t(10.93.176.81) with Microsoft SMTP Server (TLS) id 15.0.1367.3;\n\tMon, 14 Oct 2019 11:23:08 -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, 14 Oct 2019 11:23:08 -0700",
            "from BG-LT7430.marvell.com (pe-lt7585.marvell.com [10.28.17.46])\n\tby maili.marvell.com (Postfix) with ESMTP id 845423F704E;\n\tMon, 14 Oct 2019 11:23:05 -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=mx2Fg+ND0m+7mcCFUnRJDnkyVKp9Et2JgPm7nnyv7EI=;\n\tb=Dx1WRLnWHvUFLVXiwERPchl+C4EPJFCHKHwX0xPY3nOOUYCdQtrwAWby3W0VWsRBZtxi\n\tgp0Zwc8/J92MiSNaD4zzU7lF+fvjde2xWTy7VzSM7zaSDvuccTMl+8MBbPU6lLFj85p8\n\ttuapx7wlZhjFWcikJnhwZotJov2s73NoEn/QmL4K+jSBDcPs7uN7IQMeiztPGEerhKAz\n\tOMVqRQRY2/110QFHSblpNuGY+KbeQ5oUF2zyyLfhz8Nfof97hHdGyHCxi4sUjBRxj4Zi\n\tNBYrvyi13dls7PLrMduF3YwS01N0jC3K/0ceWrbPpz2CaoAABJjvjkGikAW8betSKu5z\n\tvw== ",
        "From": "<pbhagavatula@marvell.com>",
        "To": "<jerinj@marvell.com>, <bruce.richardson@intel.com>,\n\t<hemant.agrawal@nxp.com>, Marko Kovacevic <marko.kovacevic@intel.com>,\n\t\"Ori Kam\" <orika@mellanox.com>, Radu Nicolau <radu.nicolau@intel.com>,\n\tAkhil Goyal <akhil.goyal@nxp.com>,\n\tTomasz Kantecki <tomasz.kantecki@intel.com>, \"Sunil\n\tKumar Kori\" <skori@marvell.com>,\n\tPavan Nikhilesh <pbhagavatula@marvell.com>",
        "CC": "<dev@dpdk.org>",
        "Date": "Mon, 14 Oct 2019 23:52:41 +0530",
        "Message-ID": "<20191014182247.961-5-pbhagavatula@marvell.com>",
        "X-Mailer": "git-send-email 2.17.1",
        "In-Reply-To": "<20191014182247.961-1-pbhagavatula@marvell.com>",
        "References": "<20191002205754.11746-1-pbhagavatula@marvell.com>\n\t<20191014182247.961-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-10-14_09:2019-10-11,2019-10-14 signatures=0",
        "Subject": "[dpdk-dev] [PATCH v6 04/10] examples/l2fwd-event: add event device\n\tsetup",
        "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 event device device setup based on event eth Tx adapter\ncapabilities.\n\nSigned-off-by: Sunil Kumar Kori <skori@marvell.com>\nSigned-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>\n---\n examples/l2fwd-event/l2fwd_event.c            |  3 +\n examples/l2fwd-event/l2fwd_event.h            | 16 ++++\n examples/l2fwd-event/l2fwd_event_generic.c    | 75 +++++++++++++++++-\n .../l2fwd-event/l2fwd_event_internal_port.c   | 77 ++++++++++++++++++-\n 4 files changed, 169 insertions(+), 2 deletions(-)",
    "diff": "diff --git a/examples/l2fwd-event/l2fwd_event.c b/examples/l2fwd-event/l2fwd_event.c\nindex 7f90e6311..a5c1c2c40 100644\n--- a/examples/l2fwd-event/l2fwd_event.c\n+++ b/examples/l2fwd-event/l2fwd_event.c\n@@ -57,4 +57,7 @@ l2fwd_event_resource_setup(struct l2fwd_resources *rsrc)\n \n \t/* Setup eventdev capability callbacks */\n \tl2fwd_event_capability_setup(evt_rsrc);\n+\n+\t/* Event device configuration */\n+\tevt_rsrc->ops.event_device_setup(rsrc);\n }\ndiff --git a/examples/l2fwd-event/l2fwd_event.h b/examples/l2fwd-event/l2fwd_event.h\nindex b7aaa39f9..6b5beb041 100644\n--- a/examples/l2fwd-event/l2fwd_event.h\n+++ b/examples/l2fwd-event/l2fwd_event.h\n@@ -13,11 +13,27 @@\n \n #include \"l2fwd_common.h\"\n \n+typedef uint32_t (*event_device_setup_cb)(struct l2fwd_resources *rsrc);\n+\n+struct event_queues {\n+\tuint8_t\tnb_queues;\n+};\n+\n+struct event_ports {\n+\tuint8_t\tnb_ports;\n+};\n+\n struct event_setup_ops {\n+\tevent_device_setup_cb event_device_setup;\n };\n \n struct l2fwd_event_resources {\n \tuint8_t tx_mode_q;\n+\tuint8_t has_burst;\n+\tuint8_t event_d_id;\n+\tuint8_t disable_implicit_release;\n+\tstruct event_ports evp;\n+\tstruct event_queues evq;\n \tstruct event_setup_ops ops;\n };\n \ndiff --git a/examples/l2fwd-event/l2fwd_event_generic.c b/examples/l2fwd-event/l2fwd_event_generic.c\nindex 9afade7d2..33e570585 100644\n--- a/examples/l2fwd-event/l2fwd_event_generic.c\n+++ b/examples/l2fwd-event/l2fwd_event_generic.c\n@@ -16,8 +16,81 @@\n #include \"l2fwd_common.h\"\n #include \"l2fwd_event.h\"\n \n+static uint32_t\n+l2fwd_event_device_setup_generic(struct l2fwd_resources *rsrc)\n+{\n+\tstruct l2fwd_event_resources *evt_rsrc = rsrc->evt_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 ((rsrc->enabled_port_mask & (1 << port_id)) == 0)\n+\t\t\tcontinue;\n+\t\tethdev_count++;\n+\t}\n+\n+\t/* Event device configurtion */\n+\trte_event_dev_info_get(event_d_id, &dev_info);\n+\tevt_rsrc->disable_implicit_release = !!(dev_info.event_dev_cap &\n+\t\t\t\t    RTE_EVENT_DEV_CAP_IMPLICIT_RELEASE_DISABLE);\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 l2fwd_event_set_generic_ops(struct event_setup_ops *ops)\n {\n-\tRTE_SET_USED(ops);\n+\tops->event_device_setup = l2fwd_event_device_setup_generic;\n }\ndiff --git a/examples/l2fwd-event/l2fwd_event_internal_port.c b/examples/l2fwd-event/l2fwd_event_internal_port.c\nindex ce95b8e6d..acd98798e 100644\n--- a/examples/l2fwd-event/l2fwd_event_internal_port.c\n+++ b/examples/l2fwd-event/l2fwd_event_internal_port.c\n@@ -16,8 +16,83 @@\n #include \"l2fwd_common.h\"\n #include \"l2fwd_event.h\"\n \n+static uint32_t\n+l2fwd_event_device_setup_internal_port(struct l2fwd_resources *rsrc)\n+{\n+\tstruct l2fwd_event_resources *evt_rsrc = rsrc->evt_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+\tuint8_t disable_implicit_release;\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 ((rsrc->enabled_port_mask & (1 << port_id)) == 0)\n+\t\t\tcontinue;\n+\t\tethdev_count++;\n+\t}\n+\n+\t/* Event device configurtion */\n+\trte_event_dev_info_get(event_d_id, &dev_info);\n+\n+\tdisable_implicit_release = !!(dev_info.event_dev_cap &\n+\t\t\t\t    RTE_EVENT_DEV_CAP_IMPLICIT_RELEASE_DISABLE);\n+\tevt_rsrc->disable_implicit_release =\n+\t\t\t\t\t\tdisable_implicit_release;\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 void\n l2fwd_event_set_internal_port_ops(struct event_setup_ops *ops)\n {\n-\tRTE_SET_USED(ops);\n+\tops->event_device_setup = l2fwd_event_device_setup_internal_port;\n }\n",
    "prefixes": [
        "v6",
        "04/10"
    ]
}