get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 59850,
    "url": "http://patchwork.dpdk.org/api/patches/59850/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20190926100558.24348-4-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-4-pbhagavatula@marvell.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20190926100558.24348-4-pbhagavatula@marvell.com",
    "date": "2019-09-26T10:05:50",
    "name": "[03/11] examples/l3fwd: add event device configuration",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "bda77e3ce84734291568c9443015b02e3fef5e92",
    "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-4-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/59850/comments/",
    "check": "success",
    "checks": "http://patchwork.dpdk.org/api/patches/59850/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 BEF7F1BF7B;\n\tThu, 26 Sep 2019 12:07:40 +0200 (CEST)",
            "from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com\n\t[67.231.148.174]) by dpdk.org (Postfix) with ESMTP id 9ECE71BF77\n\tfor <dev@dpdk.org>; Thu, 26 Sep 2019 12:07:38 +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\tx8QA76ca002950; Thu, 26 Sep 2019 03:07:37 -0700",
            "from sc-exch03.marvell.com ([199.233.58.183])\n\tby mx0a-0016f401.pphosted.com with ESMTP id 2v8ua0002c-8\n\t(version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); \n\tThu, 26 Sep 2019 03:07:37 -0700",
            "from SC-EXCH01.marvell.com (10.93.176.81) by SC-EXCH03.marvell.com\n\t(10.93.176.83) with Microsoft SMTP Server (TLS) id 15.0.1367.3;\n\tThu, 26 Sep 2019 03:06:13 -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; Thu, 26 Sep 2019 03:06:13 -0700",
            "from BG-LT7430.marvell.com (unknown [10.28.17.15])\n\tby maili.marvell.com (Postfix) with ESMTP id 7FE6F3F703F;\n\tThu, 26 Sep 2019 03:06:10 -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=1zM7hRz2ferX2fSx+ccbf7xrn4e3kYFdZE0jxGnhVT4=;\n\tb=fnV5ltoJ/2oxaVFXQFwajkEHbcDmbtoRh3cGn87oV2Z/QOSb8QqGSSRVOOtOVhwbEY/J\n\toumzq1d+8bQHG7k1CdqEFWcOgLUxXbtz1lpuBK6vKE9jVMx3R4+bFiqy7od+MeyAw5cS\n\tmBMDi/TVqd5+QYUJkbKsP2GG2pMp73gQh+vE133rYjciVKoVgzB56iPbI9rA/xgOchHh\n\tBxdHRKurPIvfhd9nu2vjlnu8YPUqN40tevWEFhOqts0295eNptgQV7qKytKUbQD5Cwa9\n\tNAZy6tRGswnk7COZS6pogUPguf7uLivEBYKkfn3U0qcHSP2iEYz8IUiX4Q8i2uBAYPko\n\tSg== ",
        "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>, Pavan Nikhilesh <pbhagavatula@marvell.com>",
        "Date": "Thu, 26 Sep 2019 15:35:50 +0530",
        "Message-ID": "<20190926100558.24348-4-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 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\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: 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_eventdev.c               | 67 +++++++++++++++++++\n examples/l3fwd/l3fwd_eventdev.h               |  4 ++\n examples/l3fwd/l3fwd_eventdev_internal_port.c |  1 +\n 3 files changed, 72 insertions(+)",
    "diff": "diff --git a/examples/l3fwd/l3fwd_eventdev.c b/examples/l3fwd/l3fwd_eventdev.c\nindex fa464626d..7e2c4c66b 100644\n--- a/examples/l3fwd/l3fwd_eventdev.c\n+++ b/examples/l3fwd/l3fwd_eventdev.c\n@@ -91,10 +91,74 @@ l3fwd_eventdev_capability_setup(void)\n \t\tl3fwd_eventdev_set_internal_port_ops(&evdev_rsrc->ops);\n }\n \n+\n+static uint32_t\n+l3fwd_eventdev_setup(uint16_t ethdev_count)\n+{\n+\tstruct l3fwd_eventdev_resources *evdev_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 num_workers = 0;\n+\tint ret;\n+\n+\t/* Event device configurtion */\n+\trte_event_dev_info_get(event_d_id, &dev_info);\n+\tevdev_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+\tevent_d_conf.nb_event_queues = ethdev_count +\n+\t\t\t(evdev_rsrc->tx_mode_q ? 1 : 0);\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+\tevdev_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_exit(EXIT_FAILURE, \"Error in configuring event device\");\n+\n+\tevdev_rsrc->event_d_id = event_d_id;\n+\treturn event_queue_cfg;\n+}\n+\n void\n l3fwd_eventdev_resource_setup(void)\n {\n \tstruct l3fwd_eventdev_resources *evdev_rsrc = l3fwd_get_eventdev_rsrc();\n+\tuint16_t ethdev_count = rte_eth_dev_count_avail();\n \tint32_t ret;\n \n \t/* Parse eventdev command line options */\n@@ -107,4 +171,7 @@ l3fwd_eventdev_resource_setup(void)\n \n \t/* Setup eventdev capability callbacks */\n \tl3fwd_eventdev_capability_setup();\n+\n+\t/* Event device configuration */\n+\tl3fwd_eventdev_setup(ethdev_count);\n }\ndiff --git a/examples/l3fwd/l3fwd_eventdev.h b/examples/l3fwd/l3fwd_eventdev.h\nindex 61a537864..ce4e35443 100644\n--- a/examples/l3fwd/l3fwd_eventdev.h\n+++ b/examples/l3fwd/l3fwd_eventdev.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@@ -37,9 +38,12 @@ struct l3fwd_eventdev_setup_ops {\n };\n \n struct l3fwd_eventdev_resources {\n+\tuint8_t disable_implicit_release;\n \tstruct l3fwd_eventdev_setup_ops ops;\n+\tuint8_t event_d_id;\n \tuint8_t sync_mode;\n \tuint8_t tx_mode_q;\n+\tuint8_t has_burst;\n \tuint8_t enabled;\n \tuint8_t nb_args;\n \tchar **args;\ndiff --git a/examples/l3fwd/l3fwd_eventdev_internal_port.c b/examples/l3fwd/l3fwd_eventdev_internal_port.c\nindex f698a0ce1..d40185862 100644\n--- a/examples/l3fwd/l3fwd_eventdev_internal_port.c\n+++ b/examples/l3fwd/l3fwd_eventdev_internal_port.c\n@@ -5,6 +5,7 @@\n #include \"l3fwd.h\"\n #include \"l3fwd_eventdev.h\"\n \n+\n void\n l3fwd_eventdev_set_internal_port_ops(struct l3fwd_eventdev_setup_ops *ops)\n {\n",
    "prefixes": [
        "03/11"
    ]
}