get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 6052,
    "url": "https://patches.dpdk.org/api/patches/6052/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/1435913919-13196-7-git-send-email-maciejx.t.gajdzica@intel.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": "<1435913919-13196-7-git-send-email-maciejx.t.gajdzica@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1435913919-13196-7-git-send-email-maciejx.t.gajdzica@intel.com",
    "date": "2015-07-03T08:58:34",
    "name": "[dpdk-dev,v4,06/11] ip_pipeline: added application thread",
    "commit_ref": null,
    "pull_url": null,
    "state": "changes-requested",
    "archived": true,
    "hash": "b5374aaad8a04caa893268417894bcb28490ad93",
    "submitter": {
        "id": 18,
        "url": "https://patches.dpdk.org/api/people/18/?format=api",
        "name": "Maciej Gajdzica",
        "email": "maciejx.t.gajdzica@intel.com"
    },
    "delegate": null,
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/1435913919-13196-7-git-send-email-maciejx.t.gajdzica@intel.com/mbox/",
    "series": [],
    "comments": "https://patches.dpdk.org/api/patches/6052/comments/",
    "check": "pending",
    "checks": "https://patches.dpdk.org/api/patches/6052/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 [IPv6:::1])\n\tby dpdk.org (Postfix) with ESMTP id 6F4EFDE0;\n\tFri,  3 Jul 2015 11:17:43 +0200 (CEST)",
            "from mga14.intel.com (mga14.intel.com [192.55.52.115])\n\tby dpdk.org (Postfix) with ESMTP id 5A8CFCE7\n\tfor <dev@dpdk.org>; Fri,  3 Jul 2015 11:17:40 +0200 (CEST)",
            "from orsmga002.jf.intel.com ([10.7.209.21])\n\tby fmsmga103.fm.intel.com with ESMTP; 03 Jul 2015 02:17:39 -0700",
            "from unknown (HELO stargo) ([10.217.248.233])\n\tby orsmga002.jf.intel.com with SMTP; 03 Jul 2015 02:17:37 -0700",
            "by stargo (sSMTP sendmail emulation);\n\tFri, 03 Jul 2015 11:12:18 +0200"
        ],
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.15,399,1432623600\"; d=\"scan'208\";a=\"757810077\"",
        "From": "Maciej Gajdzica <maciejx.t.gajdzica@intel.com>",
        "To": "dev@dpdk.org",
        "Date": "Fri,  3 Jul 2015 10:58:34 +0200",
        "Message-Id": "<1435913919-13196-7-git-send-email-maciejx.t.gajdzica@intel.com>",
        "X-Mailer": "git-send-email 1.9.1",
        "In-Reply-To": "<1435913919-13196-1-git-send-email-maciejx.t.gajdzica@intel.com>",
        "References": "<1435913919-13196-1-git-send-email-maciejx.t.gajdzica@intel.com>",
        "Subject": "[dpdk-dev] [PATCH v4 06/11] ip_pipeline: added application thread",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "patches and discussions about DPDK <dev.dpdk.org>",
        "List-Unsubscribe": "<http://dpdk.org/ml/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://dpdk.org/ml/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<http://dpdk.org/ml/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "Application thread runs pipelines on assigned cores.\n\nSigned-off-by: Maciej Gajdzica <maciejx.t.gajdzica@intel.com>\n---\n examples/ip_pipeline/Makefile |    1 +\n examples/ip_pipeline/main.c   |    6 +++\n examples/ip_pipeline/thread.c |  110 +++++++++++++++++++++++++++++++++++++++++\n 3 files changed, 117 insertions(+)\n create mode 100644 examples/ip_pipeline/thread.c",
    "diff": "diff --git a/examples/ip_pipeline/Makefile b/examples/ip_pipeline/Makefile\nindex 9ce80a8..f255338 100644\n--- a/examples/ip_pipeline/Makefile\n+++ b/examples/ip_pipeline/Makefile\n@@ -53,6 +53,7 @@ SRCS-$(CONFIG_RTE_LIBRTE_PIPELINE) += config_parse.c\n SRCS-$(CONFIG_RTE_LIBRTE_PIPELINE) += config_parse_tm.c\n SRCS-$(CONFIG_RTE_LIBRTE_PIPELINE) += config_check.c\n SRCS-$(CONFIG_RTE_LIBRTE_PIPELINE) += init.c\n+SRCS-$(CONFIG_RTE_LIBRTE_PIPELINE) += thread.c\n SRCS-$(CONFIG_RTE_LIBRTE_PIPELINE) += cpu_core_map.c\n \n SRCS-$(CONFIG_RTE_LIBRTE_PIPELINE) += pipeline_common_be.c\ndiff --git a/examples/ip_pipeline/main.c b/examples/ip_pipeline/main.c\nindex ef68c86..862e2f2 100644\n--- a/examples/ip_pipeline/main.c\n+++ b/examples/ip_pipeline/main.c\n@@ -52,5 +52,11 @@ main(int argc, char **argv)\n \t/* Init */\n \tapp_init(&app);\n \n+\t/* Run-time */\n+\trte_eal_mp_remote_launch(\n+\t\tapp_thread,\n+\t\t(void *) &app,\n+\t\tCALL_MASTER);\n+\n \treturn 0;\n }\ndiff --git a/examples/ip_pipeline/thread.c b/examples/ip_pipeline/thread.c\nnew file mode 100644\nindex 0000000..b2a8656\n--- /dev/null\n+++ b/examples/ip_pipeline/thread.c\n@@ -0,0 +1,110 @@\n+/*-\n+ *   BSD LICENSE\n+ *\n+ *   Copyright(c) 2010-2015 Intel Corporation. All rights reserved.\n+ *   All rights reserved.\n+ *\n+ *   Redistribution and use in source and binary forms, with or without\n+ *   modification, are permitted provided that the following conditions\n+ *   are met:\n+ *\n+ *     * Redistributions of source code must retain the above copyright\n+ *       notice, this list of conditions and the following disclaimer.\n+ *     * Redistributions in binary form must reproduce the above copyright\n+ *       notice, this list of conditions and the following disclaimer in\n+ *       the documentation and/or other materials provided with the\n+ *       distribution.\n+ *     * Neither the name of Intel Corporation nor the names of its\n+ *       contributors may be used to endorse or promote products derived\n+ *       from this software without specific prior written permission.\n+ *\n+ *   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n+ *   \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n+ *   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n+ *   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n+ *   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n+ *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n+ *   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n+ *   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n+ *   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n+ *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n+ *   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n+ */\n+\n+#include <rte_common.h>\n+#include <rte_cycles.h>\n+#include <rte_pipeline.h>\n+\n+#include \"pipeline_common_be.h\"\n+#include \"app.h\"\n+\n+int app_thread(void *arg)\n+{\n+\tstruct app_params *app = (struct app_params *) arg;\n+\tuint32_t core_id = rte_lcore_id(), i, j;\n+\tstruct app_thread_data *t = &app->thread_data[core_id];\n+\tuint32_t n_regular = RTE_MIN(t->n_regular, RTE_DIM(t->regular));\n+\tuint32_t n_custom = RTE_MIN(t->n_custom, RTE_DIM(t->custom));\n+\n+\tfor (i = 0; ; i++) {\n+\t\t/* Run regular pipelines */\n+\t\tfor (j = 0; j < n_regular; j++) {\n+\t\t\tstruct app_thread_pipeline_data *data = &t->regular[j];\n+\t\t\tstruct pipeline *p = data->be;\n+\n+\t\t\trte_pipeline_run(p->p);\n+\t\t}\n+\n+\t\t/* Run custom pipelines */\n+\t\tfor (j = 0; j < n_custom; j++) {\n+\t\t\tstruct app_thread_pipeline_data *data = &t->custom[j];\n+\n+\t\t\tdata->f_run(data->be);\n+\t\t}\n+\n+\t\t/* Timer */\n+\t\tif ((i & 0xF) == 0) {\n+\t\t\tuint64_t time = rte_get_tsc_cycles();\n+\t\t\tuint64_t t_deadline = UINT64_MAX;\n+\n+\t\t\tif (time < t->deadline)\n+\t\t\t\tcontinue;\n+\n+\t\t\t/* Timer for regular pipelines */\n+\t\t\tfor (j = 0; j < n_regular; j++) {\n+\t\t\t\tstruct app_thread_pipeline_data *data =\n+\t\t\t\t\t&t->regular[j];\n+\t\t\t\tuint64_t p_deadline = data->deadline;\n+\n+\t\t\t\tif (p_deadline <= time) {\n+\t\t\t\t\tdata->f_timer(data->be);\n+\t\t\t\t\tp_deadline = time + data->timer_period;\n+\t\t\t\t\tdata->deadline = p_deadline;\n+\t\t\t\t}\n+\n+\t\t\t\tif (p_deadline < t_deadline)\n+\t\t\t\t\tt_deadline = p_deadline;\n+\t\t\t}\n+\n+\t\t\t/* Timer for custom pipelines */\n+\t\t\tfor (j = 0; j < n_custom; j++) {\n+\t\t\t\tstruct app_thread_pipeline_data *data =\n+\t\t\t\t\t&t->custom[j];\n+\t\t\t\tuint64_t p_deadline = data->deadline;\n+\n+\t\t\t\tif (p_deadline <= time) {\n+\t\t\t\t\tdata->f_timer(data->be);\n+\t\t\t\t\tp_deadline = time + data->timer_period;\n+\t\t\t\t\tdata->deadline = p_deadline;\n+\t\t\t\t}\n+\n+\t\t\t\tif (p_deadline < t_deadline)\n+\t\t\t\t\tt_deadline = p_deadline;\n+\t\t\t}\n+\n+\t\t\tt->deadline = t_deadline;\n+\t\t}\n+\t}\n+\n+\treturn 0;\n+}\n",
    "prefixes": [
        "dpdk-dev",
        "v4",
        "06/11"
    ]
}