get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 26642,
    "url": "http://patches.dpdk.org/api/patches/26642/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/1499445667-32588-3-git-send-email-harry.van.haaren@intel.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": "<1499445667-32588-3-git-send-email-harry.van.haaren@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1499445667-32588-3-git-send-email-harry.van.haaren@intel.com",
    "date": "2017-07-07T16:41:02",
    "name": "[dpdk-dev,v4,2/7] service cores: EAL init changes",
    "commit_ref": null,
    "pull_url": null,
    "state": "changes-requested",
    "archived": true,
    "hash": "1f495c263df4e2fa1293290282a00fce4f47a885",
    "submitter": {
        "id": 317,
        "url": "http://patches.dpdk.org/api/people/317/?format=api",
        "name": "Van Haaren, Harry",
        "email": "harry.van.haaren@intel.com"
    },
    "delegate": {
        "id": 1,
        "url": "http://patches.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/1499445667-32588-3-git-send-email-harry.van.haaren@intel.com/mbox/",
    "series": [],
    "comments": "http://patches.dpdk.org/api/patches/26642/comments/",
    "check": "fail",
    "checks": "http://patches.dpdk.org/api/patches/26642/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 5D04D58CB;\n\tFri,  7 Jul 2017 18:41:24 +0200 (CEST)",
            "from mga02.intel.com (mga02.intel.com [134.134.136.20])\n\tby dpdk.org (Postfix) with ESMTP id 78789374F\n\tfor <dev@dpdk.org>; Fri,  7 Jul 2017 18:41:19 +0200 (CEST)",
            "from fmsmga005.fm.intel.com ([10.253.24.32])\n\tby orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t07 Jul 2017 09:41:19 -0700",
            "from silpixa00398672.ir.intel.com ([10.237.223.128])\n\tby fmsmga005.fm.intel.com with ESMTP; 07 Jul 2017 09:41:17 -0700"
        ],
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos;i=\"5.40,323,1496127600\"; d=\"scan'208\";a=\"123916361\"",
        "From": "Harry van Haaren <harry.van.haaren@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "thomas@monjalon.net, jerin.jacob@caviumnetworks.com,\n\tkeith.wiles@intel.com, bruce.richardson@intel.com,\n\tHarry van Haaren <harry.van.haaren@intel.com>",
        "Date": "Fri,  7 Jul 2017 17:41:02 +0100",
        "Message-Id": "<1499445667-32588-3-git-send-email-harry.van.haaren@intel.com>",
        "X-Mailer": "git-send-email 2.7.4",
        "In-Reply-To": "<1499445667-32588-1-git-send-email-harry.van.haaren@intel.com>",
        "References": "<1498735421-100164-1-git-send-email-harry.van.haaren@intel.com>\n\t<1499445667-32588-1-git-send-email-harry.van.haaren@intel.com>",
        "Subject": "[dpdk-dev] [PATCH v4 2/7] service cores: EAL init changes",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <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": "This commit shows the changes required in rte_eal_init()\nto transparently launch the service threads. The threads\nare launched into the service worker functions here because\nafter rte_eal_init() the application is not gauranteed to\ncall any other DPDK API.\n\nAs the registration of services happens at initialization\ntime, the services that require CPU time are already available\nwhen we reach the end of rte_eal_init().\n\nSigned-off-by: Harry van Haaren <harry.van.haaren@intel.com>\n\n---\n\nv4:\n- Added #include for service cores in BSD eal.c\n\nv2 comments:\n- Include BSD implementation (Jerin)\n- Move details of core-tracking into rte_service_lcore_add(Jerin)\n- Given there are changes other to suggested, not using Ack\n---\n lib/librte_eal/bsdapp/eal/eal.c   | 23 +++++++++++++++++++++++\n lib/librte_eal/linuxapp/eal/eal.c | 23 +++++++++++++++++++++++\n 2 files changed, 46 insertions(+)",
    "diff": "diff --git a/lib/librte_eal/bsdapp/eal/eal.c b/lib/librte_eal/bsdapp/eal/eal.c\nindex 05f0c1f..09e3301 100644\n--- a/lib/librte_eal/bsdapp/eal/eal.c\n+++ b/lib/librte_eal/bsdapp/eal/eal.c\n@@ -72,6 +72,7 @@\n #include <rte_common.h>\n #include <rte_version.h>\n #include <rte_atomic.h>\n+#include <rte_service_private.h>\n #include <malloc_heap.h>\n \n #include \"eal_private.h\"\n@@ -653,6 +654,17 @@ rte_eal_init(int argc, char **argv)\n \trte_eal_mp_remote_launch(sync_func, NULL, SKIP_MASTER);\n \trte_eal_mp_wait_lcore();\n \n+\t/* initialize services first so vdevs can register during bus_probe.\n+\t * Ignore return value of already initialized, this means EAL parameter\n+\t * -s was used to set a service-core mask.\n+\t */\n+\tret = rte_service_init();\n+\tif (ret) {\n+\t\trte_eal_init_alert(\"rte_service_init() failed\\n\");\n+\t\trte_errno = ENOEXEC;\n+\t\treturn -1;\n+\t}\n+\n \t/* Probe all the buses and devices/drivers on them */\n \tif (rte_bus_probe()) {\n \t\trte_eal_init_alert(\"Cannot probe devices\\n\");\n@@ -660,6 +672,17 @@ rte_eal_init(int argc, char **argv)\n \t\treturn -1;\n \t}\n \n+\t/* initialize default services configuration */\n+\tuint32_t service_cores[RTE_MAX_LCORE];\n+\tint count = rte_service_lcore_list(service_cores, RTE_MAX_LCORE);\n+\tfor (i = 0; i < count; i++)\n+\t\trte_service_lcore_start(service_cores[i]);\n+\tret = rte_service_set_default_mapping();\n+\tif (ret) {\n+\t\trte_errno = ENOEXEC;\n+\t\treturn -1;\n+\t}\n+\n \trte_eal_mcfg_complete();\n \n \treturn fctret;\ndiff --git a/lib/librte_eal/linuxapp/eal/eal.c b/lib/librte_eal/linuxapp/eal/eal.c\nindex 7c78f2d..d63dd87 100644\n--- a/lib/librte_eal/linuxapp/eal/eal.c\n+++ b/lib/librte_eal/linuxapp/eal/eal.c\n@@ -78,6 +78,7 @@\n #include <rte_version.h>\n #include <rte_atomic.h>\n #include <malloc_heap.h>\n+#include <rte_service_private.h>\n \n #include \"eal_private.h\"\n #include \"eal_thread.h\"\n@@ -932,6 +933,17 @@ rte_eal_init(int argc, char **argv)\n \trte_eal_mp_remote_launch(sync_func, NULL, SKIP_MASTER);\n \trte_eal_mp_wait_lcore();\n \n+\t/* initialize services first so vdevs can register during bus_probe.\n+\t * Ignore return value of already initialized, this means EAL parameter\n+\t * -s was used to set a service-core mask.\n+\t */\n+\tret = rte_service_init();\n+\tif (ret) {\n+\t\trte_eal_init_alert(\"rte_service_init() failed\\n\");\n+\t\trte_errno = ENOEXEC;\n+\t\treturn -1;\n+\t}\n+\n \t/* Probe all the buses and devices/drivers on them */\n \tif (rte_bus_probe()) {\n \t\trte_eal_init_alert(\"Cannot probe devices\\n\");\n@@ -939,6 +951,17 @@ rte_eal_init(int argc, char **argv)\n \t\treturn -1;\n \t}\n \n+\t/* initialize default services configuration */\n+\tuint32_t service_cores[RTE_MAX_LCORE];\n+\tint count = rte_service_lcore_list(service_cores, RTE_MAX_LCORE);\n+\tfor (i = 0; i < count; i++)\n+\t\trte_service_lcore_start(service_cores[i]);\n+\tret = rte_service_set_default_mapping();\n+\tif (ret) {\n+\t\trte_errno = ENOEXEC;\n+\t\treturn -1;\n+\t}\n+\n \trte_eal_mcfg_complete();\n \n \treturn fctret;\n",
    "prefixes": [
        "dpdk-dev",
        "v4",
        "2/7"
    ]
}